VideoHelp Forum




+ Reply to Thread
Results 1 to 17 of 17
  1. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  2. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    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
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    Reducing the bitrate can be done without changing the number of frames or the GOP structure.
    OK, great. Maybe I just need to understand how do do this.

    Can we redefine your goal?
    The problem is that every time I encode using TMPGEnc, the number of 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. My goal is simply to match the exact frame count of the original MPEG-2 stream.

    Why do you want the bitrate reduced?
    I'm trying to minimize hard drive space. I have the original DVD, so I can always go back to the source if I need a higher quality version.

    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
    I agree, the VSG button is really cool, but I can't copy the information to a text file, so it doesn't work as something I can import into TMPGEnc.
    Quote Quote  
  5. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    The problem is that every time I encode using TMPGEnc,
    the number of frames in the result doesn't match the original.
    Do you always do frame-rate conversions

    My assumption was that having a single difference in the GOP structure would cause a frame count mismatch.
    Bad assumption.
    Quote Quote  
  6. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    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
    Quote Quote  
  7. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    Do you always do frame-rate conversions
    At the risk of sounding like an even greater idiot. Doesn't frame count / frame rate = time
    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.
    Quote Quote  
  8. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    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.
    Quote Quote  
  9. Hi-
    I feel like there's something very obvious that I'm missing here.
    Possibly. If you're encoding as progressive 23.976fps and applying pulldown in the encoder to output 29.97fps as required by the NTSC DVD standards, then there's a difference between the encoded frame count and the outputted frame count at playback. That would be a factor of 1.25. So, a thousand encoded frames would equate to 1,250 outputted frames (23.976->29.97fps). Are those the kinds of differences you're encountering?

    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.
    Quote Quote  
  10. 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.
    Quote Quote  
  11. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    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?


    Quote Quote  
  12. Hi-
    Is there any way to do this and keep all of the pulldown sequences the same as the original?
    Yeah, by reencoding using DVD-Rebuilder as the front end you'll get back the exact same pattern of film and video and also be able to convert from 4:3 to 16:9. It doesn't support TMPGEnc, though. Personally, I wouldn't do it that way. If it can be IVTC'd, I'd do that. If it's really interlaced video and not hard telecine in that 96%, I'd encode it as interlaced 29.97fps. It depends on what it really is, but if it can be IVTC'd, I'd sure as heck IVTC it. You still haven't said why you have to keep the exact same encoded frame count, though. Or maybe you've changed your mind about that now that you understand what's going on. If you'd like to put up a small 10 second sample, we could have a look at it.
    Quote Quote  
  13. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  14. i'd like to re-encode keeping the exact number of size adding the subs to the main vid

    but seems to be impossible
    Quote Quote  
  15. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Originally Posted by kevin182h
    i'd like to re-encode keeping the exact number of size adding the subs to the main vid

    but seems to be impossible
    Why ? If it is a DVD, you can easily add selectable subs, even if it is already authored. If you are attempting to do something else, it would be polite to start a new thread for your problem, rather than hijack someone else's
    Read my blog here.
    Quote Quote  
  16. 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.
    Sure. You haven't studied much anime, I guess. Many episodic anime series are a mix of video and film with much more even percentages of each as compared to the 96% video one you have on your hands. Some of the video is hard telecine (already telecined film, which can be easily IVTC'd back to 23.976fps) but sometimes it has real 29.97fps sequences mixed in, either progressive or interlaced. Those true hybrids can be very difficult to work with.
    Quote Quote  
  17. Originally Posted by guns1inger
    Originally Posted by kevin182h
    i'd like to re-encode keeping the exact number of size adding the subs to the main vid

    but seems to be impossible
    Why ? If it is a DVD, you can easily add selectable subs, even if it is already authored. If you are attempting to do something else, it would be polite to start a new thread for your problem, rather than hijack someone else's
    i created one... but nobody helped me

    the main prob is cos AutoGK doens't work properly with the vbr audio of the tv shows i have
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!