[Libav-user] Invalid data found when processing input
francesco at bltitalia.com
francesco at bltitalia.com
Fri Feb 19 10:53:49 CET 2016
Hi to all
I made a mov file with an ipad-mini with h264 codec. This is the result
of frobe:
ffprobe.exe -i IMG_4824.MOV
ffprobe version 2.2.5 Copyright (c) 2007-2014 the FFmpeg developers
built on Mar 23 2015 09:53:33 with gcc 4.8.1 (GCC)
configuration: --enable-shared --disable-debug --prefix=/mingw --enable-pthrea
ds --enable-gpl --enable-libx264 --enable-libvpx --enable-libvorbis --enable-lib
theora
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'IMG_4824.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2016-01-05 21:25:04
model : iPad mini
model-ita : iPad mini
encoder : 6.1.3
encoder-ita : 6.1.3
date : 2016-01-05T22:25:04+0100
date-ita : 2016-01-05T22:25:04+0100
location : +44.0498+010.4806+166.899/
location-ita : +44.0498+010.4806+166.899/
make : Apple
make-ita : Apple
Duration: 00:00:44.33, start: 0.000000, bitrate: 17285 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709)
, 1920x1080, 17201 kb/s, 24.01 fps, 24 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2016-01-05 21:25:04
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 k
b/s (default)
Metadata:
creation_time : 2016-01-05 21:25:04
handler_name : Core Media Data Handler
When I attempt to decode using libavcodec it fails resultin in "Invalid data
found when processing input". The code is quite simple:
pCodec_qt=avcodec_find_decoder(AV_CODEC_ID_H264);
pCodecCtx_qt = avcodec_alloc_context3(pCodec_qt);
pFrame_qt=av_frame_alloc();
errCode = avcodec_open2(pCodecCtx_qt, pCodec_qt,NULL);
av_init_packet(&packet_qt);
packet_qt.size = <size read from table>
packet_qt.data = <buffer with data read>;
fFinished_qt = 1;
errCode = avcodec_decode_video2(pCodecCtx_qt,
pFrame_qt,&fFinished_qt,&packet_qt);
Code starts in a strange fashion: ussually non annex B h264 format starts
with (hex):
00 00 00 01
while the first chunk size starts with (hex):
00 02 f0 84
any suggestion or idea ?
Regards
Francesco
More information about the Libav-user
mailing list