View Full Version : vhs recorded mpg went out of sync when I extract the streams
lansing
4th March 2014, 17:53
Originally I had a wtv file that was recorded from a vhs, and then I remuxed it into mpg by using the graphicstudio method said in here (http://forum.videohelp.com/threads/325139-WTV-remux-to-MPG). The output mpg played fine in all the players. However, when I try to extract the streams or remux them into mkv, it starts going out of sync. I have no idea what is causing this problem. The only remuxing method that works is by ffmpeg stream copy
ffmpeg -i test.mpg -vcodec copy -acodec copy -ss 00:35:00 -to 00:40:00 output.mkv
And it has a lot of warning in the log like this
[matroska @ 00000000026a0180] Non-monotonous DTS in output stream 0:0; previous:
276687, current: 276667; changing to 276687. This may result in incorrect times
tamps in the output file.
If I extract the stream from this mkv, they're still going to be out of sync.
lansing
4th March 2014, 23:24
I found out the problem, looks like my video stream has a lot of dropped frames, therefore when I extract them, the video is not able to keep in sync with the audio.
I tried videoredo plus and it fixed it by inserting frames where it detected to be out of sync, but it's not free. Is there any other software that can do the same?
Guest
5th March 2014, 01:39
IMHO, it would be more sensible to fix your capture process so that frames are not dropped.
Asmodian
7th March 2014, 01:41
This is really hard to deal with in my experience, I ended up purchasing a TBC to avoid dropped frames as even a few can cause very annoying issues. It looks like you have really a lot. I wonder how videoredo manages the "detected to be out of sync" and I assume that involves a re-encode?
The key with dropped frames is to not remux or extract the raw streams as that loses all the timing information. If you want to salvage this file you might be able to; if you can get the time codes out of the mpg you could feed them to mkvmerge and create a vfr mkv. Sorry this is just a hint. :o
manolito
7th March 2014, 20:30
Are you sure the file originated from a VHS capture?
WTV - format used by Windows Media Center to record DVB.
It is essentialy only a container for MPEG2 video and MPA/AC3 audio stream. It's an unfortunate alternative for MPEG-TS, you could say.
If it really came from DVB instead, you should run the MPEG file through ProjectX or PVAStrumento.
Cheers
manolito
lansing
7th March 2014, 20:56
Are you sure the file originated from a VHS capture?
If it really came from DVB instead, you should run the MPEG file through ProjectX or PVAStrumento.
Cheers
manolito
It's recorded from a 20 years old tape. The streams inside are mpeg2 and mp2.
manolito
8th March 2014, 11:42
It is very unusual to end up with an MPEG2 transport stream when capturing VHS. Normally you only get transport streams when capturing DVB broadcasts.
But whatever, your symptoms are the ones you get after capturing an MPEG2 transport stream. Before you can do anything with it, you need to convert it into a program stream. VideoRedo does just that, as well as PVAStrumento and ProjectX. So if you are happy with the output from VideoRedo there is not much else you can do.
Other than that if you need to capture VHS more often you should really streamline your capture procedure, as neuron2 already suggested. Capture to YUY2 AVI using either a lossless compressor (HuffYUV, Lagarith, UT) or MJPEG. Use uncompressed PCM for audio. If audio capturing is handled by the sound card, you need to use capturing software which takes care of the audio drift (VirtualDub or Virtual VCR).
Capturing directly to MPEG2 only makes sense if your capturing device uses a hardware MPEG2 encoder (very rare these days). Using a software MPEG2 encoder in real time really degrades quality.
Cheers
manolito
Sharc
8th March 2014, 12:16
With my mid-age PC I did all my VCR tape captures with Virtual VCR, compressing the interlaced video with HuffYUV in real time and saving to an unfragmented section of the HD. I had no dropped frames with Virtual VCR, opposite to VirtualDUB where it was more difficult to avoid dropped frames over a longer period with my system.
The HuffYUV video files and PCM Audio can later be processed and compressed off-line to mpeg2 or mpeg4 in order to reduce the file size.
Any attempts with real-time compression to mpeg2 resulted always in either poor video quality (blocks), dropped frames, or both.
lansing
9th March 2014, 04:16
The person who sent me the video for fixing is a total newbie in this field, so I really can't ask too much from her. She'll probably think I'm crazy if I ask her to buy a TBC for this.
After some searching, I came into this article talking about cheap TBC called Video Scaler Pro that cost $60 back on 2004 on ebay, but I couldn't find one now.
http://www.unterzuber.com/TBC.html
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.