[FFmpeg-user] Convert to 24p
Thomas Worth
dev at rarevision.com
Fri Oct 28 15:11:21 CEST 2011
On Thu, Oct 27, 2011 at 11:15 AM, Bernd Butscheidt <bbutscheidt at yahoo.de> wrote:
>>________________________________
>>From: Thomas Worth <dev at rarevision.com>
>>An: FFmpeg user questions and RTFMs <ffmpeg-user at ffmpeg.org>
>>sent: 18:43 Donnerstag, 27.Oktober 2011
>>subject: Re: [FFmpeg-user] Convert to 24p
>>
>>A better option would be to map the frames 1:1 and time-stretch the
>>audio to match instead. A change in audio speed over 1-2 frames per
>>second is much less perceptible than a change in frame rate (and its
>>jittery result).
>>
>
> I totally must agree.
> Mplayer/ Mencoder provides the option -speed for doing a job like this.
> Even better, the option -scaletempo let you decide whether the change of speed change the audio pitch or not. With this, you can do a real speed up (Film to Pal) or speed down (Pal to Film) e.g. without dropping frames but, of course, change the running time of your video.
I'll give you a practical example of this problem. I am working on a
film that was given to me at 24.00 fps. This is the frame rate that
DCI mandates for 2D projection. However, I need to make a Blu-ray disc
of the movie for the client. The Blu-ray must play on an NTSC player,
so the frame rate must be 23.976. I need to convert this without
dropping any frames, and re-timing the sound to match. If I tried to
do this by using the -r option at output, eventually I would lose
frames because FFmpeg would try to make the durations of the input and
output videos match. That is not what I want. What I want is to be
able to "trick" FFmpeg into thinking that the input video is 23.976
already. That would be done by specifying -r _before_ -i, like with
image sequences. This seems like such a no-brainer, I'm surprised it
hasn't been done yet. If you want to drop frames to avoid audio sync
problems, then don't put -r before -i and then specify -r at the end.
FFmpeg will then work as it does now.
To recap, using another example:
Convert PAL to NTSC by dropping frames (same duration):
ffmpeg -i pal_movie.mov -r 23.976 pal_converted_to_ntsc.mov
Convert PAL to NTSC without dropping frames (different durations):
ffmpeg -r 23.976 pal_movie.mov pal_converted_1.1_to_ntsc.mov
You would then adjust the sound speed with sox since FFmpeg can't do this yet.
The only way to achieve this right now is by using the PTS filter. It
works, but this seems like a much more elegant solution.
If I get some time I will look into doing this myself, but I'm sure
someone who is more familiar with ffmpeg.c could do it a lot faster.
> What you need is MEncoder's pullup filter.
> Unfortunately, it does not yet work in FFmpeg, help on this issue is very
> welcome!
You wouldn't use this to convert 25 fps to 23.976 fps for DVD. All
(good) standards conversions with progressive material are done 1:1,
only the audio is re-timed. Frame counts between PAL and NTSC DVDs
should always be the same. This is why the running times of European
versions of American movies are always slightly shorter.
More information about the ffmpeg-user
mailing list