Multiplex a HEVC-Video into a MPEG-Transportstream with FFMPEG

别说谁变了你拦得住时间么 提交于 2019-12-13 07:15:24

问题


I would like to multiplex a HEVC coded video into a MPEG-Transportstream.

I have a Video coded with the x265 Encoder.

x265 raw.y4m --output coded.hevc

I want to multiplex this Video into an MPEG Transportstream. I tried it among other things this way:

ffmpeg -fflags +genpts -i coded.hevc -c:v copy -f mpegts transportstream.ts 

Unfortunately this error message shows up and the transportstream.ts is empty.

[mpegts @ 0x1fa76a0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0x1fa76a0] first pts value must be set
av_interleaved_write_frame(): Invalid data found when processing input

For my purpose, it is necessary to do the two steps separate. Could you help me please to find out the correct parameters to multiplex the Video?

Thanks in advance.


回答1:


A two-step process works:

ffmpeg -i coded.hevc -c copy coded.mp4

ffmpeg -i coded.mp4 -c:v copy transportstream.ts 


来源:https://stackoverflow.com/questions/40109358/multiplex-a-hevc-video-into-a-mpeg-transportstream-with-ffmpeg

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