Mux a regular file into Mpeg TS

爷,独闯天下 提交于 2019-12-08 03:29:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!