使用FFMPEG将HEVC视频复用到MPEG传输流中 [英] Multiplex a HEVC-Video into a MPEG-Transportstream with FFMPEG

查看:910
本文介绍了使用FFMPEG将HEVC视频复用到MPEG传输流中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将HEVC编码的视频多路复用到MPEG-Transportstream中.

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

我有一个用x265编码器编码的视频.

I have a Video coded with the x265 Encoder.

x265 raw.y4m --output coded.hevc

我想将此视频多路复用到MPEG Transportstream中. 我以这种方式尝试了其他方法:

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 

不幸的是,此错误消息出现,并且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?

谢谢.

推荐答案

分两步进行:

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

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

这篇关于使用FFMPEG将HEVC视频复用到MPEG传输流中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