Page 1 of 1

Wrong duration for MPEG-2 PS files

Posted: 08 Jul 2012 09:24
by fturco
Hello. I'm using VLC 2.0.1 for Ubuntu. I have several TV recordings in MPEG-2 PS format. Those files have been obtained by using ProjectX (for synchronization issues) and Avidemux (for removing commercials). For all of them VLC reports a wrong duration. Other video players report the correct duration. For example, for one file VLC reports 1:17:52, while Gnome Mplayer reports 1:53:33. In all cases, VLC reports a shorter duration. I don't know if VLC is wrong or if I made those videos in the wrong way. What can I do? Thanks.

Re: Wrong duration for MPEG-2 PS files

Posted: 08 Jul 2012 10:52
by kmf31
You mention an old problem for certain mpeg2 ps files which I have also encountered for many years with different versions of vlc, projectX and mplex (mplex is also used by Avidemux to remux). I never found a solution but may be somebody else has some explanations ?

However, apart from this point theses files are not problematic and play very well, only when you use vlc to jump one minute etc. in the file it will be in the wrong units.

Furthermore if you use dvdauthor to create a video DVD (i.e. vob files in a certain directory structure that can be burned on a DVD) with such files, the length of the video on the DVD will be correct (also "in vlc" when playing this DVD) since in the vob files there are additional time-references (as far as I understand).

Re: Wrong duration for MPEG-2 PS files

Posted: 08 Jul 2012 11:09
by nkoriyama
Known issue for ages. Duration and seeking are incorrect for MPEG-2 PS.

You can try avformat demuxer.
Preferences -> All -> Input / Codecs -> Demuxers
Demux module

Re: Wrong duration for MPEG-2 PS files

Posted: 08 Jul 2012 11:30
by fturco
Avformat demuxer seems to fix the problem. Thank you.

Re: Wrong duration for MPEG-2 PS files

Posted: 28 Jul 2012 19:57
by rpm
Hi All, I'm facing issue of MPEG-PS on vlc, some files are playing fine, while other fails. All files are created from same system with same parameters (mentioned below is info)
Major issue is of fast seek on Track slider, file get stuck for few seconds (6-15secs) & may play .While some files video plays fine & audio is mute.

Will Demuxer setting will fix this issue?

Info of file:
Overall bit rate : 20.6 Mbps
Video ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : 4:2:2@Main
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Duration : 1h 24mn
Bit rate : 19.8 Mbps
Maximum bit rate : 20.0 Mbps

Re: Wrong duration for MPEG-2 PS files

Posted: 28 Jul 2012 20:17
by kmf31
If mpeg2-ps files are really having a problem (i.e. not working at all or not working with audio) there is also a problem with the software that has created these files.

What happens with vlc and files created by mplex (e.g. with avidemux or directly after using projectX) is that they play perfectly well with audio but sometimes the length is not correct but this is not a real problem.

For me the "solution" with avdemux (in the preferences) does not at all work. However to me it seems the wrong duration is only shown when vlc uses libmpeg2 which is the default mpeg2 codec and which is very effecient. However with the option "--demux ffmpeg" vlc chooses ffmpeg to decode mpeg2 (uses a bit more of cpu but this no problem with mpeg2-SD files) and the duration is correct. This option might also help for your other faulty files.

Re: Wrong duration for MPEG-2 PS files

Posted: 29 Jul 2012 20:11
by rpm
For me all files are playing absolutely fine other players viz. Elecard , arc soft etc.
Issue is only with VLC. It opens files but fast seeking & play smoothly is an problem.

Re: Wrong duration for MPEG-2 PS files

Posted: 31 Jul 2012 02:27
by Jean-Baptiste Kempf
You need to share the file.

Re: Wrong duration for MPEG-2 PS files

Posted: 31 Jul 2012 19:26
by rpm
Wow ! Thanks kmf31 & all ..Issue is fixed.
After choosing option as demux ffmpeg all the files starting working as expected.
Seek anywhere no problem.

Re: Wrong duration for MPEG-2 PS files

Posted: 01 Aug 2012 01:47
by Jean-Baptiste Kempf
It would still help to have the file.

Re: Wrong duration for MPEG-2 PS files

Posted: 01 Aug 2012 11:02
by kmf31
It would still help to have the file.
I can provide you with a short test file with the "wrong duration problem" for mpeg2-PS (created by projectX and mplex). Is that okay or do you specifically ask for the(s) file(s) of rpm who seems to have somewhat more complicated problems ?

Re: Wrong duration for MPEG-2 PS files

Posted: 01 Aug 2012 23:05
by Jean-Baptiste Kempf
any file is ok.

Re: Wrong duration for MPEG-2 PS files

Posted: 02 Aug 2012 12:03
by rpm
Like to share- I was able to choose option of FFmpeg in older VLC ver-1.1.1
Any thoughts on how to do this in latest version i.e. VLC 2.

Re: Wrong duration for MPEG-2 PS files

Posted: 02 Aug 2012 23:41
by kmf31
For me the option "--demux ffmpeg" works well for vlc-2.0.x (x=1,2,3) but for a recent vlc-2.1.0-git version it does indeed not work.

Re: Wrong duration for MPEG-2 PS files

Posted: 02 Aug 2012 23:46
by Jean-Baptiste Kempf
--demux avformat