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. |
5th November 2017, 09:53 | #1 | Link | ||
Registered User
Join Date: Nov 2015
Posts: 81
|
Weird Encoding Results
Hi everyone, I'm having trouble with some files I want to encode with MeGUI. The thing is that the results' duration has 10 extra seconds and the audio is out of sync. I suspect the unusual frame rate (23.810 FPS) has something to do but I'm no expert.
I put here relevant data that MediaInfo tells me about one of the original files and after that the data of the encoded one. ORIGINAL FILE Quote:
ENCODED FILE Quote:
Please let me know if you need more information. Thanks in advance! Last edited by tebasuna51; 5th November 2017 at 13:53. Reason: PHP -> QUOTE |
||
5th November 2017, 14:26 | #2 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Relevant data from source:
Quote:
Duration at 23.976 fps = 34920 / 23.976 = 1456,455 sec = 24:16.455 None of them match the correct duration 23:50.138 If source play in sync can be only if real frame rate mode is variable (VFR). You can extract the video timestamps from source and remux the encodec file with the same timestamps.
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 5th November 2017 at 14:32. |
|
6th November 2017, 14:27 | #4 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
You need mkvextract.exe (already in MeGUI package) and mp4fpsmod.exe like seems your ENCODED file is a mp4.
Download and extract in a new folder mp4fpsmod_0.25.zip At same folder put your ORIGINAL.mkv, your ENCODED.mp4 and a .bat file with this content: Quote:
Execute the bat file and verify if SYNC.mp4 is in sync. I don't have now a VFR file to test myself.
__________________
BeHappy, AviSynth audio transcoder. |
|
7th November 2017, 06:56 | #6 | Link | |
Registered User
Join Date: Nov 2015
Posts: 81
|
Quote:
I only got a timecodes.txt file, not a SYNC.mp4. "Timecode is not monotone increasing! at line 3" Does that mean anything? Last edited by doomleox999; 7th November 2017 at 07:01. |
|
7th November 2017, 11:04 | #8 | Link |
Registered User
Join Date: Nov 2015
Posts: 81
|
|
7th November 2017, 14:48 | #9 | Link | |||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
Duration at 23.976 fps = 34290 / 23.976 = 1430,17875 sec = 23:50.178 Than match, with a frame of difference, with: FromStats_Duration : 00:23:50.138 That diference and the error than show mp4fpsmod ("Timecode is not monotone increasing! at line 3") is because the wrong timecode of second frame: Quote:
Quote:
mp4fpsmod -t timecodes.txt -x -c "ENCODED.mp4" -o "SYNC.mp4"
__________________
BeHappy, AviSynth audio transcoder. |
|||
7th November 2017, 17:41 | #10 | Link | |
Registered User
Join Date: Nov 2015
Posts: 81
|
Quote:
However, I have a few final questions: Why does this happen? Is the problem is the source? Is there any way to prevent this when I encode with MeGUI or do I have to do all these steps everytime I encounter this issue? Finally, is it possible to batch this? (meaning to extract timecodes from multiple original files to multiple encoded files and remux multiple "SYNC.mp4" files) |
|
7th November 2017, 22:55 | #11 | Link | |||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
The source have two problems:
- That second absurd timecode. - The wrong Frame rate : 23.810 FPS, witouth sense. with a standard framerate 23.976 the movie play with a little delay (41 ms) and can be unnoticeable. Quote:
If MediaInfo show: Frame rate mode : Constant we can't expect troubles. But when encode I always use in avs script a Assumefps(24000,1001) or Assumefps(24) or Assumefps(25) or Assumefps(30000,1001), never let non-standard fps because most the times are wrong, like here. Quote:
movie_01.mkv, movie_02.mkv, ... movie_01.mp4, movie_02.mp4, ... You can use: Quote:
__________________
BeHappy, AviSynth audio transcoder. |
|||
7th November 2017, 23:55 | #12 | Link | |
Registered User
Join Date: Nov 2015
Posts: 81
|
Quote:
I'll be mindful of everything you told me from now on and I'll try the batch bat as soon as I can. Thanks for everything! |
|
Tags |
23.810, fps, megui, out of sync |
|
|