IT-FORUM

IT-FORUM



SearchSearch   Users   Registration   Entrance
Today: 30.03.2026 - 17:58:11
Pages:  1  

A program to help re-encode a mpeg2 stream with same birtrate?

AuthorMessage

Phattydave

fluder


Statistics:
Messages: 434
Registration: 09.04.2002

I hope you can help me with this. I need to do some editing to MPEG2 files. I do not wish to change the bitrate. However, I cannot use a standard MPEG2 cutter because I need to make a cut in the middle of a GOP. This means that at least the first GOP needs to be re-encoded. Is there a program that will scan a mpeg2 file to figure out the bitrate of each frame and then pass that to CCE/HC/QuEnc/any other encoder? I wish to save this without any loss of quality at all. THe video source I have is 29.97 FPS with Repeat Frames turned on. Most mpeg cutters I found really mess up with repeat frames, so this program and the encoder would need to support this. I would like the finished mpeg stream matching as closely as possible to the original stream -- repeat frames and all. Thanks, SS



Message # 1 16.01.22 - 04:32:58
RE: A program to help re-encode a mpeg2 stream with same birtrate?

97 332ti

fluder


Statistics:
Messages: 15
Registration: 11.08.2002

I think you will not find an MPEG encoder who does that. The closest you can get to match the original file is probably to extract the matrix which was used on the source and use this matrix for the reencode. But if if your main problem is that you have to make a cut in the middle of a GOP, why don't you give Cuttermaran a try? It can cut at any frame if you have installed one of the supported encoders (TempEnc, HC, QuEnc). I do not know how well it handles repeat frames (I live in PAL land), but it's certainly worth a try. Cheers manolito


---------------------
-Matt 332ti
Message # 2 16.01.22 - 04:40:59
RE: A program to help re-encode a mpeg2 stream with same birtrate?

///Milk

fluder


Statistics:
Messages: 431
Registration: 12.18.2002

Thanks for the replay. :) I think I used an incorrect term. I think the correct term is interlaced frames. I have some screenshots as to what I mean. These are of the Harry Potter movie which is encoded exactly the same way that the other movie is. I am at home now and just playing around with this movie pracicing cutting and trying out various programs. I have tried the program you mentioned, but it does not display the video right, and I don't why. It seems as though it is not taking the Interlaced frames right. I think they are repeats of the before and after frame and interlaced. :S I need a cutter that can see these frames, like VDub can. VDib displays it perfectly, but ..... it only outputs in avi. <_< I need a cutter that can handle this as well as VDub can. I have tried Womble, but it too fails at these frames. I am trying to contact the author of that program about this situation to see what can be done about it. I really loved that program and I think it has a a lot of great features that you don't find in other freeware options. What I can do, is cheat I guess, but I don't know how to do it, which is why I hope a program is available for me to aid, because I know absolutely nothing about avisynth. I know DVD Rebuilder by JDobbs uses this. It outputs a m2v file with an avs script that can be read by CCE/Quenc/... What I need is a program that can analyze the m2v file, and produce a map for the encode of the entire stream and then I can use the trim feature and trim the file at various places thus the encoder will take that and output a m2v file that is bang on where I want the cuts.


---------------------
///Mooo
Message # 3 16.01.22 - 04:45:22
RE: A program to help re-encode a mpeg2 stream with same birtrate?

MrGone

fluder


Statistics:
Messages: 127
Registration: 05.29.2002

OK, I looked at the stills you uploaded, and yes, they show combing. But that does not necessarily mean that your source MPEG2 file is interlaced. How did you create this MPEG2 file? The source has been shot on film and is progressive. For a conversion to NTSC you could either have used "Soft" Telecine or "Hard" Telecine. "Soft" means that you encoded progressive at 23.976 (or 24) fps and enabled 3:2 pulldown flags (which means that the decoder repeats fields to reach the required 29.97 fps output). "Hard" means that the repeated fields are part of the encode. To use a software like Cuttermaran you have to demux your MPEG2 file. If it was "Soft" telecined then the repeated fields will not show up in Cuttermaran because they are not present in the M2V. In this case you can do your edits in Cuttermaran and save the edited elementary streams. But before muxing you have to apply pulldown to the edited M2V file (use Pulldown.exe or DGPulldown by Neuron2). If your soure was "Hard" telecined then Cuttermaran will certainly display the combed frames. In this case there is no need to apply pulldown after cutting. Well, since I never really have to deal with NTSC my knowledge about Telecine and all the related problems is basically academic. Which means that my post could be total BS. (But I don't think so...) Cheers manolito


---------------------
1968 Mustang vintage racer build thread
Message # 4 16.01.22 - 04:51:56
RE: A program to help re-encode a mpeg2 stream with same birtrate?

///M4life

fluder


Statistics:
Messages: 3,137
Registration: 03.09.2003

For this movie, I just decrypted it using full movie decypt, then PgcDemus to pull out the main movie to demuxed .m2v and ac3 files. It is suppose to be 29.97 fps and I think it has 3:2 pulldown, so it has repeat frames or interlaced frames. It should be encoded into the stream correctly, unless the original DVD source mpeg2 was not encoded correctly. I can use restream to change it to 23.97 fps and video stays in sync in cutterman, but Media Player Classis plays the original 29.97 fps stream correctly.



Message # 5 16.01.22 - 05:00:27
RE: A program to help re-encode a mpeg2 stream with same birtrate?

axion911

fluder


Statistics:
Messages: 80
Registration: 03.13.2001

Those pics were from VDub MPEG-2, right? If you were to open the M2V in VDubMod, you won't see the interlacing (you shouldn't see it anyway), as it ignores the RFF flags. VDub MPEG-2 can also be set the same way. My suggestion is to edit the video however you like, using Cuttermaran or Womble or something, and then reapply the flags using DGPulldown. Which is the same as manolito said.


---------------------
92 awd talon Buschur 2.5 inch turbo back exhaust, no cat, free mods, autometer a/f and boost gauges
Message # 6 16.01.22 - 05:05:52
RE: A program to help re-encode a mpeg2 stream with same birtrate?
Engine codes and where next !!!!!! : Previous topicNext topic: PROBLEMS REINSTALLING REAPER WINDOWS 7
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants