[Ffmpeg-devel] Odd Missing Video Results

Måns Rullgård mru
Wed Jun 7 01:33:27 CEST 2006


Please don't top-post.

Myron L Stewart <mavmann at ingeniak.com> writes:

>> Myron Stewart <mavmann at ingeniak.com> writes:
>> 
>>> Hello,
>>> 
>>> I have been using the ffmpeg library for a project and for some
>>> odd reason seeking past the the start on these 2 particular files
>>> is causing the video to be missing. The file size seems to
>>> indicated video was added, but when you attempt to play the video
>>> in for example mediaplayer, quicktime, or vlc, there is only
>>> audio. One thing I did notice is that both of these files have
>>> swapped audio channels where the audio is on channel 0 and the
>>> video is on channel 1.
>>> 
>>> I also did a test with ffmpeg.exe using the ss option to seek
>>> ahead and get the same problem. For some reason the ffmpeg library
>>> thinks that the first stream is a video stream instead of an audio
>>> stream. Here are the 2 files:
>> 
>> The video elementary stream in those files has no repeated sequence
>> headers.  Strictly according to the standard, this is allowed.  It is
>> not generally a good idea though, as you have seen.  I'd suggest
>> avoiding TMPGEnc if it creates such streams.
>
> I did not create them. I got them from my client. The project I am
> working on has to be able to work with just about any mpeg stream. I

This is the first time I've come across MPEG streams like that.
Whatever program created those files must surely have some option to
create sensible output.  If your client is not willing to investigate
that, I'd say he's a waste of time.

> can see that the mpeg is poorly created, but it has been difficult
> convincing my client on this, especially when avidemux can work with

What can avidemux do with the files?

> the files. I am not sure what they are doing. At least I am not the
> only person who can see the way these are done are not correct.
> Thanks for the info. I'll pass this along to them. I am still trying
> to see if there is a way around this using ffmpeg.

The only way to decode streams like that is to read the sequence
header at the start before doing anything else.  When that is done, it
is possible to seek to any position (well, to any I-frame) in the
stream and start decoding.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list