0

I want to make some present for my grandma. And prepare some video. Unfortunately here video player is old and could not read some file formats. She is not at home now, so I don't know which player she has. But I have a file which is OK for here system:

File which is in a correct format:

General
Complete name                            : let.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 688 MiB
Duration                                 : 1 h 35 min
Overall bit rate                         : 1 002 kb/s
Writing application                      : VirtualDubMod 1.4.13
Writing library                          : VirtualDub build 14328/release
FileExtension_Invalid                    : avi

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Simple@L3
Format settings, BVOP                    : No
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 1 h 35 min
Bit rate                                 : 800 kb/s
Width                                    : 544 pixels
Height                                   : 416 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.141
Stream size                              : 549 MiB (80%)
Writing library                          : XviD 0.0.09 (UTC 2003-03-25)

I have the following file, which here system could not read:

File in the incorrect format:

General
Complete name                            : amf.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
Overall bit rate                         : 2 167 kb/s

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L5
Format settings                          : BVOP1
Format settings, BVOP                    : 1
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (MPEG)
Codec ID                                 : DX50
Codec ID/Hint                            : DivX 5
Bit rate                                 : 1 710 kb/s
Width                                    : 720 pixels
Height                                   : 528 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.188
Stream size                              : 1.15 GiB (79%)
Writing library                          : XviD 64

Could you help me to convert the second file to a format of the first? (It would be nice if output would be of the similar quality)

I have Ubuntu, and I think ffmpeg should be able to do it.

1 Answer 1

6

The differences between your "works" and "doesn't work" examples are:

  1. resolution
  2. framerate
  3. Codec Tag
  4. Codec Level

and you can set these using ffmpeg:

ffmpeg.exe -i /temp/input.mp4 -c:v mpeg4 -level 3.0 -vtag XVID -s 544x416 -r 25 -qscale 0 /temp/out.avi

Qscale 0 will produce a large file but maintain the best quality.

Please note that changing the resolution and frame rate will not produce the best output quality, so check if you can just omit the -s and -r parameters to maintain the best quality. Possibly you need to set the bitrate to 800kBit as in your "works" example to make it work on the target device of your grandmother.

1
  • -qscale 0 did it for me
    – msch
    Commented Oct 12, 2021 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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