VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. Hello everybody

    I'm trying to convert an MPEG-2 movie to the same format but with a low video bitrate, around 100Kbps (for archiving purposes).

    I tried using Handbrake and it works, I get a movie with an average video bitrate of 100Kbps (MPEG-2), but Handbrake uses a .MP4 extension (the container I guess) and I don't like it. (I'm telling you just to "demonstrate" that MPEG-2 supports very low video bitrates (100Kbps), otherwise Handbrake couldn't make this output movie).

    Using FFmpeg everything works, except for the fact that I can't get a bitrate lower than 600/700 Kbps. I tried several parameters to get a bitrate around 100Kbps, like "-b:v 100k", "-q 40", "-qp", "-qmin" and "-qmax", but nothing, the video bitrate doesn't lower...

    What am I doing wrong?

    Thanks a lot for your help!
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  2. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    are you sure handbrake's output is mpeg2 ? what does mediainfo say about it ?
    Quote Quote  
  3. Member
    Join Date: Oct 2004
    Location: Freedonia
    Search Comp PM
    Originally Posted by falco2000 View Post

    I tried using Handbrake and it works, I get a movie with an average video bitrate of 100Kbps (MPEG-2), but Handbrake uses a .MP4 extension (the container I guess) and I don't like it. (I'm telling you just to "demonstrate" that MPEG-2 supports very low video bitrates (100Kbps), otherwise Handbrake couldn't make this output movie).

    The ONLY person who seems to think that MPEG-2 doesn't support bit rates this low is YOU. I could easily encode such a video in MPEG-2 using HCenc, CCE, and probably some other programs. However, I've made it clear what I think of your goals in previous threads you have started, so rather than continue to insult you I will just drop out after saying a few more things.

    I have not heard of Handbrake actually producing MPEG-2 video output, but as I do not use Handbrake I cannot say with complete certainty that it cannot do that. However, I do not think it is capable of doing that and you are misunderstanding the output it gives you. You can install MediaInfo and post the information from one of your supposed MPEG-2 Handbrake encoded files for us to see what you really have.

    With regards to your subject title, some encoders are known to ignore bit rate specificationsl TMPGenc is rather infamous for this. It will mostly obey its own setting for average bit rate, but it will completely ignore the maximum bit rate setting. This is usually not a big problem but if TMPGenc exceeded the maximum allowed bit rate for a format like SVCD, it might be troublesome.
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date: Aug 2000
    Location: Sweden
    Search Comp PM
    Yup, handbrake can produce mpeg2(ffdshow) in mp4 or mkv.
    Attached Files
    Quote Quote  
  5. Originally Posted by poisondeathray View Post
    are you sure handbrake's output is mpeg2 ?
    Yes, for TWO reasons:

    1) I chose "MPEG-2 (FFmpeg)" as Video Codec in Handbrake's GUI ("Video" tab) (Please note that I also set "Avg Bitrate (Kbps): 100"

    2) MediaInfo (that I installed several weeks ago and always use) shows this:

    General
    Complete name : D:\xyz.mp4
    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 8.18 MiB
    Duration : 1mn 40s
    Overall bit rate mode : Variable
    Overall bit rate : 686 Kbps
    Encoded date : UTC 2012-10-11 14:24:55
    Tagged date : UTC 2012-10-11 14:25:17
    Writing application : HandBrake 0.9.8 2012071700

    Video
    ID : 1
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings, BVOP : No
    Format settings, Matrix : Default
    Codec ID : 61
    Duration : 1mn 40s
    Bit rate mode : Variable
    Bit rate : 460 Kbps
    Maximum bit rate : 918 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 4:3
    Original display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 25.000 fps
    Standard : PAL
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.044
    Stream size : 5.49 MiB (67%)
    Encoded date : UTC 2012-10-11 14:24:55
    Tagged date : UTC 2012-10-11 14:25:17
    Color primaries : BT.601 NTSC
    Transfer characteristics : BT.709
    Matrix coefficients : BT.601

    Audio
    ID : 2
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Format settings, Endianness : Big
    Codec ID : ac-3
    Duration : 1mn 40s
    Bit rate mode : Constant
    Bit rate : 224 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Delay relative to video : 40ms
    Stream size : 2.67 MiB (33%)
    Encoded date : UTC 2012-10-11 14:24:55
    Tagged date : UTC 2012-10-11 14:25:17
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  6. Originally Posted by jman98
    The ONLY person who seems to think that MPEG-2 doesn't support bit rates this low is YOU.
    You are telling a LIE. I DO NOT think that MPEG-2 doesn't support low bitrates.

    The ONLY reason I wrote that sentence for is because ANOTHER PERSON, in one of my threads DECLARED that. Please read with more attention the posts in my threads and you will find it. (I've got no time to find it for you).

    Originally Posted by jman98
    However, I've made it clear what I think of your goals in previous threads you have started, so rather than continue to insult you I will just drop out after saying a few more things.
    I can't understand the reason why you are so unfriendly to me.

    IF YOU BELIEVE I'M STUPID, PLEASE DON'T READ THE THREADS I START ANYMORE!

    Anyway, stopping insulting is a good thing. I appreciate that.

    Originally Posted by jman98
    I have not heard of Handbrake actually producing MPEG-2 video output, but as I do not use Handbrake I cannot say with complete certainty that it cannot do that.
    Infact you are wrong.

    Originally Posted by jman98
    However, I do not think it is capable of doing that and you are misunderstanding the output it gives you. You can install MediaInfo and post the information from one of your supposed MPEG-2 Handbrake encoded files for us to see what you really have.
    Please see the post above, you man of little faith. Informations written in the first post were taken from MediaInfo, that was already installed on my PC. Why do you have such prejudices about me?

    With regards to your subject title, some encoders are known to ignore bit rate specificationsl TMPGenc is rather infamous for this. It will mostly obey its own setting for average bit rate, but it will completely ignore the maximum bit rate setting. This is usually not a big problem but if TMPGenc exceeded the maximum allowed bit rate for a format like SVCD, it might be troublesome.
    Thank you for this gentle answer. Next time you will use a tone different from this, I will totally ignore your posts. I don't like talking to trolls or flamers.

    Nothing personal anyway.

    Last edited by falco2000; 11th Oct 2012 at 10:20.
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  7. For example, the command

    ffmpeg -i "input_movie.mpg" -c:v mpeg2video -b:v 100k -c:a libmp3lame -b:a 64k -t 00:02:00 "output_movie.mpg"
    makes a 2 minutes output movie that (for MediaInfo) has a video bitrate of 572 Kbps (and Bitrate Viewer shows "MIN = 236 kbps, MAX = 1076 kpbs, AVG = 579")

    How can I force FFmpeg to do what I tell it?
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  8. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    If handbrake can do it, just encode it with handbrake, re-wrap from mp4 into mpeg-ps with ffmpeg

    or if you can find an encode log or CLI parameters passed use those
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    If handbrake can do it, just encode it with handbrake, re-wrap from mp4 into mpeg-ps with ffmpeg
    Re-wrap? Could you please explain me how to do it? Is it taking the video and audio streams out of the mp4 container and copying them into an mpg container? Or what else?

    Originally Posted by poisondeathray View Post
    or if you can find an encode log or CLI parameters passed use those
    FFmpeg users told me it's impossible because Handbrake just uses the FFmpeg library, not the FFmpeg.exe, so there's no parameter list to copy.
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  10. Ok I did a mistake. Handbrake only makes a 100Kbps video bitrate movie if the framesize is small enough (144x112 pixels for example).

    If I set a 288x224 pixels frame size the video bitrate increases from 96 to 117 Kbps, even if the average bitrate set size is still 100 Kbps.
    And it increases to 400-500 Kbps when the frame size is leaved "as is" (i.e. 720x576 in my case)

    So I guess that Handbrake and FFmpeg have got the same "problem". Maybe it's something related to the MPEG-2 format itself...
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  11. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by falco2000 View Post
    Originally Posted by poisondeathray View Post
    If handbrake can do it, just encode it with handbrake, re-wrap from mp4 into mpeg-ps with ffmpeg
    Re-wrap? Could you please explain me how to do it? Is it taking the video and audio streams out of the mp4 container and copying them into an mpg container? Or what else?
    Yes

    ffmpeg -i input.mp4 -vcodec copy -acodec copy output.mpg
    Quote Quote  
  12. Member hech54's Avatar
    Join Date: Jul 2001
    Location: Yank in Europe
    Search Comp PM
    Originally Posted by falco2000 View Post
    I'm trying to convert an MPEG-2 movie to the same format but with a low video bitrate, around 100Kbps (for archiving purposes).
    I'm sorry but since when did low-bitrate MPEG2 become synonymous with "archiving"?
    Quote Quote  
  13. Originally Posted by hech54 View Post
    Originally Posted by falco2000 View Post
    I'm trying to convert an MPEG-2 movie to the same format but with a low video bitrate, around 100Kbps (for archiving purposes).
    I'm sorry but since when did low-bitrate MPEG2 become synonymous with "archiving"?
    Archiving for people (like me) who haven't got money to buy new hard drives and who need fast conversion times. Is it so hard to understand for so many people?
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  14. Originally Posted by poisondeathray View Post
    ffmpeg -i input.mp4 -vcodec copy -acodec copy output.mpg
    Ok, that's great, but the problem is what I wrote in the previous post: neither Handbrake nor FFmpeg actually encode at real 100Kbps unless the frame size in pixel is sufficiently low.

    It seems to be a problem with the choice between MPEG-2 and MPEG-4, not between Handbrake and FFMPEG, because (using Handbrake, I didn't make tests with FFmpeg), setting a fixed 100 Kbps video bitrate, the actual final output movie video bitrate is:
    1. about 90 if I choose the "H.264 encoder", for any output framesize (144x112, 192x160, 288x224, 720x576)
    2. about 98 if I choose the "MPEG-4 (FFmpeg)" encoder, for any output framesize (144x112, 192x160, 288x224, 720x576)
    3. from 96 up to 460 Kbps if I choose the "MPEG-2 (FFmpeg)" encoder, for (respectively) 144x112, 192x160, 288x224 and 720x576 output frame sizes

    If I should get these results using FFmpeg.exe too, it would mean that MPEG-2 has got some "restrictions/limitations" regarding low bitrates and high frame sizes: getting both at the same time seems to be impossible.
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  15. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    That's what everyone is trying to tell you

    Use AVC if you want very low bitrates
    Quote Quote  
  16. Originally Posted by poisondeathray View Post
    That's what everyone is trying to tell you
    Uh? Everyone? Actually there was at least one person that affirmed that MPEG2VIDEO hasn't got any problem with low bitrates...

    Originally Posted by poisondeathray View Post
    Use AVC if you want very low bitrates
    What's that? Is it H.264? If it's that, I'll tell you that I tried MPEG-2 because is way faster than H.264 (with worse quality, obviously, but H.264 takes 2, 3, 4 times the MPEG-2 encoding time and I have plenty of movies to convert, I don't have time to wait or money to buy a faster processor). I was looking for the best compromise.
    Falco2000, video newbie.
    Let's everyone help each other.
    Quote Quote  
  17. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by falco2000 View Post
    Originally Posted by poisondeathray View Post
    That's what everyone is trying to tell you
    Uh? Everyone? Actually there was at least one person that affirmed that MPEG2VIDEO hasn't got any problem with low bitrates...
    at what dimension ? 16x16 ?

    define "problem"

    MPEG2 quality is unwatchable at very low bitrates . You might as well erase it instead




    Originally Posted by poisondeathray View Post
    Use AVC if you want very low bitrates
    What's that? Is it H.264? If it's that, I'll tell you that I tried MPEG-2 because is way faster than H.264 (with worse quality, obviously, but H.264 takes 2, 3, 4 times the MPEG-2 encoding time and I have plenty of movies to convert, I don't have time to wait or money to buy a faster processor). I was looking for the best compromise.
    Yes, h.264 = AVC = MPEG4 part10

    But at very very low bitrates AVC might be 4-8x better than MPEG2 ( you might need 4-8x more bitrate for MPEG2 for equivalent "quality") . Isn't that worth the encoding time ? Weren't you trying to compress it more because of lack of HDD space ? With faster/newer hardware, the encoding difference actually isn't that great (AVC scales better with more cores than MPEG2 encoders)
    Quote Quote  
  18. Just use fast settings in the h.264 encoder. You get slightly less quality but that doesn't seem to matter to you.
    Quote Quote  
  19. vanished El Heggunte's Avatar
    Join Date: Jun 2009
    Location: Misplaced Childhood
    Search Comp PM
    Just for the notes,

    "MPEG-2" + "720x576" + "Default quantization matrix" + "low bitrates" = OVERCRÄP

    But if you want to force a very-low bitrate anyway:

    1) choose a low-bitrate quantization matrix ;

    2) use 3 (or even 4) B-frames per P-frame ;

    3) use open GOPs ;

    4) use longer GOPs ;

    5) try different encoders ( the old TMPGenc Plus, or Hank's HCenc ) ;

    6) reduce the frame size to 480x576 (if AR=16:9), or 352x576 (if AR=4:3)

    Just my 3 euros
    Last edited by El Heggunte; 11th Oct 2012 at 13:32. Reason: damn typos
    Quote Quote  
  20. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    If you insist on using ffmpeg for mpeg2 the lowest bitrate you can achieve is by using -q:v 31 . That's the highest quantizer available . You can't achieve very low bitrates for certain dimensions . Other mpeg2 encoders might be able to go lower (I doubt by much)

    Other techniques to lower bitrate requirements - pre process with heavy denoise filters, spatial and temporal

    If not 16:9, 4:3 , e.g. 2.35:1 letterboxed movie, then crop the black borders and encode using not standard mpeg2 dimensions (even the black borders can take a 1-2% bitrate, but every bit counts when you are encoding very low bitrates)

    I don't know if you can do VFR with MPEG2, you can with AVC (only certain containers and formats support it, e.g MKV, MP4, ASF) , but when there is content with static scenes, you might be able to shave of 1-10% there as well. For content like typical cartoons, the savings will be generally higher, for content like live action movies, it might be 1-2% or less
    Quote Quote  
  21. vanished El Heggunte's Avatar
    Join Date: Jun 2009
    Location: Misplaced Childhood
    Search Comp PM
    Originally Posted by poisondeathray View Post
    ......

    I don't know if you can do VFR with MPEG2, you can with AVC (only certain containers and formats support it, e.g MKV, MP4, ASF) , but when there is content with static scenes, you might be able to shave of 1-10% there as well. For content like typical cartoons, the savings will be generally higher, for content like live action movies, it might be 1-2% or less
    Yes, both MPEG-1 and MPEG-2 have no problems with VFR, but certain *decoders* do not support playback with other framerates than the "official" ones (hard-coded in the elementary stream). Older/outdated versions of ffdshow didn't respect the timestamps from the container, and I haven't checked whether the most recent builds have fixed the issue.
    Quote Quote  
  22. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    This thread is hilarious!

    Basically, I'm with jman98 and hech54 regarding the utility/futility of these attemps, but if that floats your boat, whatever.

    Want to go lower? Have you considered lower bit depth (aka lower color palette aka posterization)? Or even grayscale, or even low bit grayscale? Especially if these are "thumbnail" archives.

    Scott
    Quote Quote  



Similar Threads