Skip to main content

Thread: Convert AVI to MP4


hi everybody

while converting video avi mp4, loose video quality, if trim video part (ads part) mp4 output, got video quality more double video size (169mb becomes 484mb), commands used are:

remove 5 seconds od ads:
code:
sudo ffmpeg -ss 00:00:05 -i input.avi -strict experimental output.mp4
original size is: 169mb, , output size is: 484mb

convert avi mp4:
code:
sudo ffmpeg -i input.avi -strict experimental -acodec aac -ab 128 -vcodec mpeg4 output.mp4
output size 40mb, less size , less quality.

here input file mediainfo

code:
general complete name                    : input1.avi format                           : avi format/info                      : audio video interleave file size                        : 169 mib duration                         : 26mn 19s overall bit rate                 : 896 kbps writing application              : virtualdubmod 1.5.10.3 fr | www.virtualdub-fr.org ||  (build 2550/release) writing library                  : virtualdubmod build 2550/release  video id                               : 0 format                           : avc format/info                      : advanced video codec format profile                   : high@l1.3 format settings, cabac           : yes format settings, reframes        : 3 frames codec id                         : h264 duration                         : 26mn 19s bit rate                         : 759 kbps width                            : 352 pixels height                           : 288 pixels display aspect ratio             : 1.222 frame rate                       : 25.000 fps original frame rate              : 50.000 fps resolution                       : 8 bits colorimetry                      : 4:2:0 scan type                        : progressive bits/(pixel*frame)               : 0.299 stream size                      : 143 mib (85%) writing library                  : x264 core 115 r1955bm 06f5fa5 encoding settings                : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=2 / sliced_threads=1 / slices=2 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00  audio id                               : 1 format                           : mpeg audio format version                   : version 1 format profile                   : layer 3 format_settings_mode             : joint stereo format_settings_modeextension    : ms stereo codec id                         : 55 codec id/hint                    : mp3 duration                         : 26mn 19s bit rate mode                    : constant bit rate                         : 128 kbps channel(s)                       : 2 channels sampling rate                    : 48.0 khz stream size                      : 24.1 mib (14%) alignment                        : split accross interleaves interleave, duration             : 40 ms (1.00 video frame) interleave, preload duration     : 500 ms
my aim, convert avi mp4, more less same file size, , same video quality

in advance

since avi file has h.264 video, can straight-up copy video stream mp4.

code:
ffmpeg -i input.avi -vcodec copy -acodec copy output.mp4
this won't work files, in case you're lucky, since both video , audio streams compatible mp4. lossless.

also, there's no reason use sudo, , in fact should avoid using sudo unless it's absolutely necessary.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Multimedia Software [SOLVED] Convert AVI to MP4


Ubuntu

Comments

Popular posts from this blog

Could not place because the source rectangle is empty

Thread: Using smartcard reader with vpnc

Adobe Font Folio 7.0 or just 7?