Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th April 2011, 08:23   #1  |  Link
lutinor
Registered User
 
Join Date: Apr 2009
Posts: 287
x264 23.976 -> 25 without sound desync, how ?

I have an issue, i have an mkv progressive in 23.976 and i need to encode it in 25fps. everything is fine during the codage session but when i mux audio/video i get a sound desync.

Here's my line :

x264 --bitrate 1100 --fake-interlaced --bluray-compat --vf resize:width=720,height=576,method=spline --preset superfast --tune animation --fps 25/1 --force-cfr --weightp 1 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 25 --b-pyramid strict --slices 4 --ref 6 --aud --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" --sar 16:11 -o out.264 ep1.mkv
lutinor is offline   Reply With Quote
Old 14th April 2011, 09:21   #2  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 957
Did you get a PAL audio source from somewhere? If not, it isn't very surprising that the video races ahead of the audio.
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.
J_Darnley is offline   Reply With Quote
Old 14th April 2011, 13:34   #3  |  Link
lutinor
Registered User
 
Join Date: Apr 2009
Posts: 287
I'm having a strange thing :

I have an mkv h264 movie fps 23.976 progressive and perfectly syncro sound/video. His resolution is 720x544.

I must make a 720x576 at 25fps.

If i convert with this line :

x264 --bitrate 1100 --fake-interlaced --bluray-compat --vf resize:width=720,height=576,method=spline --preset superfast --tune animation --fps 25/1 --force-cfr --weightp 1 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 25 --b-pyramid strict --slices 4 --ref 6 --aud --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" --sar 16:11 -o out.264 ep1.mkv

I get my h264 file but when i mux it with the original sound u have a sound desyncro.

I found a way to make the resolution/fps mod with Pegasys encoder. With this tool i have a good 25 fps movie ready to be converted in x264 but it force me to make a lossless video in Tmpg and it's long Is there a way to outpast this in x264 command line ?
lutinor is offline   Reply With Quote
Old 14th April 2011, 13:43   #4  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
I already told you that it's not strange and not a bug at all in the other thread.
Also what you have done here (unknowingly) is actually the most accepted way to do 23.976 > 25.

You also have to convert the audio now, for example with eac3to:
eac3to input.ac3 output.ac3 -23.976 -speedup
sneaker_ger is offline   Reply With Quote
Old 14th April 2011, 13:55   #5  |  Link
lutinor
Registered User
 
Join Date: Apr 2009
Posts: 287
Quote:
Originally Posted by sneaker_ger View Post
I already told you that it's not strange and not a bug at all in the other thread.
Also what you have done here (unknowingly) is actually the most accepted way to do 23.976 > 25.

You also have to convert the audio now, for example with eac3to:
eac3to input.ac3 output.ac3 -23.976 -speedup
Thx for your tip but there is a thing that i can't understand:

I use Tmpg to change the movie, and i get a 25fps. I extract the 2 audio from the mkv without speed up. I mux the video from tmpg + the 2 extracted audio and all is syncro, how is it possible?
lutinor is offline   Reply With Quote
Old 14th April 2011, 14:00   #6  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by lutinor View Post
I use Tmpg to change the movie, and i get a 25fps. I extract the 2 audio from the mkv without speed up. I mux the video from tmpg + the 2 extracted audio and all is syncro, how is it possible?
Tmpg will most likely duplicate frames to change the framerate, the total number of frames increases. x264 on the other hand will only change the duration of each frame from 41,7 ms to 40 ms, the total number of frames doesn't change. The method used by x264 is known as "pal speedup" and is the most common way to convert between the two formats.
sneaker_ger is offline   Reply With Quote
Old 14th April 2011, 14:15   #7  |  Link
lutinor
Registered User
 
Join Date: Apr 2009
Posts: 287
Quote:
Originally Posted by sneaker_ger View Post
Tmpg will most likely duplicate frames to change the framerate, the total number of frames increases. x264 on the other hand will only change the duration of each frame from 41,7 ms to 40 ms, the total number of frames doesn't change. The method used by x264 is known as "pal speedup" and is the most common way to convert between the two formats.
Ok but in pal speed up, if i use your ac3 tool i can 'outpass' the tmpg part ?
lutinor is offline   Reply With Quote
Old 14th April 2011, 14:23   #8  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by lutinor View Post
Ok but in pal speed up, if i use your ac3 tool i can 'outpass' the tmpg part ?
"outpass"? You mean you first used tmpg and then x264 in a chain?
Then yes, you can skip the tmpg part completely.
sneaker_ger is offline   Reply With Quote
Old 14th April 2011, 15:05   #9  |  Link
lutinor
Registered User
 
Join Date: Apr 2009
Posts: 287
Quote:
Originally Posted by sneaker_ger View Post
"outpass"? You mean you first used tmpg and then x264 in a chain?
Then yes, you can skip the tmpg part completely.
x264 + ac3 speed boost = ok ? i will test it tonight, i hope i won't get other strange issue lol

Last edited by lutinor; 14th April 2011 at 15:57.
lutinor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.