1

I have a lot of MP4 files on my server. And my aim is to get them to stream on android mobiles.

The resolution of the videos are at 480×272 and this is not a problem because I tested it and most androids are able to stream it. But the problem is the size of the video. The streaming is slow and it buffers a lot because of its size.

I need a converter that can decrease the size to around 50-60MB. With only a little decrease in quality. If possible, the output file should overwrite the input file.

Can you think of any way I can do this work in minimum time? My server is CENTOS and I have FFMPEG, MP4Box installed.

Dezze
  • 67
  • 1
  • 8

1 Answers1

1

There are quite a few approaches to this issue. A quick one would be to change the video size by setting the video bit-rate:

ffmpeg -i input.mp4 -b:v 768k -acodec copy output.mp4

Alternatively, for h264 you can specify the output quality, e.g. using -qp or -crf options, that would change the video size accordingly. See x264 FFmpeg Options Guide for details.

Dmitry Shkuropatsky
  • 3,902
  • 2
  • 21
  • 13
  • Hey, thanks man. That Guide helped me a lot. I'm currently using the following `$ ffmpeg -i infile.mp4 -s 432x320 -threads 4 -vcodec libx264 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 5 -bf 0 -flags2 +mixed_refs -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 27 -qmax 32 -qdiff 4 -b 384k -r 600 -acodec libfaac -ar 48000 -ab 48000 -pass 1 outfile.mp4` Can you tell me a way I can modify the above command to convert all the files in a folder and place it in the same folder? – Dezze Feb 03 '12 at 08:56