VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Jan 2010
    Location
    Canada
    Search Comp PM
    Hey everyone!

    I'm creating a series of videos (flv for the web) witch are mostly still images, but occasionally will have spots of full motion video. Imagine these videos are like a power point or something. They're mostly just a single frame repeated. Sometimes though, there are full motion video clips.

    If I create one of these videos from stills without motion video, I get a perfect video quality, and a final bitrate of about 75kbps. If I recreate that same video, but insert a 30 second full motion video, the quality of the entire length of the video is degraded.

    What I'm looking for is a way to keep the bitrate super low during the still parts, and bump it up during the motion parts.

    Here's my current command:

    Code:
    ffmpeg -y -r 1 -loop_input -g 3 -i "image.png" -s 656x492  -vcodec mpeg4 -qscale 1 -g 300 -i audio.wav -r 25 -acodec copy output.flv
    Thanks!
    Quote Quote  
  2. you will get much better quality/compression by using h.264 than mpeg-4asp (at very low bitrates it can be 4-5x better)

    for ffmpeg encoding guide
    http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/

    if this is for embedded flash videos in flv container, you need to inject metadata for it to play immediately (instead of downloading completely before playing). You could use flvtool++ , flvtool2, yamdi, or flvmdi to do this

    lengthening the gop interval and using more consecutive b-frames can significantly help compression for still image sequences as well
    Quote Quote  
  3. Member
    Join Date
    Jan 2010
    Location
    Canada
    Search Comp PM
    Thanks for the info! Very helpful. I've been using a smaller gop (-g 3) for the stills, and a larger gop for the high motion clips (-g 300) and then just using the default when rendering my avi of combined clips into the flv. What would you recommend for a gop?
    Quote Quote  
  4. They will be dynamically placed. So specifying a max GOP size of , say, 300 doesn't mean you necessarily get 300 all the time, it will vary on the content complexity. IDR-frames will be inserted as necessary, and it will vary between min and max.

    For still sequences, a longer GOP with many consecutive max b-frames will immensely help compression probably many times more. This is because long GOP formats code the differences between frames. Since your still sequence has zero difference between each still, you can see how this would help compression. This is also why you say deterioration with the motion sequences; whenever there is motion, each frames is different than the next, so the larger the difference, the more bitrate is required to code the differences to keep a certain level of quality. So I would leave it at 300 for everything

    I don't use ffmpeg for encoding x264, but if you want a small description of what the commands do (the switches are labelled slightly differently in ffmpeg)
    http://mewiki.project357.com/wiki/X264_Settings
    Last edited by poisondeathray; 21st May 2010 at 08:29.
    Quote Quote  
  5. Use a constant quality encode with large GOPs. The still shots will hardly take any bitrate. The motion shots will get whatever they need to deliver the quality you request.
    Quote Quote  



Similar Threads

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