[FFmpeg-user] Proper way to reverse PAL Speed up?
Bernd Butscheidt
bbutscheidt at yahoo.de
Sat Feb 9 16:05:12 CET 2013
So maybe I answer myself.
Further tries seem to implicate, that the linear transformation I am heading to needs the first pts to be zero. At least, this is way I seem to get rid of this video/audio offset I tried to describe.
So I replaced
PTS
with
(PTS-STARTPTS)
.
To sum up: To speed down a video, eg. from PAL (either 50fps or 25fps) to ntsc film (23.976 fps), I see two possibilities:
Example 1:
Using asetps (which changes the pitch of the audio as well):
ffmpeg -i PAL_video.ts -vcodec libx264 -preset veryfast -x264opts crf=12:videoformat=undef:force-cfr -acodec ac3 -ab 448k -filter:v setpts='25025/24000*(PTS-STARTPTS)' -filter:a asetpts='25025/24000*(PTS-STARTPTS)',aresample=48000:async=1:min_comp=0.01:comp_duration=1:max_soft_comp=100000000:min_hard_comp=0.3 -f matroska -r 24000/1001 NTSC_video.mkv
Without adding aresample to the audio filter, my audio get distorted.
Example 2:
Using atempo (which seems to keep the pitch of the original audio):
ffmpeg -i PAL_video.ts -vcodec libx264 -preset veryfast -x264opts crf=12:videoformat=undef:force-cfr -acodec ac3 -ab 448k -filter:v setpts='25025/24000*(PTS-STARTPTS)' -filter:a asetpts='PTS-STARTPTS',atempo=0.959040959 -f matroska -r 24000/1001 Sport_HD_CUT_ntsc.mkv
Using atempo, aresample doesn't seem to be needed in addition, at least to my experiences up to now. But it seems to do no harm as well if added.
Of course, the encoders and containers used are just considered to be an example as well and I don't think them to be mandatory as long as video and audio is reencoded at all. And, if someone can add any judgements or additions about these tries I am still fond of hearing them.
More information about the ffmpeg-user
mailing list