News:

--

Main Menu

Allow us to use --force-cfr in x264

Started by Khyinn, March 18, 2013, 11:49:41 AM

Previous topic - Next topic

Khyinn

Hi,

Sorry if i'm wrong but i can't find that option in avidemux x264 settings.

It could be great if we can use --fps 24000/1001 (wich implies --force-cfr) like in other software like MeGUI.

I've tried two things :

- convert a 23.976 fps mp4 to 23.976 fps with avidemux (using resamplefps);
- convert the same video using MeGUI (--fps 24000/1001).

MeGUI produces a perfect constant framerate 23.976 fps video (wich i can use in aegisub 3.0.2 to sync subs).
Avidemus produces a variable framerate 23.977 fps (wich produces gap between rendering subs in aegisub 3.0.2 and vlc 2.0.5).

So the solution can be let us use --fps 24000/1001 for constant framerate.

Is this possible or am i totally wrong ?

Sorry for my bad english...

Khyinn

So... Anybody can make a patch for this ?

mean


Khyinn

But i don't have this problem if i encode the video with x264 cli (with --fps 24000/1001) so that's why i ask this.

And i'm not alone asking this as this has already been asked before.

Is it really difficult to add a checkbox with this param in avidemux (checkbox for constant framerate and select list [24000/1001, 24, 25, 30000/1001] ?

mean

I'm not sure that would work
What output format are you using ? mkv ?

Khyinn

MP4 (v1 and v2 have been tested without success).

Tried with MKV : same result.

mean

did you try with 2.6.2
If not the link is in the windows subforum

Khyinn

I'm on Linux, i will try r8502 as soon as possible, i'll inform you when it will be done.

Khyinn

Hi,

Tried with 2.6.2 (r8513), same results... I can't understand why this happens but it's really a cfr problem i think.

Khyinn

Tried 2.6.3, with MKV, MP4, MP4v2 => Same result... Output is 23.971564 when selecting 23.976 (resampleFPS(23.976)).

mean


Khyinn

So, will you fix this ?

I think it can be usefull to add --force-cfr (or --fps) parameter to x264 in avidemux config, avoiding the use of the ResampleFPS() filter but if you can correct this little bug, i will already be happy to use avidemux again.

Actually, i'm using this script instead of avsproxy + avidemux (i'm on linux) :

#!/bin/sh
#
# Usage:
#
# ./encodage.sh [input] [bitrate]
#
# input:   input .avs script without extension
# bitrate: bitrate
echo "Encoding Audio"
WINEDEBUG=-all wine avs2pipe audio "$1.avs" | WINEDEBUG=-all wine neroAacEnc -lc -cbr 160000 -if - -of "$1.m4a"
echo "Encoding Video - Pass 1"
fil="$1.avs"
info="$(WINEDEBUG=-all wine avs2pipe info "$fil")"
frames="$(echo -n "$info" | sed -ne 's/^v:frames\(.*\)$/\1/p' | sed 's|[\r ]||g')"
WINEDEBUG=-all wine avs2pipe video "$1.avs" | x264 - --output /dev/null --stdin y4m --frames "$frames" --level 4.1 --tune animation --pass 1 --bitrate $2 --stats "$1.stats" --b-adapt 2 --rc-lookahead 50 --me umh --subme 9 --fps 24000/1001
echo "Encoding Video - Pass 2"
WINEDEBUG=-all wine avs2pipe video "$1.avs" | x264 - --output "$1.h264" --stdin y4m --frames "$frames" --level 4.1 --tune animation --pass 2 --bitrate $2 --stats "$1.stats" --b-adapt 2 --rc-lookahead 50 --me umh --subme 9 --fps 24000/1001
echo "Muxing Video and Audio"
MP4Box -fps 23.976 -hint -add "$1.h264" -add "$1.m4a" -new "$1-muxed.mp4"
echo "Encode ended"


This works great but if i can use avidemux again... ;)

mean

x264 is properly setup
It is a rounding issue that propagates
So instead of avidemux 10 10 10 10 10
you have 10 10 9 10 11 10 10
hence the slightly variable framerate

mean

After checking deeper
Avidemux setup fps as 24000/1001 => 23.976 fps
but at least for mkv & mp4 it gets overwritten to 24000/1000 => 24 fps
and the variable framerate
Fixing it....

Khyinn

OK :)

Glad to see that this will be fixed soon (tm).