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 > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th September 2009, 09:44   #1  |  Link
nakTT
Registered User
 
Join Date: Dec 2008
Posts: 415
x264: Variable Frame Rate

Can x264 do variable Frame Rate encoding? If it can, what are the pros and cons? Is it advisable to use it for 500kbps output to backup movies? Will it effect the audio sync?

nakTT is offline   Reply With Quote
Old 5th September 2009, 10:30   #2  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
x264: no, but framerate isn't a codec-level problem at all. (Even if the elementary stream technically has a framerate.) Look in the containers forum for advice on doing that, search for VFR or Variable framerate. There are a number of tools to do it in MKV, MP4, or MPG, especially when you use avisynth. (Maybe TS by now.)
foxyshadis is offline   Reply With Quote
Old 5th September 2009, 10:33   #3  |  Link
nakTT
Registered User
 
Join Date: Dec 2008
Posts: 415
Quote:
Originally Posted by foxyshadis View Post
x264: no, but framerate isn't a codec-level problem at all. (Even if the elementary stream technically has a framerate.) Look in the containers forum for advice on doing that, search for VFR or Variable framerate. There are a number of tools to do it in MKV, MP4, or MPG, especially when you use avisynth. (Maybe TS by now.)
Thanks for the info mate.

TS? As in "Thread Starter"? I'm not quite understand. Sorry for my English.
nakTT is offline   Reply With Quote
Old 5th September 2009, 13:00   #4  |  Link
JohannesL
AviSynth/x264 user
 
JohannesL's Avatar
 
Join Date: Jan 2009
Posts: 149
Transport stream.
__________________
archlinux
JohannesL is offline   Reply With Quote
Old 29th August 2013, 21:53   #5  |  Link
onlysublime
Registered User
 
Join Date: Sep 2003
Location: Los Angeles, CA
Posts: 4
Do not use variable framerate! This is after doing some video editing in Adobe Premiere and having to work with some variable framerate recorded videos. The videos play back fine in players because there are contingencies for this type of video. But in video editors like Adobe Premiere, you have a good chance of getting audio/video sync problems. And these problems are driving me mad.

Does anyone have an easy solution for converting variable framerate videos without losing quality so that I can use these videos in Adobe Premiere?
onlysublime is offline   Reply With Quote
Old 29th August 2013, 22:07   #6  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
You know this a 4 year old thread, right?

There are AviSynth import plugins for Premiere(not sure if this one is still up-to-date) and virtual file apps, so you could use an AviSynth source filter that does VFR->CFR, e.g.:
Code:
a=ffaudiosource("source.mkv")
v=ffvideosource("source.mkv", fpsnum=24000, fpsden=1001)
AudioDub(v, a)
fpsnum and fpsden need to be set according to the target frame rate. Note that 100% lossless conversion from VFR to CFR is not possible except for a common multiple (e.g. 120 fps CFR for 24 fps and 30 fps hybrid VFR).

Last edited by sneaker_ger; 29th August 2013 at 22:18.
sneaker_ger is offline   Reply With Quote
Old 29th August 2013, 23:53   #7  |  Link
onlysublime
Registered User
 
Join Date: Sep 2003
Location: Los Angeles, CA
Posts: 4
thanks for the reply! yes, I was googling to find answers and was hoping someone would respond. thanks. I'll try out that plugin (though I have no experience with avisynth).

is there a place with a handy guide to get me up to speed fast?
onlysublime is offline   Reply With Quote
Old 30th August 2013, 11:33   #8  |  Link
Seedmanc
Registered User
 
Join Date: Sep 2010
Location: Russia
Posts: 85
I believe VFR should be very useful for content types like animation, where real framerate might be 2-3 times lower than the nominal one. Or for hybrid content, combining 25 and 30 fps videos, so that there will be no need to use 120fps videos like people used to do for a while already.
You might want to take a look at Dup and DeDup filters of Avisynth, they are supposed to generate timecodes file to convert CFR to VFR.
Seedmanc is offline   Reply With Quote
Old 31st August 2013, 08:23   #9  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by Seedmanc View Post
I believe VFR should be very useful for content types like animation, where real framerate might be 2-3 times lower than the nominal one. Or for hybrid content, combining 25 and 30 fps videos, so that there will be no need to use 120fps videos like people used to do for a while already.
You might want to take a look at Dup and DeDup filters of Avisynth, they are supposed to generate timecodes file to convert CFR to VFR.
That's a very bad idea especially for modern animation. Nowadays there is no animation that might have real framerate lower than 24fps (unless this is some doujin stuff). Most of the time it can only be valid for foreground moving objects but bg is full 24fps.
This is also one of the reasons why things like Dup and DeDup should never be used. They are decimating frames based on pure guesswork and never accurate. Since such algorithms are never perfect and frames in animation can look very similar, you'll end up with some good frames missing, which makes things less smooth. Unless you'll tune the decimation algorithm to be very careful and thus not only practically useless but theoretically too. And even regardless of that, streams where fps jumps like hell from one to another is a pain in the ass for renderers, which also works against smooth playback.
Modern formats such as h264 already handle things like duplicated frames or parts of the frame internally quite well.
On the other hand no one stops you from creating hybrid content with, for example, most of the stuff 24fps but portions with 30 fps, and never did. 120 fps with dropframes was used only to achieve the same effect with obsolete formats.

Last edited by Keiyakusha; 31st August 2013 at 08:33.
Keiyakusha 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:35.


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