Cfhd Codec Vlc

GoPro CineForm® is a 12-bit, full-frame wavelet compression video codec. It is designed for speed and quality, at the expense of a very high compression size. Image compression is a balance of size, speed and quality, and you can only choose two. CineForm was the first of its type to focus on speed, while supporting higher bit depths for image quality. More recent examples would be Avid DNxHD® and Apple ProRes®, although both divide the image into blocks using DCT. The full frame wavelet as a subject quality advantage over DCTs, so you can compression more without classic ringing or block artifact issues.

Pixel formats supported:

  • 8/10/16-bit YUV 4:2:2 compressed as 10-bit, progressive or interlace
  • 8/10/16-bit RGB 4:4:4 compressed at 12-bit progressive
  • 8/16-bit RGBA 4:4:4:4 compressed at 12-bit progressive
  • 12/16-bit CFA Bayer RAW, log encoded and compressed at 12-bit progressive
  • Dual channel stereoscopic/3D in any of the above.

VLC could not decode the format 'CFHD' (CineForm)' So far to get around this I've used this plugin, but it's limited to 2.2.4 and it has some bugs in playing multiple video files. Does anyone else have the same issue? I tried on another machine with no luck. Codec not supported: VLC could not decode the format 'CFHD' (No description for this codec) jbk on Feb 2, 2016. This codec was RE'd 2 weeks ago and was merged in FFmpeg and libavcodec this weekend, by a member of the VideoLAN non-profit organization. Expect it in VLC.

Compression ratio: between 10:1 and 4:1 are typical, greater ranges are possible. CineForm is a constant quality design, bit-rates will vary as needed for the scene. Whereas most other intermediate video codecs are a constant bit-rate design, quality varies depending on the scene.

  • The complete source to CineForm Encoder and Decoder SDK. C and C++ with hand-optimized SSE2 intrinsics for x86/x64 platforms, with cross platform threading.
  • TestCFHD - demo code for using the encoder and decoder SDKs as a guide to adding CineForm to your applications.
  • WaveletDemo - a simple educational utility for modeling the wavelet compression.
  • CMake support for building all projects.
  • Tested on:
    • macOS High Sierra with XCode v8 & v9
    • Windows 10 with Visual Studio 2015 & 2017
    • Ubuntu 16.04 with gcc v5.4

CineForm-SDK is licensed under either:

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

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.

Setup

