2013-11-22 55 views
1

我已成功编译并安装FFMPEG_2.1源代码。我知道2.1版以后的ffmpeg支持HEVC解码器。我使用HM 10.0HM 11.0 HEVC参考代码生成了.bin文件。使用ffmpeg解码基本HEVC流

但是,当我给这个bin文件作为输入到ffmpeg我得到一个输入/输出错误。

ffmpeg -i Johnny_1280x720_60qp22.bin out.yuv 

如下图所示的上述命令的输出:

,我已经使用这个命令下面给出

ffmpeg version 2.1 Copyright (c) 2000-2013 the FFmpeg developers 
    built on Nov 21 2013 15:52:14 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
    configuration: 
    libavutil  52. 48.100/52. 48.100 
    libavcodec  55. 39.100/55. 39.100 
    libavformat 55. 19.104/55. 19.104 
    libavdevice 55. 5.100/55. 5.100 
    libavfilter  3. 90.100/3. 90.100 
    libswscale  2. 5.101/2. 5.101 
    libswresample 0. 17.104/0. 17.104 
Input #0, bin, from 'Johnny_1280x720_60qp22.bin': 
    Duration: N/A, bitrate: N/A 
    Stream #0:0: Video: bintext, pal8, 1280x118288, 25 tbr, 25 tbn, 25 tbc 
Output #0, rawvideo, to 'out.yuv': 
    Metadata: 
    encoder   : Lavf55.19.104 
    Stream #0:0: Video: rawvideo, pal8, 1280x118288, q=2-31, 200 kb/s, 90k tbn, 25 tbc 
Stream mapping: 
    Stream #0:0 -> #0:0 (bintext -> rawvideo) 
Press [q] to stop, [?] for help 
Johnny_1280x720_60qp22.bin: Input/output error 
frame= 1 fps=0.3 q=0.0 size= 147861kB time=00:00:00.04 bitrate=30281932.8kbiframe= 1 fps=0.3 q=0.0 Lsize= 147861kB time=00:00:00.04 bitrate=30281932.8kbits/s  
video:147861kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.000000 

谁能告诉我为什么我面对这个问题以及我如何纠正它。

回答

2

这是我得到的使用HM 12.1编码的hevc序列的输出。

$ ./ffmpeg -i kimono_hevc.bin out.yuv 
ffmpeg version N-58122-g7cd555d Copyright (c) 2000-2013 the FFmpeg developers 
    built on Nov 16 2013 20:40:03 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1) 
    configuration: --enable-libx264 --enable-gpl --enable-libmp3lame 
    libavutil  52. 53.100/52. 53.100 
    libavcodec  55. 43.100/55. 43.100 
    libavformat 55. 21.100/55. 21.100 
    libavdevice 55. 5.100/55. 5.100 
    libavfilter  3. 91.100/3. 91.100 
    libswscale  2. 5.101/2. 5.101 
    libswresample 0. 17.104/0. 17.104 
    libpostproc 52. 3.100/52. 3.100 
Input #0, hevc, from 'kimono_hevc.bin': 
    Duration: N/A, bitrate: N/A 
    Stream #0:0: Video: hevc, yuv420p(tv), 1920x1080, 25 tbr, 1200k tbn, 25 tbc 
Output #0, rawvideo, to 'out.yuv': 
    Metadata: 
    encoder   : Lavf55.21.100 
    Stream #0:0: Video: rawvideo (I420/0x30323449), yuv420p, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 25 tbc 
Stream mapping: 
    Stream #0:0 -> #0:0 (hevc -> rawvideo) 
Press [q] to stop, [?] for help 
frame= 1 fps=0.0 q=0.0 Lsize= 3038kB time=00:00:00.04 bitrate=622080.0kbits/s  
video:3038kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.000000% 

请注意,在我的例子中,我得到

Stream #0:0: Video: hevc, yuv420p(tv) 

而你得到:

Stream #0:0: Video: bintext, pal8, 

HM10是旧的,除其他外NAL结构变化。任何不使用最新的理由?

要下载最新的HEVC参考代码以及如何编译它,看到我的帖子@https://stackoverflow.com/a/19305907/297323

+0

感谢您的答复。然后我会尝试HM12.0本身。最后一件事,我需要在HM 12.0的配置文件中做任何特定的改变? – Zax