Wrong Duration for MPEG2 movies

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
McDummy
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2013 13:12

Wrong Duration for MPEG2 movies

Postby McDummy » 09 Apr 2013 10:15

Hi,

I have the following problem: When I record satellite TS streams, use ProjectX or PVAstrumento to demux them, edit the elementary streams with Mpeg2Schnitt, and use mplex (Mjpegtools) or imagomuxer for muxing, vlc shows most of the time a wrong duration (mostly half of the film length) for the resulting mpg movies. The movies themselves play fine.

I know, this seems to be an old problem, but I haven't found a solution so far.

Interestingly, when I use bbmpeg or mplex (Mike Grover) for muxing the same elementary streams, vlc shows the correct duration. Therefore, it seems that this problem could be caused by improper muxing parameters or by errors in the streams that are corrected by some muxers. Unfortunately, I cannot work out why vlc sometimes shows a wrong duration for mplex(Mjpegtools)/imagomuxer but not for bbmpeg/mplex(Grover).

Could someone help me an explain how vlc determines the duration/length of an mpeg2 movie?

If required, I could upload examples of mpeg files created from the same elementary streams with different muxers that show this behavior.

Thanks for your help

McDummy

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Wrong Duration for MPEG2 movies

Postby Jean-Baptiste Kempf » 09 Apr 2013 12:30

VLC determines duration based on the PCR.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

McDummy
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2013 13:12

Re: Wrong Duration for MPEG2 movies

Postby McDummy » 09 Apr 2013 13:03

Thanks for the short info. Could you give me some more information.

Does VLC just look at the first and the last PCR value and calculates the length from the difference?

I once also encountered the problem with pvastrumento and mplex that the duration is changing constantly while a movie is replayed.

Is there a way to upload my example files (18 Mbytes each) so it can be determined why vlc determines the different durations?

McDummy
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2013 13:12

Re: Wrong Duration for MPEG2 movies

Postby McDummy » 16 Apr 2013 14:21

Just to prevent a misunderstanding:

I thought that PCR are parts of the MPEG2 transport streams but not contained in MPEG2 Program Streams.

There are no problems with the transport streams I record with my receiver - VLC shows the correct duration for these files. Only when I demux, edit, and then remux the AV data to create mpeg (program stream) files, VLC often shows an incorrect duration.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Wrong Duration for MPEG2 movies

Postby Jean-Baptiste Kempf » 16 Apr 2013 15:23

Ah, then no idea.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

McDummy
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2013 13:12

Re: Wrong Duration for MPEG2 movies

Postby McDummy » 18 Apr 2013 12:13

I've just checked some of the problematic files and found that these files contain several system headers. In contrast, the "good" ones have at most one system header (depending on the muxer). Therefore, I wonder if this could cause the problem.

However, that's just a guess. Maybe someone who has more experience could have a look at the problematic files. Is it possible to upload the problematic files to this forum (I haven't found any upload possibilities yet).

McDummy

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Wrong Duration for MPEG2 movies

Postby Jean-Baptiste Kempf » 18 Apr 2013 15:33

This is probably the issue, indeed.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 189 guests