Use FFMPEG to compress rmvb into MP4

Source: Internet
Author: User

Because my itouc4does not support rmvb, you must convert it to MP4 if you want to watch cartoons online. Originally, I used mediaco der for conversion, but most recent versions often encounter errors. Some time ago I wrote a conversion method using AVS + x264. Now I want to remove AVS and use FFMPEG.

Use

1. View rmvb attributes

Before conversion, check the file attributes, and check the resolution and other information. If the resolution exceeds 960*640, you need to adjust the resolution. By the way, let's take a look at the bit rate and refer to it when we press it to x264.

FFmpeg-I file name
2. decompress it into mp41.pass1 Encoding
ffmpeg -i 01.rmvb -an -vcodec libx264 -b 560k -pass 1 -f mp4 -y NUL
-An: Do not encode the audio-vcodec: Set the video encoding, here I am using the x264-b: this is the bit rate-F: force use format-Y: auto input y OK NUL: because it is pass1, The NUL
2. pass2 Encoding
ffmpeg -i 01.rmvb -acodec copy -vcodec libx264 -b 560k -pass 2 -f mp4 01.mp4

Because many rmvb audio parts are AAC encoded, you can use-acodec copy to copy the audio part directly.

3. Parameter Adjustment for some files

For some rmvb or MKV, the resolution is relatively high, so you need to adjust the transfer to itouch. You can use the-S parameter in FFMPEG:

ffmpeg -i 01.rmvb -acodec copy -vcodec libx264 -b 560k -s 960x640 -f mp4 01.mp4

960x640 needs to be calculated by yourself and adjusted in proportion

Intercept by Time:

ffmpeg -i 01.rmvb -acodec copy -vcodec libx264 -b 560k -ss 00:00:00 -t 00:01:00 -f mp4 01.mp4

Setting B-frame has some benefits for cartoons. 2pass is not obvious, and 1pass is obvious:

ffmpeg -i 01.rmvb -acodec copy -vcodec libx264 -b 560k -bf 6 -f mp4 01.mp4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.