Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: loacoon on June 14, 2012, 03:55:25 PM

Title: x264 encoding bug
Post by: loacoon on June 14, 2012, 03:55:25 PM
I'm having a bug when encoding an x264/MKV video with the same codec/container (just want to lower it's size). The lower half of the screen have colored actefacts (mostly green).
I first tried with FFMPEG 0.10.3, then downgraded to 0.10.2 with no results. Same with x264, first tried with version 0.0.20111220, then with version 0.0.20120327, recompiling Avidemux with each change.
No "wierd" settings, no filters, two passes, average bitrate at 4750kb/s.

The wierd thing is that it does this with Kaffeine, but not with VLC...

Screen attached.
Title: Re: x264 encoding bug
Post by: J. M. on June 15, 2012, 07:48:09 PM
Nonstandard dimensions? If the resolution is really 1280x649, then that's probably the reason. The width and height should at least be even. Preferably multiples of 16 or 8. You may change the video output in Kaffeine to X11 and see that your video driver is probably the culprit here, it cannot handle these odd resolutions.

Solution: when you encode the video in Avidemux, just resize it to a sane resolution, using either the crop or resize filter, or both. If there are black borders in the video (it looks like there are), there is no reason not to remove them anyway, as the quality will be better (plus cropping without resizing is "lossless").
Title: Re: x264 encoding bug
Post by: loacoon on June 16, 2012, 09:23:25 AM
I just resized the screenshot ;). Resolution is 1280*534.
Title: Re: x264 encoding bug
Post by: J. M. on June 16, 2012, 04:57:04 PM
But still, that may be the problem. The video is probably OK, as you can see in VLC. It's just that Kaffeine, combined with your graphics driver, cannot display it properly. 534 is not a multiple of 16, 8 or even 4, and that can cause problems. Try changing the video output in Kaffeine (e.g. to plain, unaccelerated X11) and see if it helps.

Anyway, when you encode the video, you should always try to get some sane dimensions (multiples of 16 or 8), as the encoding will be more efficient, and you should not have problems like this on playback.

(BTW, Avidemux does not use external FFmpeg, it has its built-in copy.)
Title: Re: x264 encoding bug
Post by: loacoon on June 16, 2012, 09:47:49 PM
I'll try to add black borders but I don't get something. The original video is the exact same resolution and Kaffeine plays it without any problems...
Title: Re: x264 encoding bug
Post by: loacoon on June 29, 2012, 11:42:49 AM
I resized the video via a filter. It's now 1280*544, and it didn't change a thing. The original video works well, while the encoded one doesn't.
Title: Re: x264 encoding bug
Post by: Agent_007 on June 30, 2012, 01:36:28 PM
Did you try to check out Kaffeine log in case it complains something?
Title: Re: x264 encoding bug
Post by: loacoon on July 10, 2012, 03:18:57 PM
Sorry for the delay. I can't find any logs from Kaffeine. And lauched via the console, there is nothing unusual...