VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 33
Thread
  1. I did encode an old VHS capture with hybrid and after encoding (to .mp4 and audio aac) the audio is synchron at start but asynchron at the end.

    I tried several things but it feels very strange:

    I did import both audio to audacity. So the one from the original PMC (.avi file) and the AAC one (.mp4 encoded file). Both Audio-tracks looks EXACTLY the same, even zoomed in very far. I thought the AAC audio should be stretched at the end or so, but it is not.

    Ok, then i thought hybrid did sth wrong. So i importet the PMC audio into audacity and exportet it to AAC. Then i importet this audio in the encoded .mp4 video with ffmpeg-gui and deleted the other one: Same behavior ???

    Ok, i thought, maybe it is the player, so i switched from mpc to vlc: Same behavior. Same with windows default media player.

    I can not share the audio, because it is 40min family-video.

    Does anyone have an idea, what could cause this problem? Because the original .avi file is totaly fine and synchron. After encoding with hybrid it got asynchron, but the audio itself seems fine. Im out of ideas now.
    Quote Quote  
  2. Maybe the problems is the video, not the audio. Play the two videos side by side and see if they match.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    Maybe the problems is the video, not the audio. Play the two videos side by side and see if they match.
    How can i play a video side-by-side (perfectly) ? I mean beside manually.

    And the video both have same amount of seconds while the encoded one has several seconds audio delay (at the end). both have fix framereate according to mediainfo.

    but i will do, good idea.
    Quote Quote  
  4. Just manually sync two players. The sync doesn't have to be perfect to see several seconds of drift. The boring part is waiting 40 minutes to see a difference.
    Quote Quote  
  5. Ok, i did a test and it is super strange:

    I watched 16 minutes (arranged them manually) and i could not hear any difference between the two and also the picture was synchron. But when i both skip to (for example) 02:00 min then the encoded one is already delayed (the video is delayed only, audio is sync compared to the second video). So: when i skip, video is not sync anymore and therefore the (actually synced) audio is not sync anymore to the wrong video. When i skip to 35minutes audio is still sync between the two videos, but the video is very hard delayed. The encoded one is like several seconds to early.

    This is super strange. The delay gets bigger the further i skip. And i tested this behavior with mpc and vlc. both the same. It seems to be the video. But as i said: When i just let the video play without skipping, then there is no delay.
    Quote Quote  
  6. I think the two videos have different framerates (fps).
    A mediainfo report (text mode) from both videos (the capture and the encoded one) could help.
    Quote Quote  
  7. Originally Posted by ProWo View Post
    I think the two videos have different framerates (fps).
    A mediainfo report (text mode) from both videos (the capture and the encoded one) could help.
    Sure, i can do that, but the video has no different framerates. It would also not be possible to watch 16 minutes side by side without a video-delay (and also no audio delay), if they would have different framerates. But here is the screenshot:

    To say it again: The video (and also audio) has no delay, when i play them side by side. But when i jump somewhere (on the timeline), then i get directly a async on the video (not the audio. The audio is sync between the two videos when playing side by side from (for example) 36minutes, but the video is totally async on the encoded one). And btw: I did now several test with different encodings. So only a h.264 encode with pcm to AAC (because of mp4 container) --> same result. One time i did it with h.264 and mkv and did not even touch the audio (no reencode) and same problem. One time i used NVENC H265 and same result... I did not apply any other filter or sth like that.

    Edit: Here the second picture (with only one media-info window) is an example of a other vhs-video (encoded with hybrid), which is totally fine. no video-delay after skipping. So it is very strange. I did recapture the vhs-video btw 3 times and it is always the same. The capture is fine, but the encode is ugly. It does not only happen on this one, also 3-4 other videos are affected by this problem.
    Image Attached Thumbnails Click image for larger version

Name:	vhs-video-delay-when-skipping.png
Views:	20
Size:	712.9 KB
ID:	78822  

    Click image for larger version

