I'm trying to assemble an ffmpeg one-liner to extract both an mp4 and KLV metadata from a UAV video. I have two separate commands that work for this purpose:
ffmpeg -i input.mpg -map data-re -codec copy -f data output.klv
ffmpeg -i input.mpg output.mp4
But now I'd like to accomplish this in a single line. I've tried a number of variations but keep getting errors. e.g.,
ffmpeg -i input.mpg -map 0:0 -map data-re -codec:v:0 copy -codec:d copy output.mp4 -f data output.klv
gives me the error "Output file #1 does not contain any stream." I'm new to ffmpeg and probably doing something dumb, but I can't find any examples that adequately address this scenario. What am I doing wrong? Thanks!
+ Reply to Thread
Results 1 to 3 of 3
Your map and codec options should appear before each output file to which they apply. In other words, don't lump the outputs at the end of the command.
Great, thanks! I knew it was something silly...