How can I repair a broken AVI file?












21















I have an .avi file that is about 110mb. When I try to play it with VLC Media Player it says something like "This file is broken. Attempt to repair?" and after it does its thing it is still unable to play it.



Is there any other software out there that can possibly get whatever video it can out of it? Maybe one that specializes on that sort of thing? I'm not very hopeful because I figured if anything could be played out of it VLC would have managed to do it, but I figured I'd give it a shot anyways...










share|improve this question



























    21















    I have an .avi file that is about 110mb. When I try to play it with VLC Media Player it says something like "This file is broken. Attempt to repair?" and after it does its thing it is still unable to play it.



    Is there any other software out there that can possibly get whatever video it can out of it? Maybe one that specializes on that sort of thing? I'm not very hopeful because I figured if anything could be played out of it VLC would have managed to do it, but I figured I'd give it a shot anyways...










    share|improve this question

























      21












      21








      21


      10






      I have an .avi file that is about 110mb. When I try to play it with VLC Media Player it says something like "This file is broken. Attempt to repair?" and after it does its thing it is still unable to play it.



      Is there any other software out there that can possibly get whatever video it can out of it? Maybe one that specializes on that sort of thing? I'm not very hopeful because I figured if anything could be played out of it VLC would have managed to do it, but I figured I'd give it a shot anyways...










      share|improve this question














      I have an .avi file that is about 110mb. When I try to play it with VLC Media Player it says something like "This file is broken. Attempt to repair?" and after it does its thing it is still unable to play it.



      Is there any other software out there that can possibly get whatever video it can out of it? Maybe one that specializes on that sort of thing? I'm not very hopeful because I figured if anything could be played out of it VLC would have managed to do it, but I figured I'd give it a shot anyways...







      video media repair avi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 16 '09 at 4:01









      Paolo BergantinoPaolo Bergantino

      2,13452227




      2,13452227






















          7 Answers
          7






          active

          oldest

          votes


















          11














          I've had some luck in the past with a lot of broken/incomplete AVIs using DivFix, but not sure if it works well on anything later than Windows XP.



          A newer version is DivFix++:




          DivXFix++ is designed to repair broken AVI file streams by rebuilding index part of file. This is very useful when trying to preview movies which has no index part, like some files are currently downloading from ed2k or bittorent networks. DivFix++ is complete rewrite of "DivFix" program due it's bugs and low performance.







          share|improve this answer





















          • 2





            Awesome. I did this for a 799 MB video file and it worked like a charm. In fact, this AVI file when played with VLC came up with the same error. It never played on Windows Media Player. Now it plays perfectly fine in Windows Media Player also. Nick - Thanks much!

            – Kanini
            Oct 23 '09 at 7:21











          • @Kanini, glad DivFix helped :)

            – Nick Josevski
            Oct 24 '09 at 23:56



















          12














          Here are some programs that might help:





          • VLC should offer you to fix a broken AVI file's index when you open the file.

          • DivFix++


          • AviFiXP (only runs on Windows)


          There's an extensive tutorial on repairing broken AVI files here: Repair broken or corrupt AVI files - AfterDawn: Guides



          You can also try rebuilding the container by doing a bitstream copy with FFmpeg:



          ffmpeg -i input.avi -c copy output.avi





          share|improve this answer



















          • 1





            With ffmpeg 0.6.2, use -vcodec copy -acodec copy instead of -c copy. I used (for windows) this version. I had a bunch of files to fix. DivFix++ crashed on me. ffmpeg was great. Thanks.

            – sinelaw
            Sep 12 '13 at 12:21













          • I fixed your comment. Note that this really only applies to (now) outdated ffmpeg versions.

            – slhck
            Sep 12 '13 at 13:01



















          3














          VirtualDub can do pretty amazing things with broken AVI files. Just open the file in VirtualDub, let it cook, and then if it's opened it successfully, re-save it as a new AVI file. Usually, you don't even need to change the compression settings.






          share|improve this answer
























          • Ah, VirtualDub is a good recommendation but it wasn't able to do squat with it.

            – Paolo Bergantino
            Jul 28 '09 at 17:54











          • Man, sorry to hear that. Hope you find something that works - noting more frustrating than a 100 meg file you can't use!

            – Electrons_Ahoy
            Jul 30 '09 at 20:19



















          2














          There is a played called SuperDecoder.



          have been able to play really messed up files and CD/DVDs with it. You can give it a shot.






          share|improve this answer































            2














            I had some AVIs which VLC didn't even attempt to repair and DivFix++ gave me seek errors for. Passing them through ffmpeg didn't work, but mencoder did (it's very quick):



            mencoder -idx input.avi -ovc copy -oac copy -o output.avi


            (mencoder is part of the mplayer package on most systems, e.g. brew install mplayer on Homebrew.)



            See also: How can I check the integrity of an avi file and repair it automatically in Linux?






            share|improve this answer

































              0














              All good ideas for how to repair the broken AVI index (my preference is ffmpeg), but contributing here a way to find avi files that have the broken index to test them and proactively repair them. After unsuccessfully trying to use mediainfo ffprobe and others to detect files that vlc would complain about, I finally decided to use vlc since it was the one that's complaining. Here's a snippet that may be useful as part of a scan and automated repair script.



              if grep -q "avi demux error" 
              <(cvlc --vout null --aout null --stop-time 2 "${VIDFILE}" vlc://quit 2>&1 )
              # alternate ways to stop after two seconds
              #<(timeout 2 cvlc --vout null --aout null "${VIDFILE}" 2>&1)
              #<(cvlc --vout null --aout null "${VIDFILE}" 2>&1 & sleep 2; kill $!)
              then
              echo "avi demux error: ${VIDFILE}"
              exit 1
              fi


              Note: the alternate stopping methods (so it doesn't play the whole video before exiting) are included because some versions of VLC have a bug in --stop-time and other systems may not have timeout.






              share|improve this answer































                -1














                I've had good experience so far with Media Player Classic and The KMPlayer. They can play files which have been partially downloaded, or broken into parts (by hjsplit for example).



                I think they may be able to play yours.



                Although, it also depends on the type of codec and so ...






                share|improve this answer






















                  protected by slhck May 2 '13 at 7:12



                  Thank you for your interest in this question.
                  Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                  Would you like to answer one of these unanswered questions instead?














                  7 Answers
                  7






                  active

                  oldest

                  votes








                  7 Answers
                  7






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  11














                  I've had some luck in the past with a lot of broken/incomplete AVIs using DivFix, but not sure if it works well on anything later than Windows XP.



                  A newer version is DivFix++:




                  DivXFix++ is designed to repair broken AVI file streams by rebuilding index part of file. This is very useful when trying to preview movies which has no index part, like some files are currently downloading from ed2k or bittorent networks. DivFix++ is complete rewrite of "DivFix" program due it's bugs and low performance.







                  share|improve this answer





















                  • 2





                    Awesome. I did this for a 799 MB video file and it worked like a charm. In fact, this AVI file when played with VLC came up with the same error. It never played on Windows Media Player. Now it plays perfectly fine in Windows Media Player also. Nick - Thanks much!

                    – Kanini
                    Oct 23 '09 at 7:21











                  • @Kanini, glad DivFix helped :)

                    – Nick Josevski
                    Oct 24 '09 at 23:56
















                  11














                  I've had some luck in the past with a lot of broken/incomplete AVIs using DivFix, but not sure if it works well on anything later than Windows XP.



                  A newer version is DivFix++:




                  DivXFix++ is designed to repair broken AVI file streams by rebuilding index part of file. This is very useful when trying to preview movies which has no index part, like some files are currently downloading from ed2k or bittorent networks. DivFix++ is complete rewrite of "DivFix" program due it's bugs and low performance.







                  share|improve this answer





















                  • 2





                    Awesome. I did this for a 799 MB video file and it worked like a charm. In fact, this AVI file when played with VLC came up with the same error. It never played on Windows Media Player. Now it plays perfectly fine in Windows Media Player also. Nick - Thanks much!

                    – Kanini
                    Oct 23 '09 at 7:21











                  • @Kanini, glad DivFix helped :)

                    – Nick Josevski
                    Oct 24 '09 at 23:56














                  11












                  11








                  11







                  I've had some luck in the past with a lot of broken/incomplete AVIs using DivFix, but not sure if it works well on anything later than Windows XP.



                  A newer version is DivFix++:




                  DivXFix++ is designed to repair broken AVI file streams by rebuilding index part of file. This is very useful when trying to preview movies which has no index part, like some files are currently downloading from ed2k or bittorent networks. DivFix++ is complete rewrite of "DivFix" program due it's bugs and low performance.







                  share|improve this answer















                  I've had some luck in the past with a lot of broken/incomplete AVIs using DivFix, but not sure if it works well on anything later than Windows XP.



                  A newer version is DivFix++:




                  DivXFix++ is designed to repair broken AVI file streams by rebuilding index part of file. This is very useful when trying to preview movies which has no index part, like some files are currently downloading from ed2k or bittorent networks. DivFix++ is complete rewrite of "DivFix" program due it's bugs and low performance.








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 19 '12 at 20:49









                  slhck

                  162k47448470




                  162k47448470










                  answered Jul 16 '09 at 4:59









                  Nick JosevskiNick Josevski

                  5,56793859




                  5,56793859








                  • 2





                    Awesome. I did this for a 799 MB video file and it worked like a charm. In fact, this AVI file when played with VLC came up with the same error. It never played on Windows Media Player. Now it plays perfectly fine in Windows Media Player also. Nick - Thanks much!

                    – Kanini
                    Oct 23 '09 at 7:21











                  • @Kanini, glad DivFix helped :)

                    – Nick Josevski
                    Oct 24 '09 at 23:56














                  • 2





                    Awesome. I did this for a 799 MB video file and it worked like a charm. In fact, this AVI file when played with VLC came up with the same error. It never played on Windows Media Player. Now it plays perfectly fine in Windows Media Player also. Nick - Thanks much!

                    – Kanini
                    Oct 23 '09 at 7:21











                  • @Kanini, glad DivFix helped :)

                    – Nick Josevski
                    Oct 24 '09 at 23:56








                  2




                  2





                  Awesome. I did this for a 799 MB video file and it worked like a charm. In fact, this AVI file when played with VLC came up with the same error. It never played on Windows Media Player. Now it plays perfectly fine in Windows Media Player also. Nick - Thanks much!

                  – Kanini
                  Oct 23 '09 at 7:21





                  Awesome. I did this for a 799 MB video file and it worked like a charm. In fact, this AVI file when played with VLC came up with the same error. It never played on Windows Media Player. Now it plays perfectly fine in Windows Media Player also. Nick - Thanks much!

                  – Kanini
                  Oct 23 '09 at 7:21













                  @Kanini, glad DivFix helped :)

                  – Nick Josevski
                  Oct 24 '09 at 23:56





                  @Kanini, glad DivFix helped :)

                  – Nick Josevski
                  Oct 24 '09 at 23:56













                  12














                  Here are some programs that might help:





                  • VLC should offer you to fix a broken AVI file's index when you open the file.

                  • DivFix++


                  • AviFiXP (only runs on Windows)


                  There's an extensive tutorial on repairing broken AVI files here: Repair broken or corrupt AVI files - AfterDawn: Guides



                  You can also try rebuilding the container by doing a bitstream copy with FFmpeg:



                  ffmpeg -i input.avi -c copy output.avi





                  share|improve this answer



















                  • 1





                    With ffmpeg 0.6.2, use -vcodec copy -acodec copy instead of -c copy. I used (for windows) this version. I had a bunch of files to fix. DivFix++ crashed on me. ffmpeg was great. Thanks.

                    – sinelaw
                    Sep 12 '13 at 12:21













                  • I fixed your comment. Note that this really only applies to (now) outdated ffmpeg versions.

                    – slhck
                    Sep 12 '13 at 13:01
















                  12














                  Here are some programs that might help:





                  • VLC should offer you to fix a broken AVI file's index when you open the file.

                  • DivFix++


                  • AviFiXP (only runs on Windows)


                  There's an extensive tutorial on repairing broken AVI files here: Repair broken or corrupt AVI files - AfterDawn: Guides



                  You can also try rebuilding the container by doing a bitstream copy with FFmpeg:



                  ffmpeg -i input.avi -c copy output.avi





                  share|improve this answer



















                  • 1





                    With ffmpeg 0.6.2, use -vcodec copy -acodec copy instead of -c copy. I used (for windows) this version. I had a bunch of files to fix. DivFix++ crashed on me. ffmpeg was great. Thanks.

                    – sinelaw
                    Sep 12 '13 at 12:21













                  • I fixed your comment. Note that this really only applies to (now) outdated ffmpeg versions.

                    – slhck
                    Sep 12 '13 at 13:01














                  12












                  12








                  12







                  Here are some programs that might help:





                  • VLC should offer you to fix a broken AVI file's index when you open the file.

                  • DivFix++


                  • AviFiXP (only runs on Windows)


                  There's an extensive tutorial on repairing broken AVI files here: Repair broken or corrupt AVI files - AfterDawn: Guides



                  You can also try rebuilding the container by doing a bitstream copy with FFmpeg:



                  ffmpeg -i input.avi -c copy output.avi





                  share|improve this answer













                  Here are some programs that might help:





                  • VLC should offer you to fix a broken AVI file's index when you open the file.

                  • DivFix++


                  • AviFiXP (only runs on Windows)


                  There's an extensive tutorial on repairing broken AVI files here: Repair broken or corrupt AVI files - AfterDawn: Guides



                  You can also try rebuilding the container by doing a bitstream copy with FFmpeg:



                  ffmpeg -i input.avi -c copy output.avi






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 19 '12 at 20:48









                  slhckslhck

                  162k47448470




                  162k47448470








                  • 1





                    With ffmpeg 0.6.2, use -vcodec copy -acodec copy instead of -c copy. I used (for windows) this version. I had a bunch of files to fix. DivFix++ crashed on me. ffmpeg was great. Thanks.

                    – sinelaw
                    Sep 12 '13 at 12:21













                  • I fixed your comment. Note that this really only applies to (now) outdated ffmpeg versions.

                    – slhck
                    Sep 12 '13 at 13:01














                  • 1





                    With ffmpeg 0.6.2, use -vcodec copy -acodec copy instead of -c copy. I used (for windows) this version. I had a bunch of files to fix. DivFix++ crashed on me. ffmpeg was great. Thanks.

                    – sinelaw
                    Sep 12 '13 at 12:21













                  • I fixed your comment. Note that this really only applies to (now) outdated ffmpeg versions.

                    – slhck
                    Sep 12 '13 at 13:01








                  1




                  1





                  With ffmpeg 0.6.2, use -vcodec copy -acodec copy instead of -c copy. I used (for windows) this version. I had a bunch of files to fix. DivFix++ crashed on me. ffmpeg was great. Thanks.

                  – sinelaw
                  Sep 12 '13 at 12:21







                  With ffmpeg 0.6.2, use -vcodec copy -acodec copy instead of -c copy. I used (for windows) this version. I had a bunch of files to fix. DivFix++ crashed on me. ffmpeg was great. Thanks.

                  – sinelaw
                  Sep 12 '13 at 12:21















                  I fixed your comment. Note that this really only applies to (now) outdated ffmpeg versions.

                  – slhck
                  Sep 12 '13 at 13:01





                  I fixed your comment. Note that this really only applies to (now) outdated ffmpeg versions.

                  – slhck
                  Sep 12 '13 at 13:01











                  3














                  VirtualDub can do pretty amazing things with broken AVI files. Just open the file in VirtualDub, let it cook, and then if it's opened it successfully, re-save it as a new AVI file. Usually, you don't even need to change the compression settings.






                  share|improve this answer
























                  • Ah, VirtualDub is a good recommendation but it wasn't able to do squat with it.

                    – Paolo Bergantino
                    Jul 28 '09 at 17:54











                  • Man, sorry to hear that. Hope you find something that works - noting more frustrating than a 100 meg file you can't use!

                    – Electrons_Ahoy
                    Jul 30 '09 at 20:19
















                  3














                  VirtualDub can do pretty amazing things with broken AVI files. Just open the file in VirtualDub, let it cook, and then if it's opened it successfully, re-save it as a new AVI file. Usually, you don't even need to change the compression settings.






                  share|improve this answer
























                  • Ah, VirtualDub is a good recommendation but it wasn't able to do squat with it.

                    – Paolo Bergantino
                    Jul 28 '09 at 17:54











                  • Man, sorry to hear that. Hope you find something that works - noting more frustrating than a 100 meg file you can't use!

                    – Electrons_Ahoy
                    Jul 30 '09 at 20:19














                  3












                  3








                  3







                  VirtualDub can do pretty amazing things with broken AVI files. Just open the file in VirtualDub, let it cook, and then if it's opened it successfully, re-save it as a new AVI file. Usually, you don't even need to change the compression settings.






                  share|improve this answer













                  VirtualDub can do pretty amazing things with broken AVI files. Just open the file in VirtualDub, let it cook, and then if it's opened it successfully, re-save it as a new AVI file. Usually, you don't even need to change the compression settings.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 27 '09 at 20:50









                  Electrons_AhoyElectrons_Ahoy

                  1,87142635




                  1,87142635













                  • Ah, VirtualDub is a good recommendation but it wasn't able to do squat with it.

                    – Paolo Bergantino
                    Jul 28 '09 at 17:54











                  • Man, sorry to hear that. Hope you find something that works - noting more frustrating than a 100 meg file you can't use!

                    – Electrons_Ahoy
                    Jul 30 '09 at 20:19



















                  • Ah, VirtualDub is a good recommendation but it wasn't able to do squat with it.

                    – Paolo Bergantino
                    Jul 28 '09 at 17:54











                  • Man, sorry to hear that. Hope you find something that works - noting more frustrating than a 100 meg file you can't use!

                    – Electrons_Ahoy
                    Jul 30 '09 at 20:19

















                  Ah, VirtualDub is a good recommendation but it wasn't able to do squat with it.

                  – Paolo Bergantino
                  Jul 28 '09 at 17:54





                  Ah, VirtualDub is a good recommendation but it wasn't able to do squat with it.

                  – Paolo Bergantino
                  Jul 28 '09 at 17:54













                  Man, sorry to hear that. Hope you find something that works - noting more frustrating than a 100 meg file you can't use!

                  – Electrons_Ahoy
                  Jul 30 '09 at 20:19





                  Man, sorry to hear that. Hope you find something that works - noting more frustrating than a 100 meg file you can't use!

                  – Electrons_Ahoy
                  Jul 30 '09 at 20:19











                  2














                  There is a played called SuperDecoder.



                  have been able to play really messed up files and CD/DVDs with it. You can give it a shot.






                  share|improve this answer




























                    2














                    There is a played called SuperDecoder.



                    have been able to play really messed up files and CD/DVDs with it. You can give it a shot.






                    share|improve this answer


























                      2












                      2








                      2







                      There is a played called SuperDecoder.



                      have been able to play really messed up files and CD/DVDs with it. You can give it a shot.






                      share|improve this answer













                      There is a played called SuperDecoder.



                      have been able to play really messed up files and CD/DVDs with it. You can give it a shot.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jul 16 '09 at 4:40









                      M.NM.N

                      1214




                      1214























                          2














                          I had some AVIs which VLC didn't even attempt to repair and DivFix++ gave me seek errors for. Passing them through ffmpeg didn't work, but mencoder did (it's very quick):



                          mencoder -idx input.avi -ovc copy -oac copy -o output.avi


                          (mencoder is part of the mplayer package on most systems, e.g. brew install mplayer on Homebrew.)



                          See also: How can I check the integrity of an avi file and repair it automatically in Linux?






                          share|improve this answer






























                            2














                            I had some AVIs which VLC didn't even attempt to repair and DivFix++ gave me seek errors for. Passing them through ffmpeg didn't work, but mencoder did (it's very quick):



                            mencoder -idx input.avi -ovc copy -oac copy -o output.avi


                            (mencoder is part of the mplayer package on most systems, e.g. brew install mplayer on Homebrew.)



                            See also: How can I check the integrity of an avi file and repair it automatically in Linux?






                            share|improve this answer




























                              2












                              2








                              2







                              I had some AVIs which VLC didn't even attempt to repair and DivFix++ gave me seek errors for. Passing them through ffmpeg didn't work, but mencoder did (it's very quick):



                              mencoder -idx input.avi -ovc copy -oac copy -o output.avi


                              (mencoder is part of the mplayer package on most systems, e.g. brew install mplayer on Homebrew.)



                              See also: How can I check the integrity of an avi file and repair it automatically in Linux?






                              share|improve this answer















                              I had some AVIs which VLC didn't even attempt to repair and DivFix++ gave me seek errors for. Passing them through ffmpeg didn't work, but mencoder did (it's very quick):



                              mencoder -idx input.avi -ovc copy -oac copy -o output.avi


                              (mencoder is part of the mplayer package on most systems, e.g. brew install mplayer on Homebrew.)



                              See also: How can I check the integrity of an avi file and repair it automatically in Linux?







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Feb 6 at 1:14









                              JakeGould

                              31.6k1097139




                              31.6k1097139










                              answered May 13 '16 at 22:07









                              William TurrellWilliam Turrell

                              367315




                              367315























                                  0














                                  All good ideas for how to repair the broken AVI index (my preference is ffmpeg), but contributing here a way to find avi files that have the broken index to test them and proactively repair them. After unsuccessfully trying to use mediainfo ffprobe and others to detect files that vlc would complain about, I finally decided to use vlc since it was the one that's complaining. Here's a snippet that may be useful as part of a scan and automated repair script.



                                  if grep -q "avi demux error" 
                                  <(cvlc --vout null --aout null --stop-time 2 "${VIDFILE}" vlc://quit 2>&1 )
                                  # alternate ways to stop after two seconds
                                  #<(timeout 2 cvlc --vout null --aout null "${VIDFILE}" 2>&1)
                                  #<(cvlc --vout null --aout null "${VIDFILE}" 2>&1 & sleep 2; kill $!)
                                  then
                                  echo "avi demux error: ${VIDFILE}"
                                  exit 1
                                  fi


                                  Note: the alternate stopping methods (so it doesn't play the whole video before exiting) are included because some versions of VLC have a bug in --stop-time and other systems may not have timeout.






                                  share|improve this answer




























                                    0














                                    All good ideas for how to repair the broken AVI index (my preference is ffmpeg), but contributing here a way to find avi files that have the broken index to test them and proactively repair them. After unsuccessfully trying to use mediainfo ffprobe and others to detect files that vlc would complain about, I finally decided to use vlc since it was the one that's complaining. Here's a snippet that may be useful as part of a scan and automated repair script.



                                    if grep -q "avi demux error" 
                                    <(cvlc --vout null --aout null --stop-time 2 "${VIDFILE}" vlc://quit 2>&1 )
                                    # alternate ways to stop after two seconds
                                    #<(timeout 2 cvlc --vout null --aout null "${VIDFILE}" 2>&1)
                                    #<(cvlc --vout null --aout null "${VIDFILE}" 2>&1 & sleep 2; kill $!)
                                    then
                                    echo "avi demux error: ${VIDFILE}"
                                    exit 1
                                    fi


                                    Note: the alternate stopping methods (so it doesn't play the whole video before exiting) are included because some versions of VLC have a bug in --stop-time and other systems may not have timeout.






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      All good ideas for how to repair the broken AVI index (my preference is ffmpeg), but contributing here a way to find avi files that have the broken index to test them and proactively repair them. After unsuccessfully trying to use mediainfo ffprobe and others to detect files that vlc would complain about, I finally decided to use vlc since it was the one that's complaining. Here's a snippet that may be useful as part of a scan and automated repair script.



                                      if grep -q "avi demux error" 
                                      <(cvlc --vout null --aout null --stop-time 2 "${VIDFILE}" vlc://quit 2>&1 )
                                      # alternate ways to stop after two seconds
                                      #<(timeout 2 cvlc --vout null --aout null "${VIDFILE}" 2>&1)
                                      #<(cvlc --vout null --aout null "${VIDFILE}" 2>&1 & sleep 2; kill $!)
                                      then
                                      echo "avi demux error: ${VIDFILE}"
                                      exit 1
                                      fi


                                      Note: the alternate stopping methods (so it doesn't play the whole video before exiting) are included because some versions of VLC have a bug in --stop-time and other systems may not have timeout.






                                      share|improve this answer













                                      All good ideas for how to repair the broken AVI index (my preference is ffmpeg), but contributing here a way to find avi files that have the broken index to test them and proactively repair them. After unsuccessfully trying to use mediainfo ffprobe and others to detect files that vlc would complain about, I finally decided to use vlc since it was the one that's complaining. Here's a snippet that may be useful as part of a scan and automated repair script.



                                      if grep -q "avi demux error" 
                                      <(cvlc --vout null --aout null --stop-time 2 "${VIDFILE}" vlc://quit 2>&1 )
                                      # alternate ways to stop after two seconds
                                      #<(timeout 2 cvlc --vout null --aout null "${VIDFILE}" 2>&1)
                                      #<(cvlc --vout null --aout null "${VIDFILE}" 2>&1 & sleep 2; kill $!)
                                      then
                                      echo "avi demux error: ${VIDFILE}"
                                      exit 1
                                      fi


                                      Note: the alternate stopping methods (so it doesn't play the whole video before exiting) are included because some versions of VLC have a bug in --stop-time and other systems may not have timeout.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Feb 16 at 1:43









                                      user2070305user2070305

                                      74264




                                      74264























                                          -1














                                          I've had good experience so far with Media Player Classic and The KMPlayer. They can play files which have been partially downloaded, or broken into parts (by hjsplit for example).



                                          I think they may be able to play yours.



                                          Although, it also depends on the type of codec and so ...






                                          share|improve this answer




























                                            -1














                                            I've had good experience so far with Media Player Classic and The KMPlayer. They can play files which have been partially downloaded, or broken into parts (by hjsplit for example).



                                            I think they may be able to play yours.



                                            Although, it also depends on the type of codec and so ...






                                            share|improve this answer


























                                              -1












                                              -1








                                              -1







                                              I've had good experience so far with Media Player Classic and The KMPlayer. They can play files which have been partially downloaded, or broken into parts (by hjsplit for example).



                                              I think they may be able to play yours.



                                              Although, it also depends on the type of codec and so ...






                                              share|improve this answer













                                              I've had good experience so far with Media Player Classic and The KMPlayer. They can play files which have been partially downloaded, or broken into parts (by hjsplit for example).



                                              I think they may be able to play yours.



                                              Although, it also depends on the type of codec and so ...







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Jul 16 '09 at 4:12









                                              RookRook

                                              16.8k28108179




                                              16.8k28108179

















                                                  protected by slhck May 2 '13 at 7:12



                                                  Thank you for your interest in this question.
                                                  Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                  Would you like to answer one of these unanswered questions instead?



                                                  Popular posts from this blog

                                                  Aardman Animations

                                                  Are they similar matrix

                                                  Ficheiro:Flag of Oman.svg