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

2016-07-13 Thread ssshukla26
The problem is with init function of decoder, its declaration is as follow,

*int qhw_decode_init (AVCodecContext *avctx);*

am getting avctx->width as zero (0) and avctx->heigth as zero(0).

So I initialize my decoder with constant values, as decoder->width=1920 and
decoder->height=1080. After that I am getting following error,

*Assertion avctx->internal->buffer_frame->buf[0] failed at
libavcodec/utils.c:2772*

Please help.



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


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

2016-07-13 Thread ssshukla26
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
  libavformat57. 41.100 / 57. 41.100
  libavdevice57.  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
  libpostproc54.  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 500 reached at 504
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/120: 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: