Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd February 2016, 00:32   #1  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Cineform Decoder now in ffmpeg

nice job kieranrk!

https://medium.com/@kierank_/reverse...e1c#.tcm0sjtmi

ffmpeg -codecs

Code:
.
.
 D.V.L. cfhd                 Cineform HD
.
.

I know it's early but some early observations/test data

UHD 10bit 4:2:2 cineform stream

VFW decode through official cineform decoder (via avisynth, avsmeter) ~85FPS
ffmpeg decode ~15FPS

Last edited by poisondeathray; 2nd February 2016 at 01:25.
poisondeathray is offline   Reply With Quote
Old 2nd February 2016, 10:43   #2  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
Interesting, so for now I can conclude that ffmpeg decoder is substantially slower than ffmpeg prores one?
smok3 is offline   Reply With Quote
Old 2nd February 2016, 23:56   #3  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Even if it's than give it some time and it will be way faster. Cineform can be faster than ProRes and because it's wavelet based than decoding to 1/4, 1/8 etc resolution can be blazing fast. It's quite useful feature to be able to watch 4K file at half res on very low CPU. You can't do it with any DCT based codec.
You should be able to decode 4K 60p Cineform on dual core i3 without problems. Original decoder is very fast, so lets hope ffmpeg will be the same soon.

Last edited by kolak; 3rd February 2016 at 00:00.
kolak is offline   Reply With Quote
Old 2nd February 2016, 23:59   #4  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,340
The FFmpeg decoder is not optimized yet, nor is it fully complete yet when it comes to all variations of CineForm, so yes, give it time.
From what I've been told by kierank, he thinks it can be made really fast.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 3rd February 2016, 00:02   #5  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Exactly- if original decoder can be fast than I'm sure community can make ffmpeg one very fast also.
Just typical optimisation gives 3-4x speed boost compared to some basic/first code no?
kolak is offline   Reply With Quote
Old 3rd February 2016, 15:59   #6  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 697
That's great! I was convinced that patents do not allow. Codec are not responsive to the color matrix. I think it is a bad writing yuv444p12le as gbrp12le (10 bpc).
Of course, I lack BT2020.
Jamaika is offline   Reply With Quote
Old 3rd February 2016, 17:37   #7  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
CF has 12bit RGB mode. You can have whatever video data you want as CF- rest is just flagging.

Last edited by kolak; 3rd February 2016 at 17:39.
kolak is offline   Reply With Quote
Old 3rd February 2016, 18:36   #8  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 697
I'm surprised. AVI codec description is misleading.
Jamaika is offline   Reply With Quote
Old 3rd February 2016, 20:33   #9  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
AVI container is crap- no standardised matadata, timecode, field order etc.
You better to use MOV or MXF.
kolak is offline   Reply With Quote
Old 12th February 2016, 02:08   #10  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
If you do have files that don't play - please let me know.

Upload them here:
https://trac.ffmpeg.org/ticket/1087
kieranrk is offline   Reply With Quote
Old 12th February 2016, 12:41   #11  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
It does work for files that premiere calls "10 bit yuv" and does not work with files that premiere calls "12 bit RGB with alpha".
smok3 is offline   Reply With Quote
Old 12th February 2016, 13:04   #12  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 697
Test decoder Cineform yuv422p10le:
Three films and three different screenshots output.

Code:
for %%f in ("%~dp1*.avi") do ffmpeg.exe -loglevel info -y -i %%f -ss 00:00:00.500 -f image2 -c:v png -frames:v 1 -pix_fmt rgb48be %%~nf.png
yuv422p10 noRGB, noBT709 | size file: 77.127.688
yuy422p10 RGB | size file: 83.961.528 --> color change
yuv422p10 BT709 | size file: 77.174.536 --> color change

Last edited by Jamaika; 12th February 2016 at 13:19.
Jamaika is offline   Reply With Quote
Old 17th February 2016, 12:15   #13  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
AFAIK vfw encoder uses these options to convert RGB to YUV when you feed it RGB, but it does not store these options nowhere in video.
This is easy to confirm when you read from vfw back as RGB, the colors will be different depending on what options are set (while typing I got feeling that I need to doublecheck this again).
Btw from my research "use video systems RGB" has same meaning as "full range", can someone please confirm it.

edit:
I repeated my tests and now it looks more complicated.
"enc:709" option is always preserved within video. When sending RGB it is used for conversion. When sending yuv (v210) it is just saved without affecting data.
"dec:709" option is never used at all, instead it behaves like it is retrieved from the video.
"enc:video rgb" option affects conversion when sending RGB but never saved in video (or never retrieved by decoder, I have no way to know).
"dec:video rgb" used when decoding as RGB.

So what it means for ffmpeg decoder, at least it has chance to setup 601/709 choice.

Last edited by shekh; 18th February 2016 at 11:03.
shekh is offline   Reply With Quote
Old 21st April 2016, 22:18   #14  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Re: the encoder.

Great stuff ! I can now convert some archived Cineform.avi edits encoded with the Cineform vfw codec (via AVISynth/VDub) to mov files for loading in DaVinci Resolve 12 (the Windows standalone version, now 12.5 beta). Resolve wouldn't even acknowledge the Cineform.avi files, but accepts the "re-wrapped" mov files just fine.
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 21st April 2016, 23:23   #15  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Quote:
Originally Posted by WorBry View Post
I can now convert some archived Cineform.avi edits...
Are you sure anything has changed? Re-wrapping does not care about cineform codec (avi->mov conversion worked fine for me 2 years ago).

ps. Glad you found the solution that suits you
__________________
VirtualDub2

Last edited by shekh; 21st April 2016 at 23:32.
shekh is offline   Reply With Quote
Old 22nd April 2016, 03:45   #16  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Quote:
Originally Posted by shekh View Post
Are you sure anything has changed? Re-wrapping does not care about cineform codec (avi->mov conversion worked fine for me 2 years ago).
Oh you're right of course - it's just a direct stream copy.

I only started using Resolve a few days back, and every NLE I used or tried-out before (that supports third-party vfw codecs) accepted these Cineform.avi files without any problem. So I hadn't had need to convert to mov files until now.

Quote:
Originally Posted by shekh View Post
Glad you found the solution that suits you
Yes, I was delighted to find that merely "re-wrapping" to mov is the solution. At first, I figured the reason why these Cineform.avi files were not accepted by Resolve was because they lacked some "legitimacy" metadata - given that the Cineform.avi render files created by Resolve are (of course) accepted as are those produced from GoPro Studio and Vegas.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 22nd April 2016 at 04:18.
WorBry is offline   Reply With Quote
Old 22nd April 2016, 09:48   #17  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
You could make just QT ref files with QT 7 PRO and this should also work.
kolak is offline   Reply With Quote
Old 22nd April 2016, 12:34   #18  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
I don't have QT 7 Pro, but thanks, that's useful to know.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 22nd April 2016 at 12:36.
WorBry is offline   Reply With Quote
Old 23rd June 2016, 19:18   #19  |  Link
ianken
Guest
 
Posts: n/a
Oh god, where was this last year when I had to build a solution to migrate 100k+ Cineform mezzanine files to H264? Oh, huge manatee!
  Reply With Quote
Old 9th January 2017, 19:18   #20  |  Link
zcream
Registered User
 
Join Date: Sep 2007
Location: Sydney Australia
Posts: 33
Is the Cineform option also available in the OSX build ? Not sure if there are any extra options to include when I build with homebrew.
zcream is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.