First off, this is my first post, but I've been using the great info on this site for years. Thanks to everyone who takes the time to respond.
I'm trying to reduce the bitrate on an MPEG-2 stream using TMPEGEnc, but I need to keep the exact same number of frames as the original. I assume the only way to do this is to extract the I-frame locations from the original then import them into TMPEGEnc using Setting->GOP Structure->Force Picture Type Setting->Load.
How can I extract the I-frame locations from the original source? MPEG Validator looks promising, but it only shows time codes, where I need frame numbers. I can probobally do some conversion using the GOP Length and Excel, but it seems error prone. Is this the easiest way?
+ Reply to Thread
Results 1 to 17 of 17
-
-
Reducing the bitrate can be done without changing the number of frames or the GOP structure. Only the quality will be reduced (which may or may not be noticeable). It seems to me that you are over thinking this and making it harder than it needs to be. Can we redefine your goal? You currently have a mpeg-2 video in a file and the filesize is too large? Too large for what? Is your goal to fit it on a DVD? Why do you want the bitrate reduced?
"Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books -
Hi-
Are you making this more difficult than it really is? I'm probably not understanding what you're asking, but what makes you think you won't get the correct number of frames without jumping through hoops with whatever it is you're wanting to do? People reencode MPEG-2s all the time to reduce the bitrate and file size, and this is the first time someone has ever thought he needed to know the original GOP structure and I-Frame locations to do it.
I don't know if this will answer your question or not, but if you open the M2V in ReStream it'll show you the GOP structure. If you open the MPEG-2 in GSpot, it can give you much more detailed information, including the frame numbers of all the I-Frames. After it loads completely, press the VSG button.
Gadgetguy answered first, and I agree with him. -
Reducing the bitrate can be done without changing the number of frames or the GOP structure.
Can we redefine your goal?
Why do you want the bitrate reduced?
If you open the MPEG-2 in GSpot, it can give you much more detailed information, including the frame numbers of all the I-Frames -
The problem is that every time I encode using TMPGEnc,
the number of frames in the result doesn't match the original.
My assumption was that having a single difference in the GOP structure would cause a frame count mismatch. -
use a transcoder rather than an encoder. dvdshrink and others only reduce intra-frame data and leaves all else alone.
or if it's only for use on a computer encode to mpeg-4 or divx for smaller file sizes.--
"a lot of people are better dead" - prisoner KSC2-303 -
Do you always do frame-rate conversions
ex: 1000 frames / (29.97 frames/sec) = 33.3 sec.
Isn't the frame count the sum of all the I+B+P frames?
It's not the frame rate that is changing, it is the frame count.
I feel like there's something very obvious that I'm missing here. -
Well, I know that not all applications are equally precise
when the subject is to inform the poor end-user about
the movie length and its frame count. For example,
when I had an older version of MainConcept, its codecs
reported the correct duration of the clips only if these were
program streams; elementary streams were always identified as being
several seconds shorter than they actually were. -
Hi-
I feel like there's something very obvious that I'm missing here.
Doing that is common for progressively encoded NTSC movies. Encode for progressive 23.976fps. With pulldown applied in the encoder (or afterwards), you output interlaced 29.97fps. -
Outside of pulldown or IVTC, what type of frame-count differences are you seeing, in numbers?
What software is giving you each of the frame counts?
Other than the IVTC situation, you should not be seeing significant differences in frame count, some progs will trim one from each end, but this doesn't really matter.
Unless you are intentionally changing framerates, actual problems with frame count do not seem to affect anyone else. Just you. -
OK, I think I understand what's going on. I tried running a different source where I noticed the same problem through DGMPGDec and found that it used both interlaced and progressive frames. It looks like about 96% of the source video is encoded at 29.97fps, and 4% is encoded at 23.976fps. I did the encoding entirely at 29.97fps, which accounts for the frame count difference.
16,672*0.04*29.97/23.976 + 16,672*0.96 = 16839 ~=16869
The frame count difference comes from pulldown being applied to those 4% of progressive frames in the source video.
So I should avoid re-encoding and use a transcoder like DVDShrink if I want to keep the original pulldown flags? You can see from the screenshot that I changed the aspect ratio from 4:3 to 16:9 and removed some black bars that were encoded into the video. Is there any way to do this and keep all of the pulldown sequences the same as the original?
-
Hi-
Is there any way to do this and keep all of the pulldown sequences the same as the original? -
Thanks manono! DVD-Rebuilder will cover just about everything I need. The reason I originally posted was becasue I was trying to do a half D1 encoding without breaking the existing chapters. Sometimes I will also need to change aspect ratios from 4:3 letterbox to 16:9. It looks like both of these operations are built right into the menus. I really like the fact that it writes out .avs scripts and .flg files so I can see and tweak exactly what it's doing. This will be a great tool to help me learn more about the encoding process. The only drawback is that you have to start from an authored DVD, but seeing the .avs scripts should help me figure out how to work with other MPEGs.
Prior to posting, I didn't know that there could be mixed pulldown sequences in the same stream. Thanks for helping me clear up the confusion. -
i'd like to re-encode keeping the exact number of size adding the subs to the main vid
but seems to be impossible -
Originally Posted by kevin182hRead my blog here.
-
Prior to posting, I didn't know that there could be mixed pulldown sequences in the same stream. Thanks for helping me clear up the confusion.
Similar Threads
-
Bug in VirtualDub (?) -- can't cut desired number of frames
By ralf07 in forum Video ConversionReplies: 3Last Post: 21st Sep 2011, 17:50 -
Megui only processing 1/3 the number of frames
By capvid0429 in forum Video ConversionReplies: 1Last Post: 3rd Jan 2011, 19:28 -
Count number of frames in AVI
By p.w in forum Video ConversionReplies: 10Last Post: 8th Mar 2010, 08:13 -
How to find the exact parameters used to encode a video
By SoupNazi83 in forum Video ConversionReplies: 4Last Post: 18th Jul 2008, 19:10 -
Burn a DVD - Number of Frames error
By p_uriel in forum Video ConversionReplies: 5Last Post: 21st May 2008, 18:07