Prageeth | 5 Oct 2010 12:30
Picon

Re: Help with av_find_stream_info()


-----Original Message Starts-----
From: libav-user-bounces@...
[mailto:libav-user-bounces@...] On Behalf Of Prageeth
Sent: Wednesday, September 29, 2010 5:58 PM
To: libav-user@...
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
(Continue reading)

Ruslan Georgiev | 5 Oct 2010 15:17

Help with demuxing

I need to implement a demuxer for a proprietary MPEG-4 container. I think that it's MPEG-4 based on the
information provided by MediaInfo. How do I go identifying the stream start and container info?
Thank you very much in advance.

Regards,
r_georg
Tomas Härdin | 5 Oct 2010 15:52
Picon

Re: Help with demuxing

On Tue, 2010-10-05 at 08:17 -0500, Ruslan Georgiev wrote:
> I need to implement a demuxer for a proprietary MPEG-4 container. I think that it's MPEG-4 based on the
information provided by MediaInfo. How do I go identifying the stream start and container info?
> Thank you very much in advance.
> 
> Regards,
> r_georg

What does ffprobe say? Have you looked at the file in a hex editor and
found the ftyp and moov atoms? Is it encrypted in any way? Finally, are
you allowed to upload it?

/Tomas
_______________________________________________
libav-user mailing list
libav-user@...
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Ruslan Georgiev | 5 Oct 2010 16:09

Re: Help with demuxing

Thanks a lot Tomas,

Ffprobe says:
Format detected only with low score of 25, misdetection possible!
c:\..\<filename>: Operation not permitted

I have found only the 0x000 0x000 0x001 0x0b6 pattern that identifies a frame in MPEG-4. I don't know if it's
encrypted or not. I am trying to peek as much as I can from the format before going into a discussion with
their engineering.
How can I identify the byte patterns for ftyp and moov?

Thanks,
r_georg

-----Original Message-----
From: libav-user-bounces@...
[mailto:libav-user-bounces <at> mplayerhq.hu] On Behalf Of Tomas Härdin
Sent: Tuesday, October 05, 2010 9:53 AM
To: Libav* user questions and discussions
Subject: Re: [libav-user] Help with demuxing

On Tue, 2010-10-05 at 08:17 -0500, Ruslan Georgiev wrote:
> I need to implement a demuxer for a proprietary MPEG-4 container. I think that it's MPEG-4 based on the
information provided by MediaInfo. How do I go identifying the stream start and container info?
> Thank you very much in advance.
> 
> Regards,
> r_georg

What does ffprobe say? Have you looked at the file in a hex editor and found the ftyp and moov atoms? Is it
(Continue reading)

Tomas Härdin | 5 Oct 2010 16:18
Picon

Re: Help with demuxing

Please don't top post on this list

On Tue, 2010-10-05 at 09:09 -0500, Ruslan Georgiev wrote:
> Thanks a lot Tomas,
> 
> Ffprobe says:
> Format detected only with low score of 25, misdetection possible!
> c:\..\<filename>: Operation not permitted
> 
> I have found only the 0x000 0x000 0x001 0x0b6 pattern that identifies a frame in MPEG-4. I don't know if it's
encrypted or not. I am trying to peek as much as I can from the format before going into a discussion with
their engineering.
> How can I identify the byte patterns for ftyp and moov?
> 
> Thanks,
> r_georg
> 
> -----Original Message-----
> From: libav-user-bounces@...
[mailto:libav-user-bounces <at> mplayerhq.hu] On Behalf Of Tomas Härdin
> Sent: Tuesday, October 05, 2010 9:53 AM
> To: Libav* user questions and discussions
> Subject: Re: [libav-user] Help with demuxing
> 
> On Tue, 2010-10-05 at 08:17 -0500, Ruslan Georgiev wrote:
> > I need to implement a demuxer for a proprietary MPEG-4 container. I think that it's MPEG-4 based on the
information provided by MediaInfo. How do I go identifying the stream start and container info?
> > Thank you very much in advance.
> > 
> > Regards,
(Continue reading)

Ruslan Georgiev | 5 Oct 2010 16:32

Re: Help with demuxing

Thanks Tomas,

I meant MPEG-4 Visual encoded stream, not the container which is ps. MediaInfo lists the following:

Format                           : MPEG-PS
File size                        : 1.90 MiB
Duration                         : 4mn 55s
Overall bit rate                 : 54.0 Kbps

Video
ID                               : 224 (0xE0)
Format                           : MPEG-4 Visual
Format settings, BVOP            : No
Format settings, QPel            : No
Format settings, GMC             : No warppoints
Format settings, Matrix          : Default (H.263)
Duration                         : 4mn 55s
Bit rate                         : 52.9 Kbps
Width                            : 640 pixels
Height                           : 480 pixels
Display aspect ratio             : 4:3
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Stream size                      : 1.87 MiB (98%)

Attached is the header.

Regards,
(Continue reading)


Gmane