Name:	no-delay-on-skipping-example.png
Views:	18
Size:	498.7 KB
ID:	78825  

    Last edited by Platos; 4th May 2024 at 05:46.
    Quote Quote  
  8. The two videos have different lengths. 45:33 and 41:43.
    Quote Quote  
  9. 2 comments:
    With captured avi, the audio track is 4 seconds longer than the video track. This should perhaps be adjusted before re-encoding.
    Re-encoding with profile high@L5.1 is total nonsense for a 720x538 resolution. Here main@3.0 would be better.

    I think if you adjust the audio track of the avi file to the video track and then re-encode it, the sync problem will also disappear.
    Quote Quote  
  10. Originally Posted by Platos View Post
    Edit: Here the second picture (with only one media-info window) is an example of a other vhs-video (encoded with hybrid), which is totally fine. no video-delay after skipping.
    ..encoded with clever FFmpeg-GUI
    Quote Quote  
  11. Originally Posted by ProWo View Post
    2 comments:
    With captured avi, the audio track is 4 seconds longer than the video track. This should perhaps be adjusted before re-encoding.
    Re-encoding with profile high@L5.1 is total nonsense for a 720x538 resolution. Here main@3.0 would be better.

    I think if you adjust the audio track of the avi file to the video track and then re-encode it, the sync problem will also disappear.
    Ah, i did not see the audio-track is longer... Hmm, ok i have to check that. thanks. i will then try that with adacity and see if i can cut off.

    i checked the quality of reencoding and it is no visual loss for crf 18. everything else is lossy for my eyes.

    Edit: You are right, it has just some seconds audio which is nothing (straight line). but it is really longer than the video. if you wathc the video you dont recognise that. And if you look at the audio tracks side by side in audacity you will not notice until you zoom in far AND go to the end ( i did check for sure sth in the middle, if they are sync and not the end). Let's see if this works now for encoding.

    i will also check all other vhs captures if they have longer audio than video (have some more with that problem, but maybe there are even more).

    Originally Posted by ProWo View Post
    Originally Posted by Platos View Post
    Edit: Here the second picture (with only one media-info window) is an example of a other vhs-video (encoded with hybrid), which is totally fine. no video-delay after skipping.
    ..encoded with clever FFmpeg-GUI
    yeah its nice. really helpfull tool, love it.

    thanks for it, i saw its yours
    Last edited by Platos; 4th May 2024 at 08:01.
    Quote Quote  
  12. Not quite sure why the audio is out of sync with the video.

    But to correct synchronization issues between audio and video (imagery), this is the approach I use -

    Via MediaInfo - note the total video (imagery) time in seconds. Note the total audio time in seconds.

    Use this procedure to determine how much speed adjustment of the audio track is required to synchronize it with the video -

    1) audio time (seconds) - video time (seconds) = difference time (seconds)

    2) difference time (seconds) ÷ video time (seconds) = difference ratio

    3) difference ratio x 100 = percentage adjustment of audio track speed.

    For example - Total video length is 1000 seconds. Total audio track length is 1010 seconds.

    1) 1010 seconds (audio) - 1000 seconds (video) = 10 seconds difference time

    2) 10 seconds (difference time) ÷ 1000 seconds (video) = 0.01 difference ratio

    3) 0.01 difference ratio x 100 = 1 percent adjustment of audio track time (speed)

    Using Audacity with the ffmpeg plugin installed (or use a full version of ffmpeg by itself) extract the total audio track from the total video clip.

    Load the extracted total audio clip into Audacity and select all the audio clip and change audio clip speed/pitch by 1.0% and save resultant file in appropriate audio format.

    Then using full version of ffmpeg, type in a command - ffmpeg -i total video -i adjusted_audio -c:v copy -map 0:v:0 -map 1:a:0 new_video. This will import and overwrite the existing audio track with the speed adjusted audio track.

    Don't forget to add the appropriate file extensions for both the video and audio clips within the above command.

    Hopefully all will be well now!
    Quote Quote  
  13. Hmm yes, that should be helping, when i dont want to reencode the video.

    But, what i wonder... The video itself is also different in lengt between the .avi and the encoded .mp4. So when i just calculate the stretch it would probably not match, because the video isnt same lengt anymore... So actually the video is speed up. But i dont understand that, because mediainfo says 25fps both videos and both videos does have the same content but the video is not same lengt... makes no sense for me. FPS must be different if videolength would be different.

    So i am not sure if i can fix that without reencoding and fixing audio before encoding.

    Edit: Because i see now that this audio-video length-difference also is present on basically all my other vhs caputres. but it is just not that extrem on the other i did not realise it. I feel like i have to reencode 23 1 hour videos again xD
    Last edited by Platos; 4th May 2024 at 08:16.
    Quote Quote  
  14. Originally Posted by Platos View Post
    But, what i wonder... The video itself is also different in lengt between the .avi and the encoded .mp4. So when i just calculate the stretch it would probably not match, because the video isnt same lengt anymore... So actually the video is speed up. But i dont understand that, because mediainfo says 25fps both videos and both videos does have the same content but the video is not same lengt... makes no sense for me. FPS must be different if videolength would be different.
    No, the lengths don't have to be the same just because the frame rate is the same. The shorter video can simply have fewer frames. You need to figure out what in your processing caused that.
    Quote Quote  
  15. That's technically true, but as i said when i play them side by side 16 minutes it does not "loose" any frames or so. audio and video is sync. BUT when i jump in the timeline of the video, then the encoded one has async video.

    I did now cut off the audio and i will see if it works. Video is encoding now 65%. Soon i will see if the problem is solved now.
    Quote Quote  
  16. Update: It did NOT work with cutting the audio before!!

    I cut the audio from 45min 40sec to 45min 36sec as in the video (there was a dead line with no sound for the last 4 seconds). Then loaded this audio in hybrid and did an encode.... It did not work.

    Last time it was like that (look on picture above): Raw video was 45min 36sec video and 45min 40sec audio and the encoded was 45min 33sec video and 45min 36sec audio. NOW the new encode is 45min 33sec video and 45min 36sec audio.

    So the video still gets cut down to far. BUT as i said: The video is totaly fine when played, it is just wrong, when you jump to a specific time. Then the video is completly wrong!

    Has anyone an idea?
    Image Attached Thumbnails Click image for larger version