Clone the project from Github (git clone https://github.com/gopro/cineform-sdk).You will need CMake version 3.5.1 or better for the full SDK.WaveletDemo is just three files: wavelets.c, utils.c, utils.h so it can be easy build without CMake.

Using TestCFHD

After building it.

This tool uses the just build CineForm SDK to compress and decompress a generated image, testing the codec with a range of images and pixel formats. Open TestCFHD.cpp to learn of configuration options.

Configuring TestCFHD

Within Example/TestCFHD.cpp, here are some key configuration controls:

The TestCFHD defaults to using the asynchronous encoder for the greatest performance on multi-core systems, which encodes ‘n’ frames simultaneously. For the highest performance, the number of frames to encode at once should match the number of CPU threads available, set by POOL_THREADS. To keep you CPU busy, have a POOL_QUEUE_LENGTH greater than the number of CPUs.

Asynchronous performance on a 4Ghz 8 core Broadwell E system:

Decoding Existing Files

As this is origin source it should decode all existing CineForm AVI or MOV files. Two sample files have been included showing YUV 4:2:2 and RGB 4:4:4 encoding.

Using WaveletDemo

Cfhd Codec Vlc

After building it.

Files showing the decoded image, and differences and stored within ..data

Configuring WaveletDemo

Within Example/WaveletDemo/wavelets.c: here are some key configuration controls:

Play with the BITDEPTH, to see the impact on quality. Change the number of LEVELS to see how wavelets work. Set the ERRORGAIN to amplify the difference between the source and the decoded image. Increase the GENERATIONS to see it makes very little difference on the quality.

Cfhd Codec Vlc

The CineForm video codec was developed in between 2001 and 2002 as a light weight compressed alternative for DV or other consumer formats of the time. However its notoriety wouldn’t come unto around 2003 when CineForm HD when was developed, which moved the codec a from consumer 8-bit YUV, to offering 10-bit YUV and 12-bit RGB/RGBA for more professional digital intermediate work. The codec was ideal for the transition to HD, as its efficiency improved with the resolution increase, a bonus of it being a native Wavelet codec. Also as wavelet’s can be designed to do sub-resolution decoding at a very high rate, editing of HD would perform like SD (fast) whenever needed.

Cfhd

CineForm RAW was added in 2005, the first to offer substantial compression directly from CFA Bayer image sensor data. Once RAW was a compression profile, this is when CineForm stopped being like other codecs, which strive to encode (compress) and decode (decompress) to the same or as close as possible to the source image. Compressing RAW was straight forward, but decompressing back to RAW didn’t help the workflow, as most video editing tools (even today) do not handle native RAW well. To support RAW workflows the CineForm decoder would “develop” the image, applying demosaicing filters, color matrices, CDL color corrections and 3D LUTs before presenting the decoded image to the NLE, compositor or video editing tool. CineForm is still the only codec that does this, it was marketed as Active Metadata.

Active Metadata was used to enable stereoscopic 3D encoding and presentation, the third significant major feature addition to the codec core (first HD, second RAW.) The 3D support within the CineForm codec, was one of the reasons leading to the CineForm acquisition by GoPro in 2011.

Codec

Over the last six years at GoPro, the CineForm codec has been licensed to Adobe, FXHome and others and was tweaked and made into a standard through SMPTE as VC-5. VC-5 is a superset of the CineForm compression engine, it is better defined and can handle more pixel formats and resolutions than CineForm, although doesn’t include the Active Metadata engine, nor does it have a performance implementation for video yet. GoPro added VC-5 to their GoPro Hero5/6 Black edition cameras for compressing RAW photos – in camera a 24MByte DNG would be stored as a 4-7MByte GPR file using VC-5 compression.

There is a fourth wave for the original CineForm, as resolution goes beyond 4K, the benefits of wavelet compression are seen again. This demand for higher resolution is coming from 360° video production. GoPro’s Omni 360° rig would output 8Kp30 or 6Kp60 as CineForm files, as there is little else with the efficiency and performance to encode such demanding content. The upcoming GoPro Fusion, and small form-factor 360° camera shooting over 5K, will lead to a lot more CineForm content.

Wavelet Transforms

The wavelet used within CineForm is (mostly) a 2D three-level 2-6 Wavelet. As that will mean very little to most, the WaveletDemo has been included to help learn the principles. 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.

Vlc Codecs Windows 10

Quantization

All that grey is easy to compress. The reason there is very little information seen in these high frequency regions of the image (generated from WaveletDemo) is the high frequency data 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

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.

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”

Variable length coding

After all previous steps the high frequency samples are stored with a variable length coding scheme. In CineForm classic Huffman coding is used. Again a lot of theory is turned into a table which maps sample values to codewords with differing bit lengths – not a lot of complexity.

The lack of complexity is what makes CineForm fast.

To Decode

Reverse all the steps.

While I showed that the steps involved are fairly simple, and much can be modeled in only 800 lines of source code (WavetletDemo), the CineForm SDK is currently over 160k lines of code. There are many paths through the CineForm codec that where hand-optimized, each path for different source pixel format – back in 2003 realtime encoding of 1920x1080 was bleeding edge. There are also older bitstream formats supported by the SDK, even a 3D wavelet (volumetric, not stereoscopic) from 2003 which compressed two frames into one crazy wavelet. There are old tools for handling interlaced that are quite different than progressive image encoding. Finally there is all the Active Metadata code for color development, stereoscopic and 360 projection, which extends this codec to being a lightweight video editing engine – all the realtime effects within GoPro Studio use this engine.

← Back to VLC Features
This is a new page that lists the audio/video codecs that VLC can or cannot read. It is still under development, don't hesitate to add a some FourCC and infos.

It should now be a bit more complete than the official features page on VideoLAN website.

If you have any question about those codecs, just consult our Knowledge Base or our friends on the Multimedia Wiki. If you don't find information, search with Wikipedia or Google.

  • 1Video Codecs

Video Codecs

Widely Used Video Codecs

Most used Video Codecs
NameFOURCCPlayableEncoderlibraryComment
MPEG-1 Part 2mpeg, mp1v, mpg1, PIM1YesYeslibmpeg2 , ffmpeg
MPEG-2 Part 2mp2v, mpg2, vcr2, hdv1, hdv2, hdv3, mx*n, mx*pYesYeslibmpeg2 , ffmpeg
MJPEG (A/B)YesYesffmpeg
Divx (1, 2, 3)DIV1, DIV2, DIV3, mp41, mp42, MPG4, MPG3YesYesffmpeg
DivX 4, 5, 6 , 3ivx D4, MPEG-4DIV4, DIV5, DIV6, col1, col0, 3ivdYesYesffmpeg
MPEG-4 Part 2 (AVP), XvidDIVX, Xvid, mp4s, m4s2, xvid, mp4v, fmp4, 3iv2, smp4, ...YesYesffmpeg
H.261h261YesYesffmpeg
H.262h262YesYesffmpegSame as MPEG-2 Video
H.263 / H.263ih263YesYesffmpeg
H.264 / X.264

(MPEG-4/AVC) (MPEG-4 Part.10)

h264, s264, AVC1, DAVC, H264, X264, VSSHYesYesffmpeg (decode), x264 (encode)
Sorenson 1 (Quicktime)SVQ 1YesYesffmpeg
Sorenson 3 (Quicktime)SVQ 3YesNoffmpeg
DVYesYesffmpeg
CinepakcvidYesNointernal, ffmpeg
TheorathraYesYes, violatedlibtheora
WMV 1/2 (7/8)wmv1, wmv2YesYesffmepg
WMV 3 / WMV-9 / VC-1wmv3, wvc1, wmvaYesNoffmpegNot all profiles are supported. See DMO.
On2 VP3,VP31, VP30, VP3YesNoffmpeg
On2 VP5VP50, VP5, VP51YesNoffmpeg
On2 VP6 (used by FLV)VP60, VP61, VP62, VP6F, VP6AYesYesffmpeg
On2 VP7VP7NoNo
Flash Screen VideoFSV1YesYesffmpeg
Indeo Video 3IV31, IV32YesNoffmpeg
Indeo Video 4/5IV41, IV51YesNolibavcodec
Real Video 1.0, 1.3, 2.0RV10, RV13, RV20YesYesffmpeg
Real Video 3.0, 4.0RV30, RV40NoNo
DiracBBCDYesYesdirac
Huffyuv / LagarithYesYesffmpeg

Rarer Video Codecs

Less Used Video Codecs
Rare codecsFOURCCDecoderEncoderlibraryComment
Apple Animation, Graphics, Video, QuickDraw'rle','smc ','rpza', 'qdrw'YesNoffmpeg
SheerVideoNoNoProfessional use, no open source decoders
CorePNG????
MSU Lossless????
SnowYesYes
Pixlet????
Rare codecs (Asus V1, Asus V2)ASV1, ASV2YesYesffmpeg
Game Codecs (Some)YesNoffmpeg
TarkinNoNo
QPEGQPEGYesuntested ???ffmpeg

Audio Codecs

Audio Codecs Status
NameFOURCCDecoderEncoderlibraryComment
MPEG-Audio 1 Layer-1/2mpgaYesYeslibmad (decoding), twolame (encoding)ISO/IEC MPEG
MP3mp3, .mp3, LAMEYesYeslibmad (decoding), ffmpeg-mp3lameISO/IEC MPEG - (recompile needed for encoding)
AACmp4aYesYesfaad (decode), faac (encoding)ISO/IEC MPEG
HE-AACYesuntested ???faad (decode), libaacplus + ffmpeg (encoding)ISO/IEC MPEG, AAC+ encoding through libaacplus + ffmpeg (patched) - untested

RECOMPILE VLC & ffmpeg for this Audio codec

AC-3a52, a52bYesYesliba52 (decode), ffmpeg (encode)
ATRACatrcYesNo
iLBCILBC, ilbcuntested ???untested ???QuickTime (decode)(check for encoder and free decoder)
Mu-LawYesNoffmpeg(check for encoder)
NellyMoserYesNoffmpeg
QCELP (PureVoice)QclpYesNo?ffmpegUsually in QCP container. buggy?
Real AudiolpcJ, 28_8, dnet, sipr, cook, atrc, raac, racp, ralfYesNoSome work. Half don't
ShortenshrnNoNoffmpeg and ffplay do it. VLC doesn't. (It is in the FOURCC list in VLC's modules/codec/avcodec/fourcc.c --Dionoea)
SpeexspexYesYeslibspeex
VorbisvorbYesYeslibvorbis
DTSdtsYesNolibdcaDTS-HD unsupported
MPCYesNolibmpcdec
WMA 1/2wma1, wma2YesYes, violatedffmpegWMA9 is not supported
FlacflacYesYeslibflaclossless
Apple Lossless Audio CodecalacYesNoffmpeglossless
Monkey's AudioYesNolossless
MusepackYesNolibmpcdec
ADMPCM (various)YesYesffmpeg and internal
AMRsamrYesYesffmpeg + libamrnb + libamrwbRECOMPILE VLC for this Speech codec
SonicSONCYesYesffmpeg

