[FFmpeg-user] Preserving both Video and Data Streams in Output file

Moritz Barsnick barsnick at gmx.net
Fri Jun 23 00:08:45 EEST 2017


On Thu, Jun 22, 2017 at 11:37:41 +0000, Victor Odouard wrote:
> So I've been trying this:
> ffmpeg -i PumaMapping.mpg -map 0 output.mpg

Are you sure an MPEG Program Stream is the right format for you? Your
UDP URL should default to something else, so the output of that command
would be more interesting.

>     Stream #0:1[0x21]: Data: klv (KLVA / 0x41564C4B)
> [mpeg @ 0x7ff51918e400] Invalid media type data for output stream #1

Either ffmpeg cannot map data into MPEG-PS, or it doesn't know how to
map "klv" data.

Firstly you should choose an MPEG Transport Stream for the output -
change the extension to ".ts". (You can also use MPEG-TS for UDP: Add
"f mpegts" as output option, if that's not the default.)

Secondly, you definitely need to copy the data, not encode, if at all.
There's no data encoder.

Thirdly, that still may not work, if ffmpeg refuses to mux the data.
Since your input is already in MPEG-TS format, perhaps you can just
pipe it to UDP (using something like socat), instead of using ffmpeg?

Moritz


More information about the ffmpeg-user mailing list