Mux a regular file into Mpeg TS

2019-06-07 20:23发布

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条回答
Deceive 欺骗
2楼-- · 2019-06-07 21:12

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.)

查看更多
登录 后发表回答