Cfhd Codec For Vlc

Subtitles Codecs

Transcluded from Subtitles codecs
Subtitles Status
Subtitle NameExtensionSubtitle TypeCharacter EncodingLine BreakText StylingMetadata InfoTimingsTiming PrecisionVLC media player Support
AQTitle*.aqtText-basedNoneYesNoNoFramingsDependent on FrameYes (0.9.0 and over)
Blu-RayN/AImage-basedN/AN/AN/ANoElapsed TimeUnknownYes (1.1.0 and over)
CVD subtitles*.cvdImage-basedN/AN/AN/ANoElapsed TimeUnknownYes
DKS*.dksText-basedNoneYesNoNoElapsed TimeUnknownYes (0.9.0 and over)
DVB subtitlesN/A (in DVB streams)Image-basedN/AN/AN/ANoElapsed TimeUnknownYes
DVD subtitlesN/AImage-basedUnknownUnknownUnknownUnknownUnknownUnknownUnknown
JACOsub*.jssText-basedNoneYesYesNoElapsed Time10 Milliseconds (1/100th sec)Yes (0.9.0 and over), no styles
KateN/A (inside OGG)Text-basedNoneYesYesNoUnknownUnknownYes (0.9.0 and over), no styles
MicroDVD*.subText-basedNoneYesNoNoFramingsDependent on FramesYes
MPEG-4 Timed Text.ttxtXMLUnknownUnknownYesNoElapsed Time1 MillisecondYes
MPL2*.mpl/.txtText-basedNoneYesNoNoSequential Time100 Milliseconds (1/10th sec)Yes, no italic
MPSub*.subText-basedNoneYesNoYesSequential Time10 Milliseconds (1/100th sec)Yes (0.9.0 and over)
OggWritN/A (inside Oggs)Text-basedNoneNoYesYesSequential GranulesDependent on Bitstreamuntested ???- Not specified yet.
Phoenix Subtitle*.pjsText-basedNoneNoNoNoFramingsDependent on FramesYes (0.9.0 and over)
PowerDivX.psbText-basedNoneNoNoNoElapsed Time1 SecondYes (0.9.0 and over)
RealText / SMIL*.rtHTML-basedUnicode (UTF-8)YesYes (SMIL)NoElapsed Time10 Milliseconds (1/100th sec)Yes (0.9.0 and over)
SAMI*.smiHTML-basedUnicode (Windows-1252)YesYes (CSS)YesFramingsDependent on FramesYes
Structured Subtitle Format.ssfXMLNoneNoYesYesElapsed Time1 MillisecondNo
SubRip*.srtText-basedInformally UnicodeYesNoNoElapsed Time1 Millisecond (1/1000th sec)Yes
SubStation Alpha*.ssa/.assText-basedNoneNoYesYesElapsed Time10 Milliseconds (1/100th sec)Yes, 0.9.0 and over
SubViewer*.subText-basedNoneYesNoYesElapsed Time10 Milliseconds (1/100th sec)Yes
SVCD subtitles*.svcdImage-basedN/AN/AN/ANoElapsed TimeUnknownYes
TeletextUnknownText-basedUnknownUnknownUnknownUnknownUnknownUnknownYes
Universal Subtitle*.usfXMLUnicode (UTF-8)NoYes (XML DTD)NoElapsed Time1 Millisecond (1/1000th sec)Yes, 0.9.0 and over
VobSub*.sub, *.idxImage-basedN/AN/AN/AN/AElapsed Time1 Millisecond (1/1000th sec)Yes
VPlayer*.txtText-basedNoneYesNoNoFraming or Time10 Milliseconds (1/100th sec)Yes
XSUB (DivX subtitles)N/A (embedded in .divx)Image-basedN/AN/AN/ANoElapsed Time1 MillisecondYes (1.1.0 and over)

