VideoHelp Forum




+ Reply to Thread
Results 1 to 18 of 18
  1. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    hi:
    I need to compress a video with close GOP and open Gop to compare them using some algorithm.
    I used -flags -cgop for open and -flags +cgop for close with GOP=12, and gets the same pattern
    IBPBPBPBPBPP for both open and close...... I think the pattern must be for open IBPBPBPBPBPB, the pattern must ends with B-frame...
    please help me

    ffmpeg -i vid.y4m -vcodec libx264 -g 12 -flags -cgop -y -r 30 output.avi 2>list4.txt
    Quote Quote  
  2. a. if your ffmpeg version is more than 20month old http://ffmpeg.org/trac/ffmpeg/ticket/261 might be a problem.
    b. open and close gop do not always have different frame patterns (e.g. scene change detection might trigger a IDR frame for both)
    c. no clue where you get the assumption that the frame pattern must end with a B-Frame for open gop,...
    d. compiling x264 with lav support and simply using the x264 encoder directly might give better control over the x264 parameters,...
    Quote Quote  
  3. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    i read this
    http://documentation.apple.com/en/compressor/usermanual/index.html#chapter=18%26sectio...5%26tasks=true
    the last P-frame is replaced with B-frame that depends on the I-frame of the next GOP
    Quote Quote  
  4. a. that is for mpeg-2
    b. that would be for a quicktime encoder
    -> not really valid if you are neither using MPEG-2 nor the encoder this documentation is written for
    Quote Quote  
  5. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    sorry Im new in using ffmpeg, can u please rewrite my command to make it use quivktime encoder
    Quote Quote  
  6. it's ffmpeg and not a Quicktime/Apple tool so it can't use their encoder,... if you want to use encoder that comes with Compressor 3 ( or 4) you need to use a Mac and FinalCut.
    Quote Quote  
  7. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    what about this
    libx264: change default to closed gop to match x264cli

    open-gop can be enabled with "-flags -cgop"
    http://lists.libav.org/pipermail/libav-commits/2012-September/008145.html
    Quote Quote  
  8. what about this
    Sorry, I don't see a connection to my posts.

    My point (in post #4) was only that if you use x264 (or any other H.264 codec) you can't rely on documentation for a MPEG-2 encoder of Apple!
    I only wrote that I think that the assumption that gops need to end with b-frames is wrong and that if you want to rely on the documentation you linked to you should use the encoder the documentation belongs to,...

    Before (in post #2) at the beginning was, that if -flags -/+cgop doesn't work for you it might be due to an old ffmpeg version,...

    => no clue what you are trying to tell me with your last post.

    Cu Selur
    Quote Quote  
  9. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Just for the notes (and according to my understanding of the subject):

    -- if an open-GOP begins with a B-frame, then it ends with a P-frame (or even on an I-frame)

    -- if an open-GOP begins with an I-frame, then it ends with a B-frame

    -- ffmpeg does not / cannot fully~control the behavior of the codecs which are not part of the libavcodec bundle

    -- until some years ago at least, the only ways to ensure closed-GOPs through ffmpeg were: 1) not use B-frames, or 2) disable the scene-detection algorithm.
    Quote Quote  
  10. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    I just want to ensure that this is true (what is written in link), I dont be to bother you.... I just want your help
    Quote Quote  
  11. ah okay, yes the info in the link should be true.
    Quote Quote  
  12. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    i have another problem, I libx264 does not take the bit rate I choos into consideration, what to do?
    Quote Quote  
  13. Read up on how to use libx264 properly.
    Especially the difference between the different 1pass and 2pass rate control methods.
    Quote Quote  
  14. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    I used this command
    ffmpeg -i vid -vcodec libavcodec -b:v 300k -target pal-vcd -g 15 -bf 2 -y -r 30 output4.h264 2>list5.txt
    Quote Quote  
  15. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    ffmpeg -i vid.y4m -vcodec libavcodec -b:v 300k -target pal-vcd -g 15 -bf 2 -y -r 30 output4.h264 2>list5.txt
    I wrote it like this to get 2 B-frames
    Quote Quote  
  16. Now you lost me.
    You wrote you have problems using libx264 and then you post a command line which created mpeg-1 video.
    -> you really should read a bit more about ffmpeg&libx264 if you want to use it.
    Quote Quote  
  17. Member
    Join Date
    Jan 2012
    Location
    jordan
    Search Comp PM
    sorry instead of libavcodec , it must be libx264, its not the line code I wanted
    Quote Quote  
  18. if you use libx264 the '-target pal-vcd' still doesn't make ANY sense,... -> read the ffmpeg documentation/manual if you want to use ffmpeg
    Quote Quote  



Similar Threads

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