ffmpeg -i intro.mkv -i test.mkv \
-filter_complex '[0:a] [1:a] concat=n=2:v=0:a=1 [a] ;
[0:v] fade=out:s=200:n=50:d=0.999 [fout] ;
[1:v] fade=in:s=20:n=10:d=0.9 [fin] ;
[fout] [fin] concat=n=2:v=1:a=0 [v]' -map '[v]' -map '[a]' -y output.mkv
And cycle:
path_in="/home/mikhail/smb/cg_event_2014/cgevent2014_video2/old/"
path_to="/home/mikhail/Desktop/video/cgevent_masterclass/"
for a in "$path_in"*.mp4 ; do
b=${a##*/}
ffmpeg -i $a -c copy "$path_to"/${b%%.*}.mkv
ffmpeg -i "/media/sdb1TB/mikhail/works/video/footage/blend4web_end/intro.mkv" -i "$path_to"${b%%.*}.mkv \
-filter_complex '[0:a] [1:a] concat=n=2:v=0:a=1 [a] ;
[0:v] fade=out:s=180:n=50:d=0.999 [fout] ;
[1:v] fade=in:s=20:n=10:d=0.9 [fin] ;
[fout] [fin] concat=n=2:v=1:a=0 [v]' -map '[v]' -map '[a]' -y -b:v 10M -b:a 192k "$path_to"out/${b%%.*}.mkv
#echo $b
done
exec bash
-filter_complex '[0:a] [1:a] concat=n=2:v=0:a=1 [a] ;
[0:v] fade=out:s=200:n=50:d=0.999 [fout] ;
[1:v] fade=in:s=20:n=10:d=0.9 [fin] ;
[fout] [fin] concat=n=2:v=1:a=0 [v]' -map '[v]' -map '[a]' -y output.mkv
And cycle:
path_in="/home/mikhail/smb/cg_event_2014/cgevent2014_video2/old/"
path_to="/home/mikhail/Desktop/video/cgevent_masterclass/"
for a in "$path_in"*.mp4 ; do
b=${a##*/}
ffmpeg -i $a -c copy "$path_to"/${b%%.*}.mkv
ffmpeg -i "/media/sdb1TB/mikhail/works/video/footage/blend4web_end/intro.mkv" -i "$path_to"${b%%.*}.mkv \
-filter_complex '[0:a] [1:a] concat=n=2:v=0:a=1 [a] ;
[0:v] fade=out:s=180:n=50:d=0.999 [fout] ;
[1:v] fade=in:s=20:n=10:d=0.9 [fin] ;
[fout] [fin] concat=n=2:v=1:a=0 [v]' -map '[v]' -map '[a]' -y -b:v 10M -b:a 192k "$path_to"out/${b%%.*}.mkv
#echo $b
done
exec bash
Комментариев нет:
Отправить комментарий