-----Original Message Starts-----
From: [email protected] [mailto:[email protected]] 
On Behalf Of Prageeth
Sent: Wednesday, September 29, 2010 5:58 PM
To: [email protected]
Subject: [libav-user] Help with av_find_stream_info()

Hi All,

I am using the ffmpeg libraries to demux the audio/video streams from a DTV TS 
stream. I pipe the TS packets obtained from hardware to the program, call 
av_find_stream_info() and later check codec_type of the stream to find 
audio/video streams. The method works and I am able to later decode the frames 
thus obtained.

The issue I face is that a lot of time is spent inside av_find_stream_info(), 
more than 1minute, as in attached logs. The call seems to need much TS data to 
complete processing. With some debugging, it was found that av_read_packet () 
inside av_read_frame_internal() does most of processing. 

Can somebody suggest possible solutions? Is it somehow possible to optimize 
av_find_stream_info() for my scenario? Any help appreciated.

Thanks & Regards,
Prageeth

[Wed Sep 29 16:46:53.062 2010]demux:av_find_input_format start
[Wed Sep 29 16:46:53.062 2010]demux:av_find_input_format end
[Wed Sep 29 16:46:53.062 2010]demux:av_open_input_file start
[Wed Sep 29 16:47:23.203 2010]raw_packet_buffer_remaining_size=2500000
[Wed Sep 29 16:47:23.234 2010]demux:av_open_input_file end
[Wed Sep 29 16:47:23.234 2010]demux:av_find_stream_info start
[Wed Sep 29 16:48:04.796 2010][aac @ 0x9b9d00]channel element 3.3 is not 
allocated
[Wed Sep 29 16:48:34.953 2010][NULL @ 0x9bb390]non-existing PPS referenced
[Wed Sep 29 16:48:34.953 2010][h264 @ 0x9bb390]non-existing PPS 1 referenced
[Wed Sep 29 16:48:34.953 2010][h264 @ 0x9bb390]decode_slice_header error
[Wed Sep 29 16:48:34.953 2010][h264 @ 0x9bb390]no frame!
[Wed Sep 29 16:48:34.953 2010][h264 @ 0x9bb390]non-existing PPS referenced
[Wed Sep 29 16:48:34.953 2010][h264 @ 0x9bb390]non-existing PPS 1 referenced
[Wed Sep 29 16:48:34.953 2010][h264 @ 0x9bb390]decode_slice_header error
[Wed Sep 29 16:48:34.953 2010][h264 @ 0x9bb390]no frame!
<snipped similar messages>
[Wed Sep 29 16:48:35.312 2010] max_analyze_duration reached
[Wed Sep 29 16:48:35.312 2010] [mpegts @ 0x9ae140]Estimating duration from 
bitrate, this may be inaccu
[Wed Sep 29 16:48:35.312 2010] demux:av_find_stream_info end
[Wed Sep 29 16:48:35.312 2010] Input #0, mpegts, from '(null)':
[Wed Sep 29 16:48:35.312 2010]   Duration: N/A, start: 21621.585433, bitrate: 
50 kb/s
<snipped>
[Wed Sep 29 16:48:35.328 2010]   No Program
[Wed Sep 29 16:48:35.328 2010]     Stream #0.0[0x883]: Audio: aac, 48000 Hz, 
mono, s16, 50 kb/s
[Wed Sep 29 16:48:35.328 2010]     Stream #0.1[0x887]: Data: 0x0000
[Wed Sep 29 16:48:35.328 2010]     Stream #0.2[0x881]: Video: h264, yuv420p, 
320x180, 11.44 fps, 14.99
[Wed Sep 29 16:48:35.328 2010]  tbr, 90k tbn, 14.99 tbc
-----Original Message Ends-----

Hi All,

On further debugging, it looks like probing for AAC consumes most time/data. 
Any suggestions on how to speed this up?

Thanks & Regards,
Prageeth


_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to