[Libav-user] Failed to open codec in av_find_stream_info ?

ssshukla26 ssshukla26 at gmail.com
Wed Jul 13 12:09:16 CEST 2016


Hi, we are adding a custom decoder for qualcomm chipset into ffmpeg. We have
made a linux application which decodes the *h264* file into *nv12 tiled* yuv
raw data file successfully. 

Our aim is to patch ffmpeg with the custom decoder and to upstream the same,
so that anyone on qualcomm chipset are able to use the hardware decoding
capability. Including opensource projects like chromium. 

I have implemented the custom decoder in ffmpeg, but when I use the decoder
with ffmpeg pipe the commands fails as follows, Please help.

$ *ffmpeg -f h264 -c:v h264_qhw -i no_mans_sky_1080p_10sec.h264 -vcodec
rawvideo -pix_fmt nv12_tiled -s 1920x1080 -r 30 output.yuv -loglevel debug
*
ffmpeg version N-80912-gcc42fe8 Copyright (c) 2000-2016 the FFmpeg
developers
  built with gcc 4.9.2 (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC
4.9-2014.09) 20140904 (prerelease)
  configuration: --prefix=comark_SBC_ffmpeg/ --enable-shared
--enable-nonfree --enable-pic --enable-gpl --enable-cross-compile
--cross-prefix=arm-linux-gnueabihf- --arch=arm --target-os=linux
--extra-cflags=-I../sdl/source/SDL-1.2.15/comark_SBC_SDL//include/SDL/
--extra-ldflags='-L../sdl/source/SDL-1.2.15/comark_SBC_SDL//lib/ -lSDL'
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument
'h264'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument
'h264_qhw'.
Reading option '-i' ... matched as input file with argument
'no_mans_sky_1080p_10sec.h264'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec
('copy' to copy stream)) with argument 'rawvideo'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format)
with argument 'nv12_tiled'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or
abbreviation)) with argument '1920x1080'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value,
fraction or abbreviation)) with argument '30'.
Reading option 'output.yuv' ... matched as output file.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file no_mans_sky_1080p_10sec.h264.
Applying option f (force format) with argument h264.
Applying option c:v (codec name) with argument h264_qhw.
Successfully parsed a group of options.
Opening an input file: no_mans_sky_1080p_10sec.h264.
[file @ 0x4a970] Setting default whitelist 'file,crypto'
[h264 @ 0x4a280] Before avformat_find_stream_info() pos: 0 bytes read:32768
seeks:0 nb_streams:1
Initialized Params
De-Initialized Decoder
De-Initialized Params
*[h264 @ 0x4a280] Failed to open codec in av_find_stream_info*
[NULL @ 0x53430] user data:"x264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options:
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0
direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00"
Initialized Params
De-Initialized Decoder
De-Initialized Params
[h264 @ 0x4a280] max_analyze_duration 5000000 reached at 5040000
microseconds st:0
*[h264 @ 0x4a280] Could not find codec parameters for stream 0 (Video: h264
(High), 1 reference frame, none): unspecified size Consider increasing the
value for the 'analyzeduration' and 'probesize' options*
[h264 @ 0x4a280] After avformat_find_stream_info() pos: 1509376 bytes
read:1540096 seeks:0 frames:65
Input #0, h264, from 'no_mans_sky_1080p_10sec.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0, 65, 1/1200000: Video: h264 (High), 1 reference frame, none,
12.50 fps, 25 tbr, 1200k tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: output file output.yuv.
Applying option vcodec (force video codec ('copy' to copy stream)) with
argument rawvideo.
Applying option pix_fmt (set pixel format) with argument nv12_tiled.
Applying option s (set frame size (WxH or abbreviation)) with argument
1920x1080.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with
argument 30.
Successfully parsed a group of options.
Opening an output file: output.yuv.
[file @ 0x1ea3c0] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x1f2fb0] Setting 'video_size' to value
'0x0'
*[buffer @ 0x1f3040] Unable to parse option value "0x0" as image size*
[graph 0 input from stream 0:0 @ 0x1f2fb0] Setting 'pix_fmt' to value '-1'
*[buffer @ 0x1f3040] Unable to parse option value "-1" as pixel format*
[graph 0 input from stream 0:0 @ 0x1f2fb0] Setting 'time_base' to value
'1/1200000'
[graph 0 input from stream 0:0 @ 0x1f2fb0] Setting 'pixel_aspect' to value
'0/1'
[graph 0 input from stream 0:0 @ 0x1f2fb0] Setting 'sws_param' to value
'flags=2'
[graph 0 input from stream 0:0 @ 0x1f2fb0] Setting 'frame_rate' to value
'25/1'
*[buffer @ 0x1f3040] Unable to parse option value "0x0" as image size*
*[buffer @ 0x1f3040] Error setting option video_size to value 0x0.*
*[graph 0 input from stream 0:0 @ 0x1f2fb0] Error applying options to the
filter.
Error opening filters!*
[AVIOContext @ 0x1f2450] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x52aa0] Statistics: 1540096 bytes read, 0 seeks

-----------------------------------------------------------------------------------------------------------------

Note : "*h264_qhw*" is the name of our custom decoder.



--
View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Failed-to-open-codec-in-av-find-stream-info-tp4662352.html
Sent from the libav-users mailing list archive at Nabble.com.


More information about the Libav-user mailing list