Log in

View Full Version : vfr to cfr


Santa
19th April 2011, 09:22
I have a quicktime clip that at mediainfo looks like this:

General
Complete name : Clip.mov
Format : QuickTime
Format/Info : Original Apple specifications
File size : 9.27 GiB
Duration : 8mn 4s
Overall bit rate : 164 Mbps
Encoded date : UTC 2011-04-08 18:33:49
Tagged date : UTC 2011-04-08 18:42:14
Writing library : Apple QuickTime
Original source medium : 001
Media/UUID : 225A10DD-924B-4B0D-8D0C-93CD48B47DF6

Video
ID : 1
Format : ProRes
Format profile : High
Codec ID : apch
Duration : 8mn 4s
Bit rate mode : Variable
Bit rate : 164 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 6.067 fps
Maximum frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bits/(Pixel*Frame) : 3.308
Stream size : 9.27 GiB (100%)
Language : English
Encoded date : UTC 2011-04-08 18:42:14
Tagged date : UTC 2011-04-08 18:42:14

Menu
ID : 3
Language : English
Encoded date : UTC 2011-04-08 18:42:14
Tagged date : UTC 2011-04-08 18:42:14

as you can see

Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 6.067 fps
Maximum frame rate : 23.976 fps

indicate that the clip has a variable framerate.
I'd like to convert the clip to a constant framerate one to be able to load it on a player machine that supports only cfr files.
Is there a way to convert the clip to 24 fps?
I'm looking for a method to avoid compression and obtain an "untouched" video apart from the vfr->cfr conversion and a method to encode it with x264 but the hardest thing to me is the vfr->cfr conversion.

Nephilis
19th April 2011, 10:15
- for vfr->cfr conversion => add "convertfps=true" parameter in DirectShowSource
- from 23.976 to 24 fps => add AssumeFPS(24) in your avs.

Santa
19th April 2011, 13:43
will it keep the 4:2:2 chroma subsampling?
how to obtain the video converted in cfr but without encoding? (uncompressed)

i can make an avs with "convertfps=true" parameter in DirectShowSource and "AssumeFPS(24)" but how to generate the uncompressed video with these settings?

poisondeathray
19th April 2011, 14:40
will it keep the 4:2:2 chroma subsampling?


It depends how you have directshow filters setup. Sometimes there maybe a colorspace filter inserted (conversion to RGB)

Processing with avisynth will convert it to 8-bit instead of 10-bit


how to obtain the video converted in cfr but without encoding? (uncompressed)

I don't think it's possible. If you use avisynth, it frameserves uncompressed video


i can make an avs with "convertfps=true" parameter in DirectShowSource and "AssumeFPS(24)" but how to generate the uncompressed video with these settings?
Use an encoder that accepts avs scripts. E.g. virtualdub (in video=>fast recompress mode)

sneaker_ger
19th April 2011, 19:56
I'd also try a simple remux with e.g. mp4box and see if the sync is lost. Sometimes these seemingly VFR files are pretty much CFR and the MediaInfo output is misleading.

poisondeathray
19th April 2011, 20:01
I'd also try a simple remux with e.g. mp4box and see if the sync is lost. Sometimes these seemingly VFR files are pretty much CFR and the MediaInfo output is misleading.


prores is not supported by mp4 container

sneaker_ger
19th April 2011, 20:12
Ah, only saw Apple and assumed H.264.
Still it should be kept in mind to try the equivalent option in the encoder/muxer he's gonna end up choosing.

Overdrive80
19th April 2011, 23:30
Maybe it could help you http://avisynth.org/mediawiki/VFR#converting_vfr_to_cfr_avi_for_AviSynth

Santa
21st April 2011, 11:02
I'm not able to import the mov file using directshowsource.
i'm trying to import it with qtinput but i cannot load qtsource.dll plugin: it tells me that it is unable to load qtsource.dll.

i'm using avisynth 64 maybe qtsource.dll is not compatible with 64bit version of avisynth?

TheFluff
22nd April 2011, 00:59
Try ffvideosource("herp.mov",fpsnum=24000,fpsden=1001).

Santa
28th April 2011, 09:03
avs script:

LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins64\ffms2.dll")
FFVideoSource("C:\Users\Admin\Desktop\BARS AND TONE.mov",fpsnum=24000,fpsden=1001)

Problem:
Avisynth open failure:
Script error: there is no function named "FFVideoSource"
(C:\Users\Admin\Desktop\test.avs, line 2)

My OS is Windows 7 x64 and I installed avisynth 64 and downloaded the 64bit version of ffms2.dll from here: http://code.google.com/p/ffmpegsource/downloads/detail?name=ffmpegsource-2.15-mt-avs64.7z

I tried also this version: http://ffmpegsource.googlecode.com/files/ffms2-mt-r459-avs64.7z

Am I doing something wrong?

TheFluff
28th April 2011, 13:45
ffms2-64 is a C plugin, so try loading it with LoadCPlugin().