View Full Version : change 1280 x 720, 59.94 fps, MPEG-2 stream frame rate to 23.98 fps
0028606
18th May 2009, 21:55
I'm using a mac and I can't figure out how to change MPEG-2 stream, 1280 x 720p, 59.94 fps down to 23.98 fps. I generally encode with x264 via ffmpeg cli.
Can anyone help?
Thanks in advance.
WalterK
19th May 2009, 06:00
no frontend and plain ffmpeg
would be this syntax to set frame rate
ffmpeg -i inputfile.mpg -r 24 -vcodec copy -acodec copy outputfile.mpg
At least thats how it works in linux via the terminal.
I'm using a mac and I can't figure out how to change MPEG-2 stream, 1280 x 720p, 59.94 fps down to 23.98 fps.
What kind of source is it exactly, is it from a video camera or a digital television capture? Are there 60 distinct frames per second or are some of them duplicated (the original source was 24p)? A sample clip would be helpful.
Why do you want to change the framerate?
0028606
19th May 2009, 16:42
no frontend and plain ffmpeg
would be this syntax to set frame rate
ffmpeg -i inputfile.mpg -r 24 -vcodec copy -acodec copy outputfile.mpg
At least thats how it works in linux via the terminal.
Thanks for this suggestion, but this is how I tried to do it but the output is very jerky, stuttery and not good at all.
What kind of source is it exactly, is it from a video camera or a digital television capture? Are there 60 distinct frames per second or are some of them duplicated (the original source was 24p)? A sample clip would be helpful.
It's a digital television capture, and I think it's 60 distinct frames per second but i not 100% sure, how do I check if there's duplicated frames?
Why do you want to change the framerate?
Because i want to play on Apple TV which only handles 720p23.98 fps
It's a digital television capture, and I think it's 60 distinct frames per second but i not 100% sure, how do I check if there's duplicated frames?
Play it frame-by-frame and check visually (for example in MPlayer, press "." to progress one frame forward).
Because i want to play on Apple TV which only handles 720p23.98 fps
If your source is real 60p, it would be much better to convert it to 30p. The resulting video plays much smoother than 60p converted to 24p by dropping frames. According to Apple TV specs, 960x540 at 30p should work, so it might be a better choice than 720p24.
The other alternative would be to use AviSynth and MVTools(2) MVFlowFPS for more advanced framerate conversion. They should work on OS X with Wine.
0028606
19th May 2009, 18:10
Thanks nm.
I tried 960x540 at 30p and playback is a lot smoother, but still not as good as it could be. I'm going to try AviSynth and MVTools(2) MVFlowFPS under Wine and see how that goes.
I appreciate all your help.
I tried 960x540 at 30p and playback is a lot smoother, but still not as good as it could be.
Of course it can't be as smooth as the original since you only have half the number of frames. Motion blur might help at the cost of sharpness, but that also requires advanced (AviSynth) filtering.
I could perhaps give more specific advice if you posted a sample clip of the source video.
Blue_MiSfit
19th May 2009, 19:40
Did you step through the video frame by frame and verify that every frame is in fact a distinct picture?
If you're not sure, feel free to post a sample and we can help you figure out the ideal way to process it :)
~MiSfit
0028606
19th May 2009, 19:56
. I could perhaps give more specific advice if you posted a sample clip of the source video.
I can provide a link to sample I uploaded to rapidshare. But it is a digital TV capture! is it okay to provide a link to this content?
Did you step through the video frame by frame and verify that every frame is in fact a distinct picture?
I did and it seems to me that every frame is a distinct picture.
I can provide a link to sample I uploaded to rapidshare. But it is a digital TV capture! is it okay to provide a link to this content?
Yes. Providing sample clips for testing purposes is ok.
0028606
19th May 2009, 22:40
Ok here's the link to the Sample - http://rapidshare.com/files/234900824/Sample720p60.ts
Ok here's the link to the Sample - http://rapidshare.com/files/234900824/Sample720p60.ts
It's 24p film hard-telecined to 60p (there is an alternating pattern of three and two almost identical frames). You need MEncoder or AviSynth to remove the duplicated frames. Try these two alternative filter chains with MEncoder:
1. -vf decimate=2:1000:1600:.001 -ofps 24000/1001
2. -vf framestep=2,filmdint=dint_thres=256,harddup -ofps 24000/1001
0028606
20th May 2009, 20:50
1. -vf decimate=2:1000:1600:.001 -ofps 24000/1001
2. -vf framestep=2,filmdint=dint_thres=256,harddup -ofps 24000/1001
Thanks nm, The second option produces the best results, but still a small bit jerky.
Do you think the second filter can be tweaked? to give smoother playback.
Do you think the second filter can be tweaked? to give smoother playback.
I couldn't get perfect results with your sample, but this variation might be slightly better:
-vf tinterlace=4,filmdint=fast=0 -ofps 24000/1001
If that's not good enough, try AviSynth.
0028606
21st May 2009, 18:01
-vf tinterlace=4,filmdint=fast=0 -ofps 24000/1001
Thanks a lot for your help I appreciate it.
This looks good.
I like to mess around with Avisynth but it doesn't run well on mac under Wine. I might bootcamp XP on to my machine and run the video through it then.
Thanks again.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.