Name:	still delay on skip.png
Views:	8
Size:	477.1 KB
ID:	78834  

    Quote Quote  
  17. I'd check out the timecodes within the mp4 file. Also try remuxing to MKV to see if there's any difference.
    Quote Quote  
  18. Thanks. I will try that. But the Audio is still longer than the video in the original capture. So would you exchange the audio with a "fixed" one when muxing in mkv? I think this would be better, right ?

    Edit: When i drag&drop the video into virtualdub2 and then just save the video without doing sth the audio-track has then the same length like the videotrack. But when i then look at the audiotrack in audacity it still has this "dead-end" with no sound. So i think i will insert the "fixed" audio and mux it with the video to make both same length and THEN i encode it. And then lets see if it works...
    Quote Quote  
  19. You could also try to use ac3 audio instead of aac in mp4.
    Quote Quote  
  20. Holy mother of video, it worked! Video is now not shorter anymore after encoding!! So it is "fixable" with "just" remuxing (while inserting the cut audio, not the original). So as described in #18

    So thank you very much to all of you for your help!

    Originally Posted by ProWo View Post
    You could also try to use ac3 audio instead of aac in mp4.
    That would not help, because the audio actually has no problem, it is/was the video which was shorter.
    Quote Quote  
  21. im now done with most videos, but there is a new problem i can't manage:

    Some of the vhs-videos from the new capture have worse audio than the one from the old capture. So i did cut the audio from the new capture perfect (and it is also working perfect). Then i inserted the audio from the old capture side by side in audacity. then i did cut the beginning in that way, that both audio sounds like one, when playing (no async). And then cut off the end from the old capture-audio, that it matches the length of the audio from the new capture.

    So at the end i have 2 audio, one from the old capture and one form the new capture. both are 100% sync and 100% same lengt. When i use the new capture audio on the new caputre video it is 100% fine. But when i use the old (actually 100% same length) file, it is TOTALLY messed up. It is like 4seconds async, but the longer the video takes the more async it is. So it is again not just a simple delay. the delay gets bigger and bigger. But strange is, that the exact same length audio from the old caputre does not work, while the one from the new capture does work. And both are starting at same milisecond and when played together, the audio sounds like one (so perfect matched).

    I did this on virtualdub2. Just inserting the audio from the old-capture and save. that's enough to mess up the audio at all.

    also when i encode the new capture video with the new capture-audio it works fine. But when i then insert the audio from the old capture-video it just dont works.

    I really have no idea why that could be the case. Has anyone an idea? Problem is i can not share (still family video stuff of 45 minutes 70gb raw video).
    Quote Quote  
  22. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Try muxing the video and audio in mkvtoolnix and create an mkv file
    Quote Quote  
  23. Originally Posted by davexnet View Post
    Try muxing the video and audio in mkvtoolnix and create an mkv file
    That does not help. It produced the exact same wrong video like when using virtual dub.
    Quote Quote  
  24. Edit: I found out, that the audio from the old capture is less stretched. So it is like of it would have another framerate. but both videos have the same framerate.

    But i dont know how to stretch that audio correctly. When increase speed in audacity, it does (at the end) match perfectly, but everything in the middle is completly wrong. so it does not get stretched correctly.


    Does anyone here have an idea how to stretch an audio ?
    Quote Quote  
  25. We can help only if you upload this video.
    To mantain privacy you could pm the link to one person only.
    Just as last ressort...
    Quote Quote  
  26. Originally Posted by ProWo View Post
    We can help only if you upload this video.
    To mantain privacy you could pm the link to one person only.
    Just as last ressort...
    Ok, i will send you a message in 8 min when file is uploaded. Hold on please ^^

    i would be glad if you look over it.

    Edit: I can also send it someone else (in PM) who wants to help. So if you want to have a look on it, tell me, i can send you then.
    Last edited by Platos; 6th May 2024 at 16:47.
    Quote Quote  
  27. Probably i would "only" need a tool, which can fix an increasing delay. so a delay, which increases over time. Technically this would work, if i could "stretch" the audio all 5 seconds or so. But it is clear, that i can't do that manually for 12 video each 45minutes long (And also i would need to know how much i have to stretch each 5 seconds part). Is there any tool/gui where you can like experiment with sth like a "acceleration" ? I mean you can change audio temp (like "velocity"). But i need sth like "acceleration" to change an increasing delay.

    Any idea? Maybe i can solve it then by myself.

    Probably it is sth like that (hypothetical example): I get all 1 second an additional 2ms on top. So after 45min it is 5.4seconds delay. I would need a tool where i could enter the delay at (for example) 0 or 1 minute and at 45minute and then you can calculate the "acceleration" of the delay. Or a tool where i can enter a "acceleration" of the delay (how much increase over time = acceleration). So mathematically this should be possible. Is there any tool for that? Calculating acceleration should be no problem for me. I just could compare the 2 audio and calculate.

    Edit: I found out it is even more complicatet. When i look at 30 seconds of audio the delay does change several times. First it is sholrt, then unexistant, then large and so on. Super strange audio.
    Last edited by Platos; 6th May 2024 at 20:04.
    Quote Quote  
  28. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Why don't you post the two audio sections to the forum? The one that is timed correctly and the one that goes out.

    Did you do the video capture in Virtualdub ?
    Quote Quote  
  29. Originally Posted by davexnet View Post
    Why don't you post the two audio sections to the forum? The one that is timed correctly and the one that goes out.

    Did you do the video capture in Virtualdub ?
    Because it is private as i said. But i can send it as pm if you want.

    yes, i did the capture in virtual dub (new capture). the old capture i dont know. Someone else did it.

    I feel like the capture itself is just broken (so the old one). but it is not async on the old video. just on the new video. So both video and audio is different between the new/old one.

    but yeah, if you want the audio, tell me. Then i send it to you
    Quote Quote  
  30. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    There was some information a while back; there is/was a setting in the virtualdub capture
    where strange things would happen to the audio - I believe something to do with synchronization,
    but I don't remember the details
    Perhaps you should switch to AmarecTV for the captire.
    Yes, you're welcome to PM me, I'll take a look at the two audio's. I assume they're WAV files?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!