Log in

View Full Version : Mpeg-1 problem


Mike777
9th May 2005, 15:06
I am completely puzzled by a problem which I dont see any way of overcoming for weeks now. Maybe somebody here can give me some help on this matter or suggest something?

I have a set of files in .mpg format (VCD MPEG-1) with more files like that being downloaded from internet, so I cannot really ask creator of the file to encode it differently. I can watch them on my PC, I can watch them on my dvd player (it can playback them as files on it) but i need to compile a dvd disc which will have same quality of video (i.e. VCD-quality), but will be dvd 100% compatible. I have done it dozens of times before using TMPGEnc Dvd Author but now it seems something is wrong with MPEG-1 files so I suppose I need to fix or reencode them without loosing quality. Why? because when I import the files into Dvd Author it only sees it as a clip much shorter than it actually is (for example only 7 minutes long instead of being 70 minutes). When I look inside those 7 minutes its only a part of the clip that I need to use. I tried looking at that file with other convertors/encoders but nothing seemed to help me to make this file appear for them as 70 minutes long, not 7 minutes. For example Canopus ProCoder sees this file as 7 minutes long too. VCDGear "fix" option doesnt seem to change anything. TMPgEnc Plus doesnt see more than 7 minutes there as well. Appears to me that time information within that file is wrong. The only program that can see full 70 minutes is WinAvi Video Convertor, but when it reencodes the video the quality becomes very very bad and using it later for my project is not possible because of low quality. Any ideas or suggestions how can I fix those VCD files or reencode them to correctly working files without loosing anything quality-wise.
When watching these files manually on the computer via Windows Media Player or as a file on my dvd player, as I already pointed out, everything seems to be fine - the whole 70-mins video is played back, but I need to use that whole video later for a dvd project.

With best regards,

Mike

mpucoder
9th May 2005, 15:13
Use ReStream to remove the sequence_end headers.

Mike777
9th May 2005, 16:14
Tried to use restream but some additional questions appeared. Mpucoder, please advise...

1) in order to make anything with my mpg file i need to demux it to elementary streams. to do that i need to use a program but tmpgenc plus which i use for that demuxes only short part of the video (same 7 mins) so I cant improve my situation by using restream...

2) if i manage to demux the file correctly is it OK that I use MPEG-1 and not MPEG-2 video with ReStream?

With best regards,

Mike

Pookie
9th May 2005, 17:32
Since it is Mpeg1, you can load it into regular VirtualDub. See if the length is correct. If it is, frameserve from VirtualDub to your encoder.

mpucoder
9th May 2005, 17:45
I just tried ReStream on mpeg-1, and it does not work - sorry, didn't know that. But sequence_end is probably the cause of the short length. I don't know of any other way short of a hex editor to remove them.

Mike777
9th May 2005, 17:50
Mpucoder -
Can you give me an idea what I need to do with mpeg-1 file in hex editor to possibly fix my problem?

mpucoder
9th May 2005, 18:09
Find every occurence of 00 00 01 B7 and change it to 00 00 00 00 You can leave the one at the end of the file.
But this is for the video stream itself. In a system stream you could find that value outside the video stream. Changing anything in another stream could be disasterous - so demux it first.

Mike777
9th May 2005, 19:44
I've loaded that file into VirtualDub. It actually recognized all the video in its full form, but gave a warning of "anachronistic or discontinuous timestamp in video stream 0 at byte position X. This may indicate an improper join" several times. How can I use frameserver from VirtualDub for TMPGEnc as I am not very familiar with such task and I dont want to convert to AVI.

Looking forward for an advice, thanks in advance.

Mike

mpucoder
9th May 2005, 20:29
This is not exactly an answer to that question, but the byte position given is probably where you'll find the sequence_end code (00 00 01 B7) ;)