VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Member Alcatraz's Avatar
    Join Date: Mar 2012
    Location: Frozen Minnesota
    Search Comp PM
    Problem- After encoding MKV to MP4 and filtering with subtitles the Audio and subtitles get out of sync.
    I have been using Xvid4psp5 to hardsub mkvs and convert them to mp4 for a while now and this problem is one that i can't seem to figure out.
    I suspect that the problem is the different frame rates.
    The input being 23.976 and the output being something different (just looked and for some reason it changed O.o)
    At any rate i have tried changing the interlace/framerate options to try to solve the problem but i have gotten no luck.
    I will update with more info later
    (sorry i am running short on time.)
    Any help is appreciated.
    Last edited by Alcatraz; 12th Mar 2012 at 20:48.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date: Aug 2000
    Location: Sweden
    Search Comp PM
    The source video maybe has variable framerate. Check with the mkv mediainfo. Then it will be tricky to convert.

    You could also try hardcode with avidemux(click on it for guides).
    Quote Quote  
  3. Member Alcatraz's Avatar
    Join Date: Mar 2012
    Location: Frozen Minnesota
    Search Comp PM
    Yeah the framerate is variable.>_<
    Frame rate: 23.810
    Original frame rate: 23.976
    Any suggestions?
    Quote Quote  
  4. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    if source is VFR, then extract timecodes from mkv , then use mp4fpsmod to create VFR mp4
    https://github.com/nu774/mp4fpsmod
    http://forum.doom9.org/showthread.php?t=161386

    Note if you mean to play the mp4 on a device, many do not support VFR


    or try to convert to CFR with avisynth directshowsource with convertfps=true, this doesn't always work


    or did you mean source was CFR, and output was VFR ? if so then force CFR in the encode
    Quote Quote  
  5. Member Alcatraz's Avatar
    Join Date: Mar 2012
    Location: Frozen Minnesota
    Search Comp PM
    It's VFR to CFR. I am currently trying to extract the timecodes from this mkv but it's having problems.
    Quote Quote  
  6. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by Alcatraz View Post
    It's VFR to CFR. I am currently trying to extract the timecodes from this mkv but it's having problems.

    Are you sure it's VFR? Initially you said : "The input being 23.976 and the output being something different"




    If you can't extract timecodes with mkvextractgui or mkvextractgui-2 , you can use ffms2 to generate timecodes

    e.g
    FFVideoSource("video.mkv", timecodes="timecodes.txt")

    Then load avs, timecodes, subs, into aegisub
    http://aegisub.cellosoft.com/docs/Video#VFR_and_hardsubbing

    hardcode using textsub() or assrender() for the subs, then mux back into mp4 with mp4fpsmod

    or just leave it as mkv
    Quote Quote  
  7. Member Alcatraz's Avatar
    Join Date: Mar 2012
    Location: Frozen Minnesota
    Search Comp PM
    Sorry i misspoke when i said that the input was 23.976 it was actually 23.810 but i changed some option that made the video play in that FPS.
    The output was also 23.976 thats why i was confused because i made it look like the video was the same fps on accident.
    Also i am having a problem with ffms2 it says
    failed to initialize indexing: Can't open 'FFVideoSource'
    That error is because i don't have avisynth in the same directory right?
    Quote Quote  
  8. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    http://code.google.com/p/ffmpegsource/

    unzip and place the .dll and .avsi in the avisynth plugins folder
    Quote Quote  
  9. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by Alcatraz View Post
    It's VFR to CFR.



    But if you're trying to convert to CFR (instead of VFR mp4), try

    DirectShowSource("video.mkv", fps=23.976, convertfps=true)
    Textsub()

    But as mentioned earlier , it doesn't always work perfectly, there might be sections out of sync
    Quote Quote  
  10. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date: Aug 2000
    Location: Sweden
    Search Comp PM
    I would give up...and find a media player with mkv support. .
    Quote Quote  
  11. Member Alcatraz's Avatar
    Join Date: Mar 2012
    Location: Frozen Minnesota
    Search Comp PM
    Okay i think i may have found a way to solve my problem. I used VLC's seemingly worthless convert and save function and then i hardsubbed with xvid4psp.I don't know if it's perfect but i will keep experimenting.
    Thank you Baldrick and poisondeathray for helping out
    Quote Quote  
  12. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date: Aug 2000
    Location: Sweden
    Search Comp PM
    Thanks for posting your solution. Even though it might not be perfect it works at least.
    Quote Quote  



Similar Threads