问题
im working in a file broadcasting method using mpeg2-ts and ISDB-T ( Integrated Services Digital Broadcasting - Terrestial), My problem is that im not being able to to put a file into the data stream, or as rawvideo, or anithing inside the mpeg-ts.... im using ffmpeg and avconv. Here is an example of a test:
ffmpeg -f mpegts -i Myfile.tgz -probesize FILESIZE -mpegts_original_network_id 0x1 -mpegts_transport_stream_id 0x1 -mpegts_service_id 0x25 -mpegts_pmt_start_pid 0xbb9 -mpegts_start_pid 0xbba -metadata service_provider="FILESSERVER" -metadata service_name="FILES" -muxrate 16M output.ts
回答1:
You can interpret the file as a binary text.
ffmpeg -f bin -i Myfile.tgz -c copy
-mpegts_original_network_id 0x1 -mpegts_transport_stream_id 0x1 -mpegts_service_id 0x25
-mpegts_pmt_start_pid 0xbb9 -mpegts_start_pid 0xbba
-metadata service_provider="FILESSERVER" -metadata service_name="FILES"
-muxrate 16M output.ts
Then, to extract it
ffmpeg -i output.ts -c copy -map 0 -f data myfile.tgz
(You may get an I/O error message in the first command. But the result was fine.)
来源:https://stackoverflow.com/questions/38725773/mux-a-regular-file-into-mpeg-ts