Log in

View Full Version : Reencoding problems


maxxon
11th April 2012, 05:55
I'm trying to reencode a .mp4 file to a .avi file that will be read by my dvd player

The manual says it can play "USB Flash Drive that contains audio titles, DivX, MP3, WMA, and/or JPEG files." I'm trying to use ffmpeg to reencode it but the quality of the resulting file sucks.

Here is my command line:
ffmpeg -i file.mp4 -vcodec msmpeg4v2 -acodec aac -strict experimental -ab 325k file.avi
I've also tried this:
ffmpeg -i file.mp4 -s 320x240 -vcodec msmpeg4v2 file.avi
But I got this error message:
Application provided invalid, non monotonically increasing dts to muxer in stream 1: 106851 >= 106851
av_interleaved_write_frame(): Invalid argument

If anyone has any suggestions as to what command line I should use, it would be greatly appreciated.

Thanx,


|\/|x

I'm running Ubuntu 11.10 x64bit with ffmpeg that I built using these commands (http://buildall.wordpress.com/2011/05/09/how-to-compile-and-install-ffmpeg-in-ubuntu-11-04/).

Henrikx
11th April 2012, 09:29
ffmpeg -i "file.mp4" -vcodec msmpeg4v2 -acodec libfaac -ac 2 -ar 44100 -ab 128k "Test.avi"

maxxon
11th April 2012, 17:41
Well, that didn't work, all it did was kill my audio on vlc (though I've not tried it out on the dvd player which is at my parent's house). So the video is still crap. :(

maxxon
11th April 2012, 20:54
My bad, turns out that the audio never worked. When I was testing I had the audio off as I wasn't focusing on that. Still I've figured out the video quality issue. The required switch I was looking for is -qscale 5.

I think I've got it now. It has sound and hq vid. Just need to try it on DVD player.
ffmpeg -i file.mp4 -vcodec msmpeg4v2 -sameq -ab 128k file.avi

Thanks,


|\/|x

maxxon
12th April 2012, 02:55
Looks like I was wrong. The file size is crazy big. I'm seeing some pages that try and set the parameters to make it a particular size, but they are using presets, however, there are no presets for msmpeg4v2. What sort of parameters need to be in these files? :confused:

Thanx

|\/|x

Asmodian
12th April 2012, 03:44
Using msmpeg4v2 I would expect either a large file or bad quality. I suggest using mpeg4 (Divx/Xvid) as it looks like your DVD player could play that too and it should offer better quality per size.