Wrong duration for MPEG-2 PS files

*nix specific usage questions
fturco

Wrong duration for MPEG-2 PS files

Postby fturco » 08 Jul 2012 09:24

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.

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

Re: Wrong duration for MPEG-2 PS files

Postby kmf31 » 08 Jul 2012 10:52

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).

nkoriyama
Cone that earned his stripes
Cone that earned his stripes
Posts: 338
Joined: 01 Sep 2011 20:50
VLC version: git
Operating System: Windows / Mac OS X
Location: Japan

Re: Wrong duration for MPEG-2 PS files

Postby nkoriyama » 08 Jul 2012 11:09

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
How To Ask Questions The Smart Way http://www.catb.org/~esr/faqs/smart-questions.html
My hack for ISDB-T http://sdrv.ms/126weue

fturco

Re: Wrong duration for MPEG-2 PS files

Postby fturco » 08 Jul 2012 11:30

Avformat demuxer seems to fix the problem. Thank you.

rpm
New Cone
New Cone
Posts: 4
Joined: 28 Jul 2012 19:41

Re: Wrong duration for MPEG-2 PS files

Postby rpm » 28 Jul 2012 19:57

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

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

Re: Wrong duration for MPEG-2 PS files

Postby kmf31 » 28 Jul 2012 20:17

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.

rpm
New Cone
New Cone
Posts: 4
Joined: 28 Jul 2012 19:41

Re: Wrong duration for MPEG-2 PS files

Postby rpm » 29 Jul 2012 20:11

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.

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 MPEG-2 PS files

Postby Jean-Baptiste Kempf » 31 Jul 2012 02:27

You need to share the file.
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.

rpm
New Cone
New Cone
Posts: 4
Joined: 28 Jul 2012 19:41

Re: Wrong duration for MPEG-2 PS files

Postby rpm » 31 Jul 2012 19:26

Wow ! Thanks kmf31 & all ..Issue is fixed.
After choosing option as demux ffmpeg all the files starting working as expected.
Seek anywhere no problem.

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 MPEG-2 PS files

Postby Jean-Baptiste Kempf » 01 Aug 2012 01:47

It would still help to have the file.
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.

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

Re: Wrong duration for MPEG-2 PS files

Postby kmf31 » 01 Aug 2012 11:02

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 ?

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 MPEG-2 PS files

Postby Jean-Baptiste Kempf » 01 Aug 2012 23:05

any file is ok.
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.

rpm
New Cone
New Cone
Posts: 4
Joined: 28 Jul 2012 19:41

Re: Wrong duration for MPEG-2 PS files

Postby rpm » 02 Aug 2012 12:03

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.

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

Re: Wrong duration for MPEG-2 PS files

Postby kmf31 » 02 Aug 2012 23:41

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.

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 MPEG-2 PS files

Postby Jean-Baptiste Kempf » 02 Aug 2012 23:46

--demux avformat
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 “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests