[FFmpeg-user] Splicing together videos with different characteristics
SDSS
NuncEstBibendum at excite.com
Tue Nov 28 16:44:46 EET 2017
Replying to myself, in case this can be of use to anyone.
I got this problem solved by using the following ffmpeg incantation:
ffmpeg -i 1.mkv -i 2.m2ts -filter_complex "\
[0:v]scale=1920:1080:force_original_aspect_ratio=decrease,setsar=1,\
pad=1920:1080:(ow-iw)/2:(oh-ih)/2[0v]; \
[1:v]setsar=1[1v]; \
[0v][0:a][1v][1:a]concat=n=2:v=1:a=1[outv][outa] \
" -map "[outv]" -map "[outa]" \
-c:v libx264 -crf 23 \
A.mkv
1.mkv is a video segment at 720x480, whereas 2.m2ts has a 1920x1080
resolution. The resulting video, A.mkv, is 1920x1080, without any
distortions, and it plays correctly under mplayer.
I do not really understand how the command above works; if I get some
understanding of it, I'll post explanations here in case, again, they might
be of use to somebody.
--
Sent from: http://www.ffmpeg-archive.org/
More information about the ffmpeg-user
mailing list