Codecs For Vlc Media Player

Format/Container/Muxers

Muxer
NameextensionsPlayableSavableComment
3GP.3gpYesuntested ???
AIFF.asf, .wmvYesNo
ASF.asf, .wmvYesYes
AU.auYes
AVI.aviYesYes, violated
DMFuntested ???untested ???
FLV.flvYesYesthrough ffmpeg
MOV.movYesYes
MP4.mp4YesYes
OGG.ogm, .oggYesYes
MKV.mkv, .mkaYesNo, WIPSummer of Code 2007 Project
MPEG-2 / TS.ts, .mpgYesYes
MPEG-2 / ES, PS, PVA, MP3.mpg, .mp3, .mp2YesYes
NSC.nscYesNo
NSV.nsvYesNo
Nut.nutYesYesMuxable through libavformat
Real.ra, .ram, .rm, .rv , .rmbvPartialNoversion 4 and 5, no support for version 3
Raw (a52, dts, aac, flac, .dv, .vid).a52, .dts, .aac, .flac, .dv, .vidYes??
True Audio Codec.tta, .tacYesNo
Ty Tivo.tyYesNo
Wav.wav, .dtsYesYes
Xa.xaYesNo

HD-Discs codecs

Transcluded from HD-Discs codecs
HD-Disc codecs support
CodecVLC 1.0VLC 1.1VLC 1.2VLC 3.0.6Remarks
H.264YesYesYesGPU acceleration recommended
VLC DxVA2 or VLC VAAPI.
VC-1PartialPartialPartialVC-1 Interlaced isn't ready
MPEG-2YesYesYesFFmpeg or libmpeg2
EAC3YesYesYesFFmpeg, libavcodec > 52.0
TrueHDYesYesYesFFmpeg, libavcodec > 52.40
DTS CoreYesYesYeslibdca or FFmpeg
DTS-HD Master AudioNoNoNoCore is played
Blu-Ray SubtitlesNoYes, libavcodec > 52.40YesFFmpeg
HD-DVD SubtitlesNoNoNo
HD-DVD Files (.evo)NoNoNo
Blu-Ray foldersPartialPartialPartial
DiscsNoNoPartial


Retrieved from 'https://wiki.videolan.org/index.php?title=VLC_Features_Formats&oldid=60792'