Чем открыть gpr gopro
The General Purpose Raw (GPR) is 12-bit raw image coding format that is based on Adobe DNG® standard. Image compression is a balance of speed, file size and photo quality, and typically one can only choose two. GPR was designed to provide a better tradeoff for all three parameters than what's possible with DNG or any other raw format. The intention of GPR is not to compete with DNG, rather to be as close as possible to DNG. This guarantees compatibility with applications that already understand DNG, but provide an alternate compression scheme in situations where compression and encoding/decoding speed matter.
Action cameras, like that from GoPro, have limited computing resources, so ability to compress data using fewest CPU cycles matters. File sizes matter because GoPro cameras can record thousands of images very quickly using timelapse and burst mode features. As the world shifts from desktop to mobile, people now shoot and process more and more photos on smartphones which are always limited on storage space and bandwidth. And last but not the least, image quality matters because we want GPR to provide visually transparent image quality when compared to uncompressed DNG. All this combined enables customers to capture DSLR-class image quality in a GPR file that has nearly same size as JPEG, on a camera that is as small and rugged as a GoPro.
DNG allows storage of RAW sensor data in three main formats: uncompressed, lossless JPEG or lossy JPEG. Lossless mode typically achieves 2:1 compression that is clearly not enough in the mobile-first age. Lossy mode uses the 8x8 DCT transform that was developed for JPEG more than 25 years ago (when photo resolutions were much smaller), achieving compression ratios around 4:1. In comparison, GPR achieves typical compression ratios between 10:1 and 4:1. This is due to Full-Frame Wavelet Transform (FFWT). FFWT has a few nice properties compared to DCT:
- The compression performance increases as image resolutions go up - making it more future proof
- Better image quality as it does not suffer from ringing or blocky artifacts observed in JPEG files.
The wavelet codec in GPR is not new, but has been a SMPTE® standard under the name VC-5. VC-5 shares a lot of technical barebones with the CineForm®, an open and cross-platform intermediate codec designed for high-resolution video editing.
Following file types are discussed in this document:
RAW or CFA RAW - The Bayer RAW format is typically composed of 50% green, 25% red and 25% blue samples captured from sensor, e.g. RGGB and GBRG. The RAW image doesn't carry metadata about image development e.g. exposure, white balance or noise etc, thus cannot easily be turned into a well developed image.
DNG - Widely regarded as a defacto standard, a DNG file can be opened natively on most operating systems and image development tools. As mentioned earlier, DNG stores compressed or uncompressed RAW sensor data along with accompanying metadata that is needed to properly develop image.
GPR - General purpose RAW format file. GoPro cameras including Hero5/6 and Fusion record photos in this format. GPR is an extension of DNG, enabling high performance VC-5 compression for faster storage and smaller files without impacting image quality. Today, GPR files can be opened in Adobe products like Camera Raw®, Photoshop® and Lightroom®.
VC5 - A file with VC5 extension stores RAW sensor image data in a compressed format that is compatible with VC-5. Similar to RAW file, VC5 file does not store metadata needed for proper image development.
PPM - Portable Pixel Map is one of the simplest storage formats of uncompressed debayered RGB image. It is very easy to write and analyze programs to process this format, and that is why it is used here.
JPG or JPEG One of the simplest formats for lossy compression of debayered RGB image.
Included Within This Repository
The complete source of GPR-SDK, a library that implements conversion of RAW, DNG, GPR, PPM or JPG formats. GPR-SDK has C-99 interface for maximum portability, yet is implemented in C/C++ for programming effectiveness.
Source of VC-5 encoder and decoder library. Encoder is hand-optimized with NEON intrinsics for ARM processors.
gpr_tools - a sample demo code that uses GPR-SDK to convert between GPR, DNG and RAW formats.
vc5_encoder_app - a sample VC5 encoder application that encodes a RAW frame to VC5 file.
vc5_decoder_app - a sample VC5 decoder application that decodes VC5 file to RAW file.
CMake support for building all projects.
- macOS High Sierra with XCode v8 & v9, El Capitan with XCode v8
- Windows 10 with Visual Studio 2015 & 2017
- Ubuntu 16.04 with gcc v5.4
GPR is licensed under either:
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Quick Start for Developers
Setup Source Code
Compiling Source Code
Run following commands:
For Xcode, use command line switch -G Xcode . On Windows, CMake should automatically figure out installed version of Visual Studio and generate corresponding project files.
Mac build instructions, after running the above:
Linux build instructions, after running the above:
Some example commands are shown below:
Convert GPR to DNG:
Extract RAW from GPR:
Convert DNG to GPR:
Analyze a GPR (or even DNG) and output parameters that define DNG metadata to a file:
Read RAW pixel data, along with parameters that define DNG metadata and apply to an output GPR (or DNG) file:
Read GPR file and output PPM preview:
Read GPR file and output JPG preview:
For a complete list of commands, please refer to data/tests/run_tests.sh
vc5_encoder_app is an optional tool that can be used to convert RAW image data to VC5 essence, as shown below:
vc5_decoder_app is an optional tool that can be used to decode VC5 essence into RAW image data, as shown below:
Source code organization
Source code is organized inside source folder. All library and sdk code is located in lib folder, while all tools and applications that use lib are located in app folder.
The lib folder is made up of following folders:
- common - common source code that is accessable to all libraries and applications
- dng_sdk - mostly borrowed from Adobe DNG SDK version 1.4.
- xmp_core - Extensible Metadata Platform, mostly borrowed from Adobe DNG SDK version 1.4
- expat_lib - A stream-oriented XML parser borrowed from Adobe DNG SDK version 1.4
- vc5_decoder - vc5 decoder. If this is not present, cmake won't use it (and define GPR_READING=0 ); otherwise cmake uses it (and defines GPR_READING=1 ).
- vc5_encoder - vc5 encoder. If this is not present, cmake won't use it (and define GPR_WRITING=0 ); otherwise cmake uses it (and defines GPR_WRITING=1 ).
- vc5_common - common source code that is shared between vc5_encoder and vc5_decoder
- md5_lib - md5 checksum calculation library
- tiny_jpeg - lightweight jpeg encoder available here. If this folder is not present, cmake will not use it (and define GPR_JPEG_AVAILABLE=0 ); otherwise cmake defines GPR_JPEG_AVAILABLE=1 and uses it.
- gpr_sdk - uses all modules above to read/write GPR files.
The app folder is made up of following folders:
- common - common application level source code that is accessable to sample applications
- vc5_decoder_app - sample vc5 decoder application
- vc5_encoder_app - sample vc5 encoder application
- gpr_tools - utility to convert to/from various formats mentioned above and measure runtime
Here are some important compile time definitions:
GPR_TIMING enables timing code that prints out time spent (in milliseconds) in different functions. In production builds, applications should define GPR_TIMING=0 . Set to a higher value to output greater timing information.
GPR_WRITING enables all code that writes GPR files. If application does not need to write GPR, set GPR_WRITING=0 to reduce code size.
GPR_READING enables all code that reads GPR files. If application does not need to read GPR, set GPR_READING=0 to reduce code size.
GPR_JPEG_AVAILABLE enables lightweight jpeg encoder located in source/lib/tiny_jpeg . This is used to write a small thumbnail inside GPR file. If GPR_JPEG_AVAILABLE=0 , thumbnail is not written, although you can still set pre-encoded jpeg file as thumbnail, by using -P, -W and -H command line options in gpr_tools .
NEON enables arm neon intrinsics (disabled by default). This can be enabled from CMake by -DNEON=1 switch.
GPR-SDK API is defined in header files in the following folders:
- source/lib/common/public
- source/lib/gpr_sdk/public
An application needs to include above two folders in order to access API. API defines various functions named gpr_convert_XXX_to_XXX which convert from one format to another. As an example, GPR to DNG conversion is done from gpr_convert_gpr_to_dng . When output file is GPR or DNR, gpr_parameters structure has to be specified. Fields in this structure map to DNG metadata tags, and we have tried to abstract low-level DNG details in a very clean and easy to use structure.
The wavelet used within VC-5 is a 2D three-level 2-6 Wavelet. If you look up wavelets on Wikipedia, prepare to get confused fast. Wavelet compression of images is fairly simple if you don't get distracted by the theory. The wavelet is a one dimensional filter that separates low frequency data from high frequency data, and the math is simple. For each two pixels in an image simply add them (low frequency):
- low frequency sample = pixel[x] + pixel[x+1]
- two inputs, is the '2' part of 2-6 Wavelet.
For high frequency it can be as simple as the difference of the same two pixels:
- high frequency sample = pixel[x] - pixel[x+1]
- this would be a 2-2 Wavelet, also called a HAAR wavelet.
For a 2-6 wavelet this math is for the high frequency:
- high frequency sample = pixel[x] - pixel[x+1] + (-pixel[x-2] - pixel[x-1] + pixel[x+2] + pixel[x+3])/8
- i.e 6 inputs for the high frequency, the '6' part of 2-6 Wavelet.
The math doesn't get much more complex than that.
To wavelet compress a monochrome frame (color can be compressed as separate monochrome channels), we start with a 2D array of pixels (a.k.a image.)
If you store data with low frequencies (low pass) on the left and the high frequencies (high pass) on the right you get the image below. A low pass image is basically the average, and high pass image is like an edge enhance.
You repeat the same operation vertically using the previous output as the input image.
Resulting in a 1 level 2D wavelet:
For a two level wavelet, you repeat the same horizontal and vertical wavelet operations of the top left quadrant to provide:
Repeating again for the third level.
All that grey is easy to compress. The reason there is very little information in these high frequency regions is that the high frequency data of the image has been quantized. The human eye is not very good at seeing subtle changes in high frequency regions, so this is exploited by scaling the high-frequency samples before they are stored:
- high frequency sample = (wavelet output) / quantizer
After the wavelet and quantization stages, you have the same number of samples as the original source. The compression is achieved as the samples are no longer evenly distributed (after wavelet and quantization.) There are many many zeros and ones, than higher values, so we can store all these values more efficiently, often up to 10 times more so.
The output of the quantization stage has a lot of zeros, and many in a row. Additional compression is achieved by counting runs of zeros, and storing them like: a "z15" for 15 zeros, rather than "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
Variable length coding
After all previous steps, the high frequency samples are stored with a variable length coding scheme using Huffman coding. A table then maps sample values to codewords with differing bit lengths where most common codewords are expressed in few bits and rare codewords are expressed in larger bits.
The lack of complexity is what makes VC-5 fast. Low pass filter is just addition. High pass filter is 6 tap where all coefficients are rational numbers and no multiplication or division is required. Variable length coding can be implemented with a lookup table, an approach that is faster than other entropy coding techniques.
Reverse all the steps.
Thumbnail and Preview Generation
A nice property of the Wavelet codec is scalability support: i.e. various resolutions ranging from original coded resolution to one-sixteenth resolution are encoded and can be retrieved efficiently. Scalability means that extracting lowest resolution is fastest and cost of extracting resolutions increases as resolution goes up. For application scenarios where rendering a smaller resolution suffices, a decoder can very cheaply extract lower resolution. Common examples of this use case are thumbnail previews in file browsers or rendering image on devices with smaller resolution e.g. mobile phones.
Scalability is more efficient than decoding full resolution image, performing demosaicing and downsampling. To avoid demosaic, DNG allows mechanism to store a separate thumbnail and preview image (often encoded in JPG). File browers use thumbnail, while preview is useful for rendering higher resolution version of image. Since these are separately enoded images and do not exploit compression amongst each other or with original RAW image, file sizes add up quickly.
As an example, GoPro Hero6 Black captures 4000x3000 RAW image in Bayer RGGB format. Red, blue and two green channels are split up and separately encoded into wavelet resolutions of 2000x1500 (or 2:1), 1000x750 (or 4:1), 500x375 (or 8:1). The Low-Low band of lowest resolution wavelet is a 250x188 (or 16:1) image, and it is stored uncompressed (generating thumbnail is essentially a memory copy). RGB images at other resolutions can be obtained at successive complexity levels, without performing demosaicing. To illustrate this, decoding speed of various resolutions is measured and shown using gpr_tools (in milliseconds inside square brackets).
And here is the output of full GPR to DNG decoding.
To summarize, here are speed gain factors over full resolution DNG decoding:
Resolution | 250x188 | 500x375 | 1000x750 | 2000x1500 |
---|---|---|---|---|
Speed factor | 41.6x | 13.4x | 3.3x | 1.2x |
Demosaicing has a higher complexity than GPR decoding, so numbers for RGB output after demosaic will be higher. Similar speed improvements can also be seen when writing JPG file.
У модели камер GoPro HERO5 Black появилась возможность снимать в формате RAW, а у модели HERO6 Black еще и в HDR. Что же это за файлы и зачем они нужны? Давайте разберемся!
Формат RAW существует уже довольно давно, но используется, в основном, только в профессиональной фототехнике. Само по себе слово “raw” переводится как “сырой, необработанный”. Такое название файл получил потому, что в своём изначальном виде он не пригоден для печати и не может быть открыт растровым графическим редактором. Но зачем же он тогда нужен? Файл RAW представляет собой цифровой аналог негатива, получаемого при съемке на обычную пленку. Когда цифровая камера получает сигнал на матрицу, она конвертирует его в изображение, используя заданные параметры: значение экспозиции, баланс белого и другие. При этом часть данных теряется, а мы получаем пригодное для отображения фото. В отличие от этой схемы в файл RAW записывается вся информация, поступающая на матрицу. Как мы можем это использовать: открывая RAW-файл в специальном редакторе, пользователь может уже без потери качества менять множество параметров отснятого материала, добиваясь более высокого качества снимков и получая возможность создавать интересные эффекты. GoPro сохраняет изображения в формате RAW в файлы с расширением “.gpr” и делает копию в обычном JPEG-е. Наиболее известный софт для обработки RAW-файлов - Adobe Lightroom, который начиная с версии CC-2015.9 поддерживает файлы .gpr.
GoPro HERO6 Black логично продолжила использование возможностей съемки в RAW-формате и добавила функцию получения HDR-изображения. HDR расшифровывается как “High Dynamic Range” - высокий динамический диапазон. У камеры так называют диапазон передаваемых параметров яркости, от самых темных до самых светлых. Чем шире у камеры динамический диапазон, тем меньшее на одном и том же снимке ярких участков превратятся в светлые пятна, а темных - в черные. Эта же характеристика отвечает за насыщенность изображения с разным уровнем яркости. Вы замечали, что на фотографиях небо часто становится белым вместо голубого, а темные объекты невозможно разобрать? Это происходит из-за того, что, ориентируясь на объект, находящийся в фокусе, камера выстраивает значение экспозиции (параметра отвечающего за настройку яркости изображения) именно по этому объекту. Динамического диапазона для хорошего отображения более светлых и темных участков просто не хватает. Несмотря на развитие технологий и увеличение динамического диапазона современных камер, у них все равно есть свой предел и подобные ситуации неизбежны. Именно тут нам на помощь приходит HDR-съемка. Камера использует широкий диапазон значений из RAW-файла, чтобы создать HDR. Грубо говоря, она соединяет несколько одинаковых фото с разным значением экспозиции - от более темного до более светлого, - за счет чего более темные участки фото высветляются, а более светлые - затемняются. В результате изображение становится более четким и сочным. Даже в тех участках, где яркость довольно близка к среднему значению, происходит увеличение насыщенности цветов.
Компания GoPro дала в руки пользователей превосходный инструмент, который позволяет снимать еще лучше и ярче. А вот когда и как использовать технологии RAW и HDR должны решать сами пользователи, ведь далеко не каждый готов заниматься обработкой отснятого материала.
После первой записи на GoPro пользователи открывают карту памяти с компьютера и задаются вопросом: почему кроме самих видео они видят еще кучу других непонятных файлов? Зачем они нужны и можно ли их удалять? Давайте попробуем разобраться в этом.
Кроме самих видео на карте памяти присутствуют файлы двух типов: с расширениями .thm и .lrv, т.е. снимая один ролик мы получаем сразу три файла с одинаковым заголовком. Зачем камера их создает?
Файлы с расширением .thm - это картинки. На них запечатлен кадр из вашего видео, который используется в качестве превью в списке файлов при просмотре на самой камере или с телефона, подключенного к ней по Wi-Fi через приложение GoPro App (ранее называвшийся Capture). Иной функции эти файлы не несут, так что их можно смело удалять, вам они не понадобятся.
С файлами .lrv всё несколько интереснее. Это дубликат видео, которое вы сняли, только в очень низком разрешении. Оно так и расшифровывается - low resolution video. Именно эти файлы используются для просмотра ролика с телефона через официальное приложение, т.к. размер оригинального файла слишком велик для потокового просмотра через Wi-Fi. Кроме того, это сильно сажало бы батарею GoPro. Как и с файлами .thm, удаление .lrv никак не скажется на отснятом вами материале. Если вы захотите посмотреть отснятое видео с телефона через приложение, то оно предложит заново создать .lrv - файл, который сохранится уже не на карте памяти, в самом телефоне.
Эти же файлы можно использовать для облегченного монтажа: .lrv нельзя открыть без специального приложения, но, если вручную поменять расширение на .mp4, файлы можно будет просматривать через обычный видеоплеер или открывать в редакторе видео. Эта маленькая хитрость облегчит жизнь тем, кто обладает не очень мощным компьютером: при работе с видео вы сможете использовать эти файлы для монтажа и обработки, а при финальном сохранении готового результата - поменять путь файла-источника, заменив .mp4 низкого качества на нормальный файл, и программа обработает именно его. Таким образом вы упростите процесс пост-обработки видео и снизите нагрузку на компьютер. Схожий принцип используют профессиональные программы для видеомонтажа - Final Cut Pro или Adobe Premiere, создавая временные прокси-файлы. Во время монтажа вы также можете использовать .lrv-файлы вместо них.
Если вам нужно освободить место на карте памяти и вы не планируете использовать видео в низком разрешении для монтажа, то можете смело удалять все файлы, кроме файлов с расширением mp4.
Камеры GoPro становятся все более популярными из-за их видеоклипов с обзором на 360 градусов. 360-градусные видеоролики - это привлекательный способ записывать моменты и делиться ими в Интернете. Все больше и больше социальных сетей поддерживают видео в формате 360 градусов, например Facebook и YouTube. Какие форматы файлов поддерживаются GoPro? Как просматривать и редактировать файлы?
С Форматы файлов GoPro отличаются от каждой камеры GoPro, вам следует научиться просматривать или редактировать файлы с помощью подходящей программы. Просто прочтите статью, чтобы узнать все, что вам нужно знать о форматах файлов GoPro.
WidsMob Viewer Pro
WidsMob Media Viewer - просматривайте одно изображение, несколько изображений, изображения в папках и видео с невероятно высокой скоростью и простотой управления в различных режимах просмотра. Вы можете просматривать все свои фотографии (включая файлы RAW) и видео в одном окне без дополнительных щелчков мышью и операций.
Source code organization
Variable length coding
After all previous steps, the high frequency samples are stored with a variable length coding scheme using Huffman coding. A table then maps sample values to codewords with differing bit lengths where most common codewords are expressed in few bits and rare codewords are expressed in larger bits.
The lack of complexity is what makes VC-5 fast. Low pass filter is just addition. High pass filter is 6 tap where all coefficients are rational numbers and no multiplication or division is required. Variable length coding can be implemented with a lookup table, an approach that is faster than other entropy coding techniques.
Setup Source Code
Wavelet Transforms
The wavelet used within VC-5 is a 2D three-level 2-6 Wavelet. If you look up wavelets on Wikipedia, prepare to get confused fast. Wavelet compression of images is fairly simple if you don’t get distracted by the theory. The wavelet is a one dimensional filter that separates low frequency data from high frequency data, and the math is simple. For each two pixels in an image simply add them (low frequency):
- low frequency sample = pixel[x] + pixel[x+1]
- two inputs, is the ‘2’ part of 2-6 Wavelet.
For high frequency it can be as simple as the difference of the same two pixels:
- high frequency sample = pixel[x] - pixel[x+1]
- this would be a 2-2 Wavelet, also called a HAAR wavelet.
For a 2-6 wavelet this math is for the high frequency:
- high frequency sample = pixel[x] - pixel[x+1] + (-pixel[x-2] - pixel[x-1] + pixel[x+2] + pixel[x+3])/8
- i.e 6 inputs for the high frequency, the ‘6’ part of 2-6 Wavelet.
The math doesn’t get much more complex than that.
To wavelet compress a monochrome frame (color can be compressed as separate monochrome channels), we start with a 2D array of pixels (a.k.a image.)
If you store data with low frequencies (low pass) on the left and the high frequencies (high pass) on the right you get the image below. A low pass image is basically the average, and high pass image is like an edge enhance.
You repeat the same operation vertically using the previous output as the input image.
Resulting in a 1 level 2D wavelet:
For a two level wavelet, you repeat the same horizontal and vertical wavelet operations of the top left quadrant to provide:
Repeating again for the third level.
File Types
Following file types are discussed in this document:
RAW or CFA RAW - The Bayer RAW format is typically composed of 50% green, 25% red and 25% blue samples captured from sensor, e.g. RGGB and GBRG. The RAW image doesn’t carry metadata about image development e.g. exposure, white balance or noise etc, thus cannot easily be turned into a well developed image.
DNG - Widely regarded as a defacto standard, a DNG file can be opened natively on most operating systems and image development tools. As mentioned earlier, DNG stores compressed or uncompressed RAW sensor data along with accompanying metadata that is needed to properly develop image.
GPR - General purpose RAW format file. GoPro cameras including Hero5/6 and Fusion record photos in this format. GPR is an extension of DNG, enabling high performance VC-5 compression for faster storage and smaller files without impacting image quality. Today, GPR files can be opened in Adobe products like Camera Raw®, Photoshop® and Lightroom®.
VC5 - A file with VC5 extension stores RAW sensor image data in a compressed format that is compatible with VC-5. Similar to RAW file, VC5 file does not store metadata needed for proper image development.
PPM - Portable Pixel Map is one of the simplest storage formats of uncompressed debayered RGB image. It is very easy to write and analyze programs to process this format, and that is why it is used here.
JPG or JPEG One of the simplest formats for lossy compression of debayered RGB image.
The complete source of GPR-SDK, a library that implements conversion of RAW, DNG, GPR, PPM or JPG formats. GPR-SDK has C-99 interface for maximum portability, yet is implemented in C/C++ for programming effectiveness.
Source of VC-5 encoder and decoder library. Encoder is hand-optimized with NEON intrinsics for ARM processors.
gpr_tools - a sample demo code that uses GPR-SDK to convert between GPR, DNG and RAW formats.
vc5_encoder_app - a sample VC5 encoder application that encodes a RAW frame to VC5 file.
vc5_decoder_app - a sample VC5 decoder application that decodes VC5 file to RAW file.
CMake support for building all projects.
- macOS High Sierra with XCode v8 & v9, El Capitan with XCode v8
- Windows 10 with Visual Studio 2015 & 2017
- Ubuntu 16.04 with gcc v5.4
GPR is licensed under either:
3. GoPro Studio - редактор файлов GoPro.
Студия ГоПро - редактор формата файлов GoPro по умолчанию. Он имеет отличную высокую скорость, прост в использовании и позволяет пользователям конвертировать формат файла GoPro в MP4 и MOV. Теперь вы можете ознакомиться с основными функциями GoPro Studio.
1. Режим шаблонов упрощает процесс редактирования отснятого материала GoPro.
2. Совместимость с захватывающими 3D-видео на 360-градусных камерах GoPro.
3. С легкостью загружайте видеофайлы с камер GoPro на высокой скорости.
4. Предоставьте обширные инструменты редактирования, такие как звуковые дорожки, эффекты замедленного или ускоренного движения и точки редактирования.
Using vc5_decoder_app
vc5_decoder_app is an optional tool that can be used to decode VC5 essence into RAW image data, as shown below:
Часть 1. Какие форматы файлов записывают камеры GoPro
Существуют разные версии камер GoPro. Если у вас есть GoPro Hero 5, он будет записывать и сохранять 360-градусные видеофайлы в формате MPEG-4. Однако, если ваше устройство - GoPro Hero 2 или 3, вы обнаружите, что форматы файлов GoPro - это необычные видеоформаты, которые заканчиваются на LRV. Это видеофайл с низким разрешением. Преимущество формата файлов LRV GoPro - видеоформат MPEG-4 с разрешением 240P и частотой 29.97 кадров в секунду, что позволяет снизить энергопотребление компьютера во время процесса редактирования.
По мере развития технологии производитель GoPro выпускал все больше камер и обновлений программного обеспечения, чтобы пользователи могли использовать GoPro для съемки видео в формате высокой четкости (HD). GoPro Hero 4 Black, например, может записывать видео 4K 30 и 2.7K 60 ultra HD. Если вы попробовали, вы можете увидеть потрясающие видео 4K. Но вы можете понять, что Microsoft Media Player или другие видеоплееры плохо работают с форматом файлов HD GoPro.
Important Defines
Here are some important compile time definitions:
GPR_TIMING enables timing code that prints out time spent (in milliseconds) in different functions. In production builds, applications should define GPR_TIMING=0 . Set to a higher value to output greater timing information.
GPR_WRITING enables all code that writes GPR files. If application does not need to write GPR, set GPR_WRITING=0 to reduce code size.
GPR_READING enables all code that reads GPR files. If application does not need to read GPR, set GPR_READING=0 to reduce code size.
GPR_JPEG_AVAILABLE enables lightweight jpeg encoder located in source/lib/tiny_jpeg . This is used to write a small thumbnail inside GPR file. If GPR_JPEG_AVAILABLE=0 , thumbnail is not written, although you can still set pre-encoded jpeg file as thumbnail, by using -P, -W and -H command line options in gpr_tools .
NEON enables arm neon intrinsics (disabled by default). This can be enabled from CMake by -DNEON=1 switch.
4. Adobe Premiere Pro - редактор файлов GoPro.
Adobe Premiere Pro - профессиональный поставщик визуальных решений. Это больше, чем профессиональный редактор форматов файлов GoPro, но также и продвинутый видеоредактор с отличными эффектами, такими как Avatar и Hail Caesar.
1. Отредактируйте видео с камеры GoPro с помощью функций редактирования виртуальной реальности.
2. Расширенные шаблоны анимированной графики для редактирования фотографий и видео.
3. Редактирование по верхнему и заднему краям обрезает входную или конечную точку в видеоклипе.
4. Поддержка формата файлов GoPro до 8K. И вы можете редактировать видео в формате HD 360.
To Decode
Reverse all the steps.
A nice property of the Wavelet codec is scalability support: i.e. various resolutions ranging from original coded resolution to one-sixteenth resolution are encoded and can be retrieved efficiently. Scalability means that extracting lowest resolution is fastest and cost of extracting resolutions increases as resolution goes up. For application scenarios where rendering a smaller resolution suffices, a decoder can very cheaply extract lower resolution. Common examples of this use case are thumbnail previews in file browsers or rendering image on devices with smaller resolution e.g. mobile phones.
Scalability is more efficient than decoding full resolution image, performing demosaicing and downsampling. To avoid demosaic, DNG allows mechanism to store a separate thumbnail and preview image (often encoded in JPG). File browers use thumbnail, while preview is useful for rendering higher resolution version of image. Since these are separately enoded images and do not exploit compression amongst each other or with original RAW image, file sizes add up quickly.
As an example, GoPro Hero6 Black captures 4000x3000 RAW image in Bayer RGGB format. Red, blue and two green channels are split up and separately encoded into wavelet resolutions of 2000x1500 (or 2:1), 1000x750 (or 4:1), 500x375 (or 8:1). The Low-Low band of lowest resolution wavelet is a 250x188 (or 16:1) image, and it is stored uncompressed (generating thumbnail is essentially a memory copy). RGB images at other resolutions can be obtained at successive complexity levels, without performing demosaicing. To illustrate this, decoding speed of various resolutions is measured and shown using gpr_tools (in milliseconds inside square brackets).
Using vc5_encoder_app
vc5_encoder_app is an optional tool that can be used to convert RAW image data to VC5 essence, as shown below:
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Folder structure
Source code is organized inside source folder. All library and sdk code is located in lib folder, while all tools and applications that use lib are located in app folder.
The lib folder is made up of following folders:
- common - common source code that is accessable to all libraries and applications
- dng_sdk - mostly borrowed from Adobe DNG SDK version 1.4.
- xmp_core - Extensible Metadata Platform, mostly borrowed from Adobe DNG SDK version 1.4
- expat_lib - A stream-oriented XML parser borrowed from Adobe DNG SDK version 1.4
- vc5_decoder - vc5 decoder. If this is not present, cmake won’t use it (and define GPR_READING=0 ); otherwise cmake uses it (and defines GPR_READING=1 ).
- vc5_encoder - vc5 encoder. If this is not present, cmake won’t use it (and define GPR_WRITING=0 ); otherwise cmake uses it (and defines GPR_WRITING=1 ).
- vc5_common - common source code that is shared between vc5_encoder and vc5_decoder
- md5_lib - md5 checksum calculation library
- tiny_jpeg - lightweight jpeg encoder available here. If this folder is not present, cmake will not use it (and define GPR_JPEG_AVAILABLE=0 ); otherwise cmake defines GPR_JPEG_AVAILABLE=1 and uses it.
- gpr_sdk - uses all modules above to read/write GPR files.
The app folder is made up of following folders:
- common - common application level source code that is accessable to sample applications
- vc5_decoder_app - sample vc5 decoder application
- vc5_encoder_app - sample vc5 encoder application
- gpr_tools - utility to convert to/from various formats mentioned above and measure runtime
Compiling Source Code
Run following commands:
For Xcode, use command line switch -G Xcode . On Windows, CMake should automatically figure out installed version of Visual Studio and generate corresponding project files.
Mac build instructions, after running the above:
Linux build instructions, after running the above:
Советы по формату и использованию файлов LRV GoPro
Когда вы получите файл в формате LRV GoPro
Даже если вы используете последнюю версию GoPro 7 или GoPro 2018, вы все равно получаете файлы LRV, хранящиеся на вашей камере, после записи видео. Почему? Вот случаи, когда вы можете получить файл формата LRV GoPro.
1. Записывайте видео с некоторым разрешением с помощью HERO7 (белый, серебристый и черный), HERO (2018), HERO6 Black, Fusion, HERO5 Black, HERO5 Session или HERO4 Black / Silver.
2. Записывайте видео с помощью HERO3 + Black или Silver Editions, камеры HERO3: Black Edition или других.
3. У вас есть камера HD HERO2, HERO3: White Edition или HERO3: Silver Edition. И вы обновили последнее обновление программного обеспечения.
Как использовать формат файла GoPro LRV и THM
Как упоминалось выше, LVR - это сокращение от видео низкого разрешения и MPEG-4. Это дополнительные файлы для мобильного воспроизведения. Если вам не нужны файлы, вы можете удалить их, не повлияв на исходные файлы MP4 формата GoPro.
Формат файла THM может отображать эскизное изображение видеофайла, снятого камерой GoPro.
Using gpr_tools
Some example commands are shown below:
Convert GPR to DNG:
Extract RAW from GPR:
Convert DNG to GPR:
Analyze a GPR (or even DNG) and output parameters that define DNG metadata to a file:
Read RAW pixel data, along with parameters that define DNG metadata and apply to an output GPR (or DNG) file:
Read GPR file and output PPM preview:
Read GPR file and output JPG preview:
For a complete list of commands, please refer to data/tests/run_tests.sh
5. Animoto - приложение для редактирования файлов GoPro.
Animoto предоставляет онлайн-решение для редактирования форматов файлов и приложений GoPro для устройств iOS и Android. Просто используйте свое творчество, чтобы с легкостью персонализировать желаемое видео с помощью различных стилей.
1. Это редактор файлов SaaS GoPro с облачным сервисом без дополнительных программ.
2. Ограничьте загрузку одного видео размером менее 400 МБ с разрешением 1080P при 30 кадрах в секунду.
3. Поддержка и редактирование практически всех видеоформатов и файлов фотографий.
4. Более 50 различных стилей видео, сотни песен и многое другое.
Entropy Coding
After the wavelet and quantization stages, you have the same number of samples as the original source. The compression is achieved as the samples are no longer evenly distributed (after wavelet and quantization.) There are many many zeros and ones, than higher values, so we can store all these values more efficiently, often up to 10 times more so.
GPR-SDK API
GPR-SDK API is defined in header files in the following folders:
- source/lib/common/public
- source/lib/gpr_sdk/public
An application needs to include above two folders in order to access API. API defines various functions named gpr_convert_XXX_to_XXX which convert from one format to another. As an example, GPR to DNG conversion is done from gpr_convert_gpr_to_dng . When output file is GPR or DNR, gpr_parameters structure has to be specified. Fields in this structure map to DNG metadata tags, and we have tried to abstract low-level DNG details in a very clean and easy to use structure.
1. WidsMob Viewer Pro - программа для просмотра файлов GoPro.
WidsMob Viewer Pro - это универсальное средство просмотра и управления форматом файлов GoPro. Не только для видео форматов, но вы также можете просматривать фотографии и Файлы изображений RAW с видеокамер, таких как Nikon, Sony, Canon, Photoshop и др.
1. Просматривайте фотографии, файлы RAW и видео в программе без конвертации.
2. Щелкните один файл, чтобы легко загрузить все фото и видео в одну папку.
3. Воспроизведение, регулировка громкости, публикация форматов файлов GoPro в социальных сетях.
4. Просматривайте фото и видео в папке, в полноэкранном режиме, по эскизам и даже в слайд-шоу.
2. iMovie - программа для просмотра файлов GoPro.
IMOVIE - это бесплатная программа для просмотра файлов GoPro, которая поддерживает видео, снятые на iPhone и iPad, и видео 4K с GoPro, DJI, Sony и т. д. Вот основные особенности iMovie, которые вам следует знать.
1. Обеспечьте более 15 тем фильмов с видеофайлами AVCHD и MPEG-4.
2. Разрешение, которое может обрабатывать редактор форматов файлов GoPro, составляет до 4K.
3. Функция ручного отслеживания движения со стабильными функциями редактирования видео.
4. Кросс-платформенный видеоредактор для редактирования видео на iPhone и Mac.
Quantization
All that grey is easy to compress. The reason there is very little information in these high frequency regions is that the high frequency data of the image has been quantized. The human eye is not very good at seeing subtle changes in high frequency regions, so this is exploited by scaling the high-frequency samples before they are stored:
- high frequency sample = (wavelet output) / quantizer
Часть 2: Как просматривать и редактировать форматы файлов GoPro
Заключение
Как в полной мере использовать форматы файлов GoPro? Если у вас возникли проблемы с воспроизведением видео с камер GoPro, вы можете заранее узнать форматы файлов. Помимо LRV для мобильных устройств, вы можете найти видео в разрешении 4K. И они не поддерживаются проигрывателем Windows Media. Просто узнайте больше о лучших программах, чтобы с легкостью просматривать и редактировать форматы файлов GoPro.
The General Purpose Raw (GPR) is 12-bit raw image coding format that is based on Adobe DNG® standard. Image compression is a balance of speed, file size and photo quality, and typically one can only choose two. GPR was designed to provide a better tradeoff for all three parameters than what’s possible with DNG or any other raw format. The intention of GPR is not to compete with DNG, rather to be as close as possible to DNG. This guarantees compatibility with applications that already understand DNG, but provide an alternate compression scheme in situations where compression and encoding/decoding speed matter.
Action cameras, like that from GoPro, have limited computing resources, so ability to compress data using fewest CPU cycles matters. File sizes matter because GoPro cameras can record thousands of images very quickly using timelapse and burst mode features. As the world shifts from desktop to mobile, people now shoot and process more and more photos on smartphones which are always limited on storage space and bandwidth. And last but not the least, image quality matters because we want GPR to provide visually transparent image quality when compared to uncompressed DNG. All this combined enables customers to capture DSLR-class image quality in a GPR file that has nearly same size as JPEG, on a camera that is as small and rugged as a GoPro.
DNG allows storage of RAW sensor data in three main formats: uncompressed, lossless JPEG or lossy JPEG. Lossless mode typically achieves 2:1 compression that is clearly not enough in the mobile-first age. Lossy mode uses the 8x8 DCT transform that was developed for JPEG more than 25 years ago (when photo resolutions were much smaller), achieving compression ratios around 4:1. In comparison, GPR achieves typical compression ratios between 10:1 and 4:1. This is due to Full-Frame Wavelet Transform (FFWT). FFWT has a few nice properties compared to DCT:
- The compression performance increases as image resolutions go up - making it more future proof
- Better image quality as it does not suffer from ringing or blocky artifacts observed in JPEG files.
The wavelet codec in GPR is not new, but has been a SMPTE® standard under the name VC-5. VC-5 shares a lot of technical barebones with the CineForm®, an open and cross-platform intermediate codec designed for high-resolution video editing.
Run length
The output of the quantization stage has a lot of zeros, and many in a row. Additional compression is achieved by counting runs of zeros, and storing them like: a “z15” for 15 zeros, rather than “0,0,0,0,0,0,0,0,0,0,0,0,0,0,0”
Читайте также: