innosia
10th February 2014, 14:45
Hello all,
I encounter a huge problem and very headache since last month and I couldn't solve it. I use linux CentOS 6.5 to encode anime using ffmpeg and libx264, when encoding, I remove the audio and subtitle then I encode audio separately into AAC and using mkvmerge to get the subtitle and combine the encoded video, audio and subtitle into one
But the problem is the subtitle will delay 1 frame while the audio already say the audio.
Here is my syntax
# ffmpeg -i "[Migoto] Dibetagurashi - 04 (848x480 H264 AAC) [74DB3757].mkv" -level 5.1 -preset veryslow -tune animation -keyint_min 12 -sc_threshold 45 -bf 8 -b_strategy 2 -refs 16 -qmin 10 -qmax 51 -qcomp 0.6 -direct-pred auto -me_range 24 -me_method umh -subq 10 -trellis 2 -an -sn -vcodec libx264 -crf 28.0 output1.mkv
# ffmpeg -i "[Migoto] Dibetagurashi - 04 (848x480 H264 AAC) [74DB3757].mkv" -f wav -| neroAacEnc -ignorelength -lc -q 0.4 -if - -of output2.aac
# mkvmerge -o outputFF.mkv --language "0:jpn" --track-name "0:SmallAnime Encode @ CRF 28.0" output1.mkv --no-chapters --language "0:jpn" --track-name "0:2.0 AAC-LC @ 0.4" output2.aac -A -D --language "2:eng" --track-name "2:Styled Subtitle (.ass)" "[Migoto] Dibetagurashi - 04 (848x480 H264 AAC) [74DB3757].mkv"
Above
1. First line is encoding the video, and remove audio/subtitle by using -sn and -an and output it as output1.mkv
2. second line is encoding the audio and output it as output2.aac
3. third line merging the subtitle in original video + audio + video
And my x264 is 10 bit, the subtitle delay 1 frame and in aegis sub it does not show the problem, where the subtitle appear normal, but when played using MPC with latest KLite codec, the subtitle will late 1 frame.
Anyone know how to solve this issue?
Aegis show correctly screenshot : http://puu.sh/6N2gy
Play using MPC problems : http://puu.sh/6N38E.jpg
I encounter a huge problem and very headache since last month and I couldn't solve it. I use linux CentOS 6.5 to encode anime using ffmpeg and libx264, when encoding, I remove the audio and subtitle then I encode audio separately into AAC and using mkvmerge to get the subtitle and combine the encoded video, audio and subtitle into one
But the problem is the subtitle will delay 1 frame while the audio already say the audio.
Here is my syntax
# ffmpeg -i "[Migoto] Dibetagurashi - 04 (848x480 H264 AAC) [74DB3757].mkv" -level 5.1 -preset veryslow -tune animation -keyint_min 12 -sc_threshold 45 -bf 8 -b_strategy 2 -refs 16 -qmin 10 -qmax 51 -qcomp 0.6 -direct-pred auto -me_range 24 -me_method umh -subq 10 -trellis 2 -an -sn -vcodec libx264 -crf 28.0 output1.mkv
# ffmpeg -i "[Migoto] Dibetagurashi - 04 (848x480 H264 AAC) [74DB3757].mkv" -f wav -| neroAacEnc -ignorelength -lc -q 0.4 -if - -of output2.aac
# mkvmerge -o outputFF.mkv --language "0:jpn" --track-name "0:SmallAnime Encode @ CRF 28.0" output1.mkv --no-chapters --language "0:jpn" --track-name "0:2.0 AAC-LC @ 0.4" output2.aac -A -D --language "2:eng" --track-name "2:Styled Subtitle (.ass)" "[Migoto] Dibetagurashi - 04 (848x480 H264 AAC) [74DB3757].mkv"
Above
1. First line is encoding the video, and remove audio/subtitle by using -sn and -an and output it as output1.mkv
2. second line is encoding the audio and output it as output2.aac
3. third line merging the subtitle in original video + audio + video
And my x264 is 10 bit, the subtitle delay 1 frame and in aegis sub it does not show the problem, where the subtitle appear normal, but when played using MPC with latest KLite codec, the subtitle will late 1 frame.
Anyone know how to solve this issue?
Aegis show correctly screenshot : http://puu.sh/6N2gy
Play using MPC problems : http://puu.sh/6N38E.jpg