Log in

View Full Version : Minimal Reencoding a MPEG2 fle with a few peaks in bitrate


kotyczka
2nd March 2011, 23:06
Hallo, I've got a almost DVD compliant MPEG2 file which is designated
for an official DVD publication. Everything is fine except 4 GOPs
with a too high bitrate. Muxman is complaining.
I would like to provide 100% compliant stuff. So I'd like to have
an encoder which is smart enough to just reencode the GOPs with
the too high bitrate.

Is there any such software?

The only other way I can imagine is to split the file into parts
by hand, reencode the short parts with high bitrate and to put it
all together again.

Is there a more elegant way?

Biggiesized
3rd March 2011, 04:50
Lower your max bit rate and try encoding it again.

If you like your settings as they currently are constructed and don't want to artificially cap the encoder in scenes where you might need the extra bit rate, then you need to buy a professional encoder with segment re-encoding facilities. CCE SP3 is very good and relatively cheap, all things considered.

manolito
3rd March 2011, 18:35
Completely reencode for just 4 GOPs? There should be an easier way. Any MPEG2 editor with smart reencoding can do that.

My weapon of choice is Cuttermaran. It supports frame accurate cuts by incorporating an MPEG2 encoder. (CuttyEnc, QuEnc, HC and TMPGEnc are supported.)

Demux your file and load the streams into Cuttermaran. Make cuts in the middle of the problematic GOPs (not at an I-frame). This will lead to just reencoding the GOPs at the cuts, all the rest gets copied without reencoding.


Good luck
manolito

laserfan
3rd March 2011, 20:47
You could get a trial version of VideoReDo (good for 2 weeks, but you have to register it with an email address first) then just open it and Save again, selecting Options and Max Bitrate (and/or GOP size) and go. It should only touch the few areas where your max bitrate setting is exceeded.

Emulgator
8th March 2011, 21:56
kotyczka, out of curiosity: Which version of muxman complains ?
I have updated to Muxman 1.4 hoping that its muxer would allow for higher bitrates
as mpucoder announced
(not that I would have used it up until today), and would like to know how high the spike was
(Konran's Bitrate viewer maybe), and which muxman version complained.

kotyczka
9th March 2011, 10:00
You could get a trial version of VideoReDo (good for 2 weeks, but you have to register it with an email address first) then just open it and Save again, selecting Options and Max Bitrate (and/or GOP size) and go. It should only touch the few areas where your max bitrate setting is exceeded.
Thanks for your hint. I know VideoReDo (Plus), but I was not aware, that the new H.264 version is capable to do smart encoding now. Great tool. Seems to be exactly what I was looking for.

I am just curious about the speed. On my computer (P4@3400MHz, hyperthreading enabled, 7 years old) smart encoding the movie (52 minutes) took 51 hours, which is 1 frame in 2 seconds. VRD shows "Fast Frame Copy" all the time - or at least most of the time, I did not watch it all the 51 hours. And I binary compared the elemenatry video streams before and after recoding, they are identical for most of the frames. 1 frame in 2 seconds is not exactly what I understand to be "Fast Frame Copy". Yesterday I ran the same in another machine. I did not want to install VRD there, so I ran it in a virtual machine on the new computer. I went very quick there, processing 124 frames in a second. Any idea where this huge difference in speed might come from?

And there is something else I do not understand. I analysed the bitrate of the video before and after rencoding with
MpegValidator. And yes, I see that a few GOPs have a slightly lower bitrate now. But I told VRD to use a maximum bitrate of 8500 kbps - and still a see a maximum bitrate of 9316 kbps even after reencoding. So I have no idea how VRD actually does the reencoding.

The final movie will have DD5.1 audio at 448 kbps and two subtitle tracks. So a maximum of 9316 kbps in the video should be sufficient. I have a parallel thread in the German forum, where it was pointed out, that not only a too high bitrate might be the reason for buffer underflows. So I guess that this is exacly such a situation. The good news is that muxman is not complaining any more about buffer underflows with the reencoded file. So I am done. But taking the original file it complains about 4 buffer underflows even if I mux without any audio or subtitle track. For me it looks like VRD has "repaired" the video.

kotyczka, out of curiosity: Which version of muxman complains ?
I have updated to Muxman 1.4 hoping that its muxer would allow for higher bitrates
as mpucoder announced
(not that I would have used it up until today), and would like to know how high the spike was
(Konran's Bitrate viewer maybe), and which muxman version complained.
Just for information, I used the latest free version of muxman (0.16.8). No idea, how muxman 1.4.0 will handle this. However I only do some work for a video publisher. I have no idea, what authoring software will be used in the final authoring. Using muxman I just want to make sure that the material I provide is fully DVD compliant.

Konran's Bitrate viewer shows a peak bitrate value of 9540 kbps for both the original an the rencoded file.