[FFmpeg-user] Mulitple output files from one -map?
Jonathan Viney
jonathan.viney at gmail.com
Wed Aug 26 04:11:05 CEST 2015
Hi,
Here's my ffmpeg command:
ffmpeg -i input1.mkv -i input2.mkv -filter_complex
"myfilter[output1][output2]" -map "[output1]" -f null /dev/null -map
"[output2]" -y high.mp4 medium.mp4 low.mp4
myfilter is a custom filter that uses dualinput and gives two outputs.
high.mp4 is encoded correctly with the contents of output2, but
medium.mp4 and low.mp4 are copies of input1.mkv. Is there a way to
encode multiple copies of output2 using -map? Specifying -map
"[output2]" more than once causes errors saying it's already been
used.
Inserting a split=3 filter into the filter chain works fine and allows
each output to be mapped individually:
ffmpeg -i input1.mkv -i input2.mkv -filter_complex
"myfilter[output1][output2];[output2]split=3[one][two][three]" -map
"[output1]" -f null /dev/null -map "[one]" high.mp4 -map "[two]"
medium.mp4 -map "[three]" low.mp4
Is that the best way to do this or can -map be used somehow? Would the
split filter potentially be doing extra frame copies unnecessarily?
I'm using current ffmpeg head.
Thanks,
-Jonathan.
More information about the ffmpeg-user
mailing list