PDA

View Full Version : 5 hour Mpeg-2 file shows only 50 minutes


itsa
29th September 2008, 01:44
I captured some video with my pvr500mce. I now have a video file of 5 hours long. It is showing 5 hours when watching into MPC but as soon as I want to transcode or re-process the file, any program I use only shows me 50 min 37s?

I tried MPEG Header Corrector 1.0, but that did not do anything.

How can I correct this problem?

itsa

neuron2
29th September 2008, 04:36
Try DGMPGDec.

itsa
29th September 2008, 06:02
After demuxing the whole file, I can still only process 50 min 37s (?)

log:
Stream Type: MPEG2 Program
Profile: main@main
Frame Size: 720x480
Display Size:
Aspect Ratio: 4:3 [2]
Frame Rate: 29.970030 fps
Video Type: NTSC
Frame Type: Interlaced
Coding Type: P
Colorimetry: BT.470-2 B,G*
Frame Structure: Frame
Field Order:
Coded Number: 539391
Playback Number: 2
Frame Repeats: 0
Field Repeats: 0
VOB ID:
Cell ID:
Bitrate:
Bitrate (Avg):
Bitrate (Max):
Audio Stream: c0: MPA L2 2ch 48 384
Timestamp: 0:50:37
Elapsed: 0:08:05
Remain: FINISH
FPS:
Info:

itsa

video_magic
29th September 2008, 10:39
Some people say that ProjectX can succeed with mpeg which other applications don't understand so well.

http://www.videohelp.com/tools/ProjectX

pandy
29th September 2008, 11:13
How can I correct this problem?

itsa

Probably there is problem with bitrate signalization/calculation - plenty of players calculate duration of stream using bitrate from header not real bitrate, probably in Your stream header has bitrate max allowable for DVD (8000 - 9600kbps), average bitrate is much much lower.
You may simply correct this problem by using restream and put in header average bitrate.
average bitrate calculate accordingly to the formula (size elementary bitstream in bites i.e. size in byte*8) / (duration of elementary stream stream i.e. number of frames divided by frame rate) = average elementary stream bitrate in bites per second

neuron2
29th September 2008, 13:57
After demuxing the whole file, I can still only process 50 min 37s (?) The log you gave shows 5 hours. Don't demux, just make a project and serve the video using MPEG2Source() in your Avisynth script.

Probably you have a sequence end code in the stream. I think you can remove it with Restream if you want to fix the original M2V.

G_M_C
29th September 2008, 15:33
After demuxing the whole file, I can still only process 50 min 37s (?)

log:
[...]
Frame Rate: 29.970030 fps
[...]
Coded Number: 539391
[...]
Timestamp: 0:50:37
[...]

539391 frames @ 29.970030 fps ~~ 17997 seconds, which is approx 5 hours long ;)

Why the timestamp doesn't work, don't know. But do what Neuron2 says, and all will be fine :)

itsa
3rd March 2009, 07:06
Ok I have tried ReStream with the Remove Seq. End Codes and the resulting m2v file is still seen as only 50m37s.

I did not serve a video in over 6 years; I forgot how! Can someone help me with the script and the procedure?

I am using TMPGEnc to transcode my video.

Thanks,

itsa

neuron2
3rd March 2009, 07:25
I did not serve a video in over 6 years; I forgot how! Can someone help me with the script and the procedure? Read the Quick Start guide that comes with DGMPGDec.

netmask
3rd March 2009, 10:07
I would try ProjectX it is pretty well the main tool for demuxing , video, audio and subtitles and fixing errors for the Topfield and Beyonwiz PVR community in Australia. I have written a guide and although it is for Australian PAL conditions the settings are pretty standard for any MPEG2 TS file.

http://www.openwiz.org/wiki/ProjectX

itsa
4th March 2009, 05:54
@neuron2: All right, I am taking it one step at a time. So I am now opening my file.avs into TMPGEnc and the video now shows up completely :) except now the audio which I also run through AviSynth only shows 1h53m32s!

My audio source is mp2 and I am loading the plugin mpasource_20080220 from WarpEnterprises.

Am I using the wrong plugin?

itsa

neuron2
4th March 2009, 15:21
Post your script.

How do you determine the duration of the resulting audio?

Open the MPA directly in MPC. What is the duration?

burfadel
4th March 2009, 15:46
There's the standard Projectx as outlined in the other threads here, and then a modified Projectx that can work much better on certain streams and DVD's etc.

Its available here:
http://oozoon.de/main_en.html

You can download the old version or the modified version which is still being developed, links are on the right hand side of the page. I recmmend the new one because it handles most things better, however the old version may be more beneficial in very rare cases.

If Projectx doesn't work, try PVAInstrumento:
http://www.offeryn.de/dv.htm

Make sure you get the 'recommended version' on the right hand side, not the more pronounced older version! Currently its V2.1.0.21

A good indication of whether the MPG file is any good or not is to look at the file size. If recordings typically use say, 3gb per hour (this may vary), your recording should approximately be 15gb. If its only 4gb there's a problem and no programme will be able to resolve it!

Note that Projectx and PVAInstrumento are NOT just demux tools, they are stream correction tools as well. They should resolve any issues in the bitstream and make it compliant for use in other programmes. If there are any errors in the stream, simply demuxing such as you can do through DGindex is a bad idea simply because the errors will still be there, and the video and audio may be out of sync. Projectx & Pvainstrumento keep video/audio sync.

If you still have a problem, use a tool such as Mpeg2cut2:
http://www.geocities.com/rocketjet4/

And use the latest Alpha version. It works fine, don't be worried about the 'alpha' label. Try cutting out the bad bit with that programme if Projectx/PVAinstrumento fail, such as cut out 50m 36s to 50m 39s or something, then use projectx/pvainstrumento over it (you must run one of those over it after using mpeg2cut2, or any other cutting tool for better compatibility)!

itsa
5th March 2009, 00:35
Here is my script:

LoadPlugin("C:\dgmpgdec154\DGDecode.dll")
LoadPlugin("C:\dgmpgdec154\mpasource.dll")
video=MPEG2Source("02-20080810.d2v")
audio=MPASource("02-20080810-1.mp2")
AudioDub(video,audio)

The file plays fine in MPC or WinAMP (299m57s), but serving the video, after 1h53m32s, the audio cuts out.

itsa

neuron2
5th March 2009, 00:38
I don't know anything about MPASource(). Instead of serving the audio through the script, try just muxing the MPA file with the encoded video at the end of the process.

Also, when you say the audio cuts out, do you mean when just playign the script in something, or when playing the encoded result? If the latter, how are you encoding the audio (remember Avisynth will deliver decoded audio).

olyteddy
8th March 2009, 20:19
I've had success using PVAStrumento to demux and correct timing errors with my Hauppauge captures.