2014-10-30 56 views
1

我能够编码YUV文件的MP4使用HEVC:如何使用ffmpeg生成编码的HEVC比特流?

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 

这里是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 

但我怎么能得到decodeble比特流?我试图

mp4box -raw 1 test.mp4 -out out.bin 

它提供:

Extracting MPEG-H HEVC stream to hevc 

但out.bin无法通过HM或elecard进行解码。

感谢

+0

HM不是那么多的问题吗?你知道mp4box的输出是NALU流还是字节流? – slhck 2014-10-30 20:58:26

+1

哦,你应该可以使用'ffmpeg -i input.mp4 ... -c:v hevc -f hevc out.bin'来生成附件B字节流。 – slhck 2014-10-30 21:05:54

+0

This Works!谢谢。 – jgmao 2014-10-30 21:48:47

回答

3

使用

ffmpeg -i input.mp4 -c:v hevc -f hevc out.bin 

产生附件B的字节流。这可以送到另一个解码器。