<p>The differences between your "works" and "doesn't work" examples are:</p>

<ol>
<li>resolution</li>
<li>framerate</li>
<li>Codec Tag</li>
<li>Codec Level</li>
</ol>

<p>and you can set these using <code>ffmpeg</code>:</p>

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

<p>Qscale 0 will produce a large file but maintain the best quality. </p>

<p>Please note that changing the resolution and frame rate will not produce the best output quality, so check if you can just omit the <code>-s</code> and <code>-r</code> 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.</p>

CC BY-SA 4.0
2021-10-12T12:04:38.747Z
-qscale 0 did it for me
msch
CC BY-SA 4.0
2019-05-15T08:19:14.537Z
2019-05-24T07:50:52.917Z
2019-05-24T07:50:52.917Z
Harry
<p>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:</p>

<p><strong>File which is in a correct format:</strong></p>

<pre><code>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)
</code></pre>

<p>I have the following file, which here system could not read:</p>

<p><strong>File in the incorrect format:</strong></p>

<pre><code>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
</code></pre>

<p><strong>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)</strong></p>

<p>I have Ubuntu, and I think <code>ffmpeg</code> should be able to do it.</p>

<ffmpeg><conversion>
Convert video with ffmpeg to have the same quality
zlon
# Convert video with ffmpeg to have the same quality

(Asked by: username_0 on 2019-05-14)

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.

**Tags:** ffmpeg, conversion


---

## 1 answers

### Answer by username_1 on 2019-05-15. Score: 6 | Accepted answer

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

resolution
framerate
Codec Tag
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.

> **Comments:**
> **username_2**: -qscale 0 did it for me  

---

