logo       

Re: MPEG-2 Problems: msg#00285

video.ffmpeg.user

Subject: Re: MPEG-2 Problems

Erik Slagter wrote:
On Thu, 2006-02-23 at 17:16 -0600, Brian Brice wrote:
Greetings, I've been testing some code for outputting MPEG-2 videos
and I've been having some problems. First I checked what was wrong with my code, then tried to verify things with the main ffmpeg program. It seems the program does the same. The problem that I'm getting is that the MPEG-2 video format that ffmpeg outputs doesn't seem to be correct. In all of the players I've tested with, the duration time of the video is WAY off (such as really huge or even a negative number), and others can't even play
it. Here's a sample invocation of ffmpeg that I've used:

ffmpeg -i ffmpeg-sample.mpg test.m2v

The "ffmpeg-sample.mpg" is the file produced by the output_example program, but the problem persists with any kind of input video. I did try converting the file with:

ffmpeg -i ffmpeg-sample.mpg -vcodec mpeg2video test.mpg

This used the mpeg output format and mpeg2video codec, which the regular mpeg output format seems to be for MPEG-1.

Anyone else experience this? Any solutions? Is the mpeg2video output format "complete" or what? Thanks in advance. :-)

You might want to supply the CONTAINER, which in this case should be vob (mpeg2 program stream). If you don't, mpeg1 systems stream will be used.


This works great and looks as I expected. Now this leads to another
question. What about using the mpeg2video output format?

ffmpeg -i sample.mpg -f mpeg2video -vcodec mpeg2video test.m2v

When specifying an output file with the m2v extension, it guesses the
mpeg2video output format and mpeg2video codec, but something in the
output seems "off". I downloaded a few m2v videos to test the players I
was using to see if they showed way off durations and that was not the
case. Here are some durations reported with the 5 second clip, ffmpeg
MPEG2 file:

Windows Media Player: 40865:59:01
DivX Player: -300212:-29:-15
Real Player: 18:03:13:24

In other clips I found, all 3 players showed the same duration for
these. Viewing the m2v files in a hex editor showed they all start with
the video sequence header (0x000001b3) instead of a program stream pack
header.

--
Brian Brice
In order to know recursion, you must first know recursion...


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise