Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to crop a video clip (originally 960 by 540) in two 4 parts (top-left, top-right, etc..) and I use this command below (with of course corrext x/y positions):

ffmpeg -i mov_a.m4v -vf "crop=480:270:480:270" mov_a_4.m4v

The problem is, the bit rate of each cropped clip is different. What I am trying to do is to put this 4 movie parts in 4 android tablets and start them at same time (to form a multi screen).

I am quite sure that the PLAY command reaches the android tablets at the same time (well a very little time difference). But then I have this 4 clips out of sync, and I guess its because different bit rates, the player has to do more work to load the higher parts with higher bit rate.

Even if you think this is not the problem, is it possible to force the output of FFMPEG to have exact same bit rate for all 4 parts of the movie? if so, what should I change in my command line above?

Thanks for your help!

share|improve this question
    
I suspect the problem is a different one. Are the videos stored locally? –  slhck Nov 4 '13 at 15:37
    
@slhck Yes each part of the video is stored locally. When I try with same file for all screens it is somehow much more in sync. –  Sean87 Nov 4 '13 at 21:29
add comment

1 Answer

Force a bit rate using the -b:v option. This rate would depend on the input rate. Say ffprobe reports 1024 kbps for your uncut video. I would, assuming 1/4 frame size, pass a bitrate of 256 kbps or so.

ffmpeg -i mov_a.m4v -vf "crop=480:270:480:270" -b:v 256k mov_a_4.m4v

You should ideally also use a codec explicitly if you are forcing a bitrate:

ffmpeg -i mov_a.m4v -vf "crop=480:270:480:270" -vcodec libx264 -b:v 256k mov_a_4.m4v

But then do check the codec in the input file. Note that the playback not syncing may have nothing to do with bitrates- you could check each cropped video you have already with ffprobe or ffmpeg:

ffmpeg -i filename

share|improve this answer
    
You need to set minrate and maxrate as well – see ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide –  slhck Nov 4 '13 at 15:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.