[英]How can I generate encoded HEVC bitstream using ffmpeg?
I am able to encoded YUV file to mp4 using HEVC: 我能够使用HEVC将YUV文件编码为mp4:
ffmpeg.exe -f rawvideo -s 1920x1080 -pix_fmt yuv420p -i input.yuv -c:v hevc -r 30 -x265-params crf=27 -vframes 300 -an -y test.mp4
Here is the mp4box -info test.mp4 shows: 这是mp4box -info test.mp4显示:
* Movie Info *
Timescale 1000 - Duration 00:00:10.000
1 track(s)
Fragmented File: no
File suitable for progressive download (moov before mdat)
File Brand isom - version 512
Created: UNKNOWN DATE Modified: UNKNOWN DATE File has no MPEG4 IOD/OD
iTunes Info:
Encoder Software: Lavf56.11.100
Track # 1 Info - TrackID 1 - TimeScale 15360 - Media Duration 00:00:10.000 Track has 1 edit lists: track duration is 00:00:10.000 Media Info: Language "Undetermined" - Type "vide:hev1" - 300 samples Visual Track layout: x=0 y=0 width=1920 height=1080 MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x23 HEVC Video - Visual Size 1920 x 1080
HEVC Info: Profile Main @ Level 5 - Chroma Format 1
NAL Unit length bits: 32 - general profile compatibility 0x60000000
Parameter Sets: 1 VPS 1 SPS 1 PPS
SPS resolution 1920x1080
Bit Depth luma 8 - Chroma 8 - 1 temporal layers
But how can I get the decodeble bit stream? 但是如何获得可解码比特流? I tried
我试过了
mp4box -raw 1 test.mp4 -out out.bin
It gives: 它给:
Extracting MPEG-H HEVC stream to hevc
But the out.bin couldn't be decoded by HM or elecard. 但是out.bin无法通过HM或elecard解码。
Thanks 谢谢
Use 采用
ffmpeg -i input.mp4 -c:v hevc -f hevc out.bin
to generate an Annex B bytestream. 生成附件B字节流。 This can be fed to another decoder.
这可以馈送到另一个解码器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.