VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. So I've captured my tapes in virtualdub 32bit using huffyuv, no additional processing/filters/scripts.

    Upon playback, I noticed my cpu at 100% for simple 480i content, which should be no sweat for my 10700k @5ghz, 32GB ram, and 2080ti. I started troubleshooting my video player settings, but when that didn't change anything, I tried opening the file in vlc, and it tells me the avi index is broken. So I open the file back up in potplayer, and skim around. Near the beginning, 5% cpu usage, middle to end of the video 100% cpu.

    I tried using virtualdub to direct stream copy the video to a new avi file, but it had the same issue. I then tried to direct stream copy the file to mkv in virtualdub2 and it had no issue.

    I have no idea what's causing the broken avi index, but is there any downside to saving as mkv if I'm using direct stream copy? The audio in the avi was set to interleave, will this carry over to the new container or does it get split out into its own stream, and would that affect sync if so? Any downsides as far as limitations in later steps of processing?

    Of course I'd prefer a quick fix if anyone has any suggestions

    thanks in advance, you guys always come through
    Quote Quote  
  2. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Hi.
    This is an oldie, but the AVI format hasn't changed in a long time.
    It worked on a couple of faulty AVI clips I had.
    https://sourceforge.net/projects/divfixpp/

    This thread gives some good info on things tried/failed/succeeded.
    https://forum.videohelp.com/threads/389294-AVI-file-missing-or-broken-index
    (see the last post)

    Cheers.
    Last edited by pcspeak; 13th Jun 2021 at 14:34.
    Quote Quote  
  3. Originally Posted by pcspeak View Post
    Hi.
    This is an oldie, but the AVI format hasn't changed in a long time.
    It worked on a couple of faulty AVI clips I had.
    https://sourceforge.net/projects/divfixpp/

    This thread gives some good info on things tried/failed/succeeded.
    https://forum.videohelp.com/threads/389294-AVI-file-missing-or-broken-index
    (see the last post)

    Cheers.
    Thanks!
    I gave it a shot but the divfix program kept running into an unhandled exception. maybe it doesn't like such a new OS. I tried the other suggestions as well but no luck so far.

    I'm okay with converting to the mkv container if necessary, my only concern is audio sync
    Quote Quote  
  4. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    OK. I have Windows 10 x64
    I just ran a quick test with divfix on an uncompressed AVI. It was NOT corrupt. I don't have a dud one to test.
    Ran through OK.

    I wrote a batch file to adjust V/A sync problems.
    You can find it here.
    https://forum.videohelp.com/threads/394362-MP4-File-Re-Sync-Batch-Conversion-(Avidemux-)#post2560718

    EDIT: A new batch file!
    Create a batch file from the following code.
    Drag and drop a video onto the batch file.
    ffmpeg.exe is required.
    (I always copy ffmpeg, ffprobe & ffplay to the Windows folder to make them available to my batch files.)

    Fix-Audio V02.cmd
    Code:
    @echo off
    if not exist New\ md New
    
    echo.
    echo  Output will be in the \NEW folder.
    echo  Enter the figure in "seconds.milliseconds"
    echo  with a plus or minus sign in front.
    echo.
    echo  The change can be negative or positive.
    echo  e.g.
    echo  -0.500  -^> half a second
    echo  -0.250  -^> a quarter of a second
    echo  +0.280  -^> two hundred and eighty milliseconds
    echo  +1.500  -^> one and a half seconds
    echo.
    echo  If the audio is playing too late use negative.
    echo  If the audio is playing too soon use positive.
    set /p offset=Enter the change:
    
    :Loop
    ffmpeg.exe -i %1 -itsoffset %offset% -i %1 -vcodec copy -acodec copy -map 0:0 -map 1:1  -y "NEW\%~nx1"
    shift
    if not %1=="" goto :Loop
    Cheers.
    Last edited by pcspeak; 14th Jun 2021 at 14:54. Reason: Add new batch file
    Quote Quote  
  5. Originally Posted by pcspeak View Post
    OK. I have Windows 10 x64
    I just ran a quick test with divfix on an uncompressed AVI. It was NOT corrupt. I don't have a dud one to test.
    Ran through OK.

    I wrote a batch file to adjust V/A sync problems.
    You can find it here.
    https://forum.videohelp.com/threads/394362-MP4-File-Re-Sync-Batch-Conversion-(Avidemux-)#post2560718

    EDIT: A new batch file!
    Create a batch file from the following code.
    Drag and drop a video onto the batch file.
    ffmpeg.exe is required.
    (I always copy ffmpeg, ffprobe & ffplay to the Windows folder to make them available to my batch files.)

    Fix-Audio V02.cmd
    Code:
    @echo off
    if not exist New\ md New
    
    echo.
    echo  Output will be in the \NEW folder.
    echo  Enter the figure in "seconds.milliseconds"
    echo  with a plus or minus sign in front.
    echo.
    echo  The change can be negative or positive.
    echo  e.g.
    echo  -0.500  -^> half a second
    echo  -0.250  -^> a quarter of a second
    echo  +0.280  -^> two hundred and eighty milliseconds
    echo  +1.500  -^> one and a half seconds
    echo.
    echo  If the audio is playing too late use negative.
    echo  If the audio is playing too soon use positive.
    set /p offset=Enter the change:
    
    :Loop
    ffmpeg.exe -i %1 -itsoffset %offset% -i %1 -vcodec copy -acodec copy -map 0:0 -map 1:1  -y "NEW\%~nx1"
    shift
    if not %1=="" goto :Loop
    Cheers.
    I'd be happy to upload a short sample for you to test when I get home in a bit, it seems no matter if I cut a section with direct stream copy the sample has the same issue.

    thanks for sharing the script, I'll use it if sync goes off, I haven't really checked for sync issues yet after converting to mkv. I was only concerned because my avi has audio interleaved and during conversion to mkv it splits out the audio into its own track, not 100% sure how it handles that. Hopefully there's no issue so I can get through this a little quicker.
    Quote Quote  
  6. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    I'd be happy to upload a short sample for you to test
    Sure. I'll take a look.

    Back to your original questions.
    I don't see any downside to having MKV files.
    I'm inclined to create a new MKV with mkvtoolnix GUI, dropping subtitles and extra audio languages that I don't need.
    Whether and how the video and audio are split? I don't know.

    Cheers.
    Last edited by pcspeak; 14th Jun 2021 at 17:47.
    Quote Quote  
  7. Writing the index is done at the end of the cap. If the program crashes (or is killed) before closing out the file the index will be corrupt or missing. There is no reason your capture programs should be failing to write the index.

    Regarding A/V interleaving -- virtually all media muxers interleave the audio and video chunks. This is necessary for smooth playback. It will be done automatically (regardless of the source) so you don't have to worry about it.
    Quote Quote  
  8. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Originally Posted by jagabo View Post
    Writing the index is done at the end of the cap.
    Ah, thanks. That explains some past oddities I've had.
    I've tended to kill off a process when I've gotten enough of a sample output.
    So, it's a soft termination from now on.

    Cheers
    Quote Quote  



Similar Threads

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