====== How To Fix None Playable AVI File ====== I see quite a few avi files that wont play or play choppy, some may play video but don't have audio. The first thing to try before anything else is a quick remux. Why? Because it takes seconds rather than minutes and some encoding apps that are used on the internet and play fine on a PC are not compatible with hardware players such as the NMT players. There is also no reduction in quality. ===== How to Remux an avi ===== The best and indeed simplest way to remux an avi is with virtualdub. There are many modded versions of virtualdub including the one that I like to use called 'mp3_freeze'. Simply unzip/unrar to your desktop. There's no installation required the software just opens and works on doubleclick. I use this version as it can cope with 'vbr mp3' audio without causing any audioskew whereas occasionally virtualdub cannot cope with vbr mp3 without causing audio sync problems. I stay away from NanDub as i see numerous encodes that don't work and the common thread seems to be NanDub. Doubleclick on the mp3_freeze icon and the app will open. Then select the option File>Open Video File {{::avifix_fig1.png?nolink|}} The avi will then be imported into the app. Then move along to the Video option and choose 'Direct Stream Copy': {{::avifix_fig2.png?nolink|}} Then its simply a case of selecting File>'Save as avi' {{::avifix_fig3.png?nolink|}} Selecting your file name and the app will then resave your avi rewriting the header and indexing. That is it! ===== How to Remux and Remove JUNK from an avi with Avi-MuxGUI ===== Occasionally an avi file will play fine apart from not having any audio. This may be due to JUNK in the header information. To remove JUNK you can simply use an app called AVI-MuxGUI. Download AVI-MuxGUI, I have problems with v1.17.8 on Vista x32 but v.1.17.7 works fine. Launch the app and you should see this window:- {{::avifix_fig4.png?nolink|}} Click on the 'Settings' button to open this window:- {{::avifix_fig5.png?nolink|}} Click on 'AVI Structure' and ensure that there is no check in the JUNK box:- {{::avifix_fig6.png?nolink|}} Drag and drop the troublesome avi file and highlight it:- {{::avifix_fig7.png?nolink|}} Then click on the 'Generate Data' button:- {{::avifix_fig8.png?nolink|}} Click Save and select a name.avi and location for your file. Click 'Start' and it should start processing:- {{::avifix_fig9.png?nolink|}} A couple of minutes later you should see the process finish:- {{::avifix_fig10.png?nolink|}} Some files will still not play despite the quick remux option or removing the JUNK so a recode is necessary. ===== How to recode avi files ===== For these files we have to look at why from looking at the file specifications. To do this I use software called Mediainfo which again is free and can be downloaded [[mediainfo|here]]. Install the mediainfo software and on installation select 'text' output as your default output. It is easier to do this as it can be copied and pasted should you need any further help in the forum. Here's the output from a file called 'Deathrace' that would play choppy:- General Complete name : E:\Last Nights TV\Death Race.avi Format : AVI Format/Info : Audio Video Interleave File size : 1.29 GiB Duration : 1h 40mn Overall bit rate : 1 831 Kbps Writing library : VirtualDub build 0/release Video Format : MPEG-4 Visual Format profile : Streaming Video@L1 Format settings, BVOP : Yes Format settings, QPel : No Format settings, GMC : 3 warppoints Format settings, Matrix : Default Muxing mode : Packed bitstream Codec ID : XVID Codec ID/Hint : XviD Duration : 1h 40mn Bit rate : 1 693 Kbps Width : 720 pixels Height : 304 pixels Display aspect ratio : 2.35 Frame rate : 25.000 fps Resolution : 24 bits Colorimetry : 4:2:0 Scan type : Interlaced Scan order : Bottom Field First Bits/(Pixel*Frame) : 0.309 Stream size : 1.19 GiB (92%) Writing library : XviD 1.2.0.dev47 (UTC 2006-11-01) Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Codec ID : 55 Codec ID/Hint : MP3 Duration : 1h 40mn Bit rate mode : Constant The interesting part that is causing the problem is this part:- **Format settings, GMC : 3 warppoints** You can see that the file has GMC 3 warp points. PC's can play these files but hardware players cannot, the maximum number of warp points that the NMT players can cope with is one. To remove the GMC warp points we have to recode. Recoding WILL reduce quality, the extent is debatable. Remember the bitrate that the mediainfo app displays as we need that later:- **Bit rate : 1 693 Kbps** We have to again open the avi file in VirtualDub making sure that we also select 'Fast recompress' option: {{::avifix_fig11.png?nolink|}} Then move further up the same Video options and select 'Compression' which will open this window: {{::avifix_fig12.png?nolink|}} You should see the xvid codec as an available option. If you dont then download the xvid codec. Click on the 'Configure' button opening this window:- {{::avifix_fig13.png?nolin|}} Change the profile level to 'Advanced@L5' or (MPEG4 APS@L5) and if the button below on the left is entitled 'Target Quantizer' click on it to change it to 'Bitrate'. Then enter in the box to the right the bitrate that was obtained earlier from the mediainfo details:- **Bit rate : 1693 Kbps** {{::avifix_fig14.png?nolink|}} If you click on the 'more' button top right a further window appears. There should be no checks in the boxes entitled GMC or Quarter Pixel(QPEL): {{::avifix_fig15.png?nolink|}} Moving on the the 'Aspect Ratio' tab ensure that it is on Square Pixels. It is the default and once you have checked this there's no need to in future. Click 'OK' a couple of times to get back to the first window: {{::avifix_fig16.png?nolink|}} Click on 'Save as Avi' and select your filename, as soon as you have done that a further window will open showing you the progress of your recode: {{::avifix_fig17.png?nolink|}} You may also get a second window opening showing you a nice graph etc. just minimize it. When its finished you should have a perfectly playable in sync properly indexed avi to enjoy on your NetworkMediaTank/Samsung, etc. Here are the Mediainfo specs of the newly encoded file, notice the absence of any warp points: General Complete name : E:\Last Nights TV\DeathRace.2008.avi Format : AVI Format/Info : Audio Video Interleave File size : 1.29 GiB Duration : 1h 40mn Overall bit rate : 1 829 Kbps Writing library : VirtualDub build 0/release Video Format : MPEG-4 Visual Format profile : Streaming Video@L1 Format settings, BVOP : Yes Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Default Codec ID : XVID Codec ID/Hint : XviD Duration : 1h 40mn Bit rate : 1 691 Kbps Width : 720 pixels Height : 304 pixels Display aspect ratio : 2.35 Frame rate : 25.000 fps Resolution : 24 bits Colorimetry : 4:2:0 Scan type : Progressive Bits/(Pixel*Frame) : 0.309 Stream size : 1.19 GiB (92%) Writing library : XviD 1.1.2 (UTC 2006-11-01) Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Codec ID : 55 Codec ID/Hint : MP3 Duration : 1h 40mn Bit rate mode : Constant Bit rate : 128 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Resolution : 16 bits Video delay : 3ms Stream size : 92.4 MiB (7%) Alignment : Split accross interleaves Interleave, duration : 40 ms (1.00 video frame) Interleave, preload duration : 500 ms Writing library : LAME3.90.3 == FAQ == Q: When I open the file I get this error message: 'Couldn't locate a compressor for DIV3 mpeg4' A: Install the 'Divx codec' and then recode using the guide above but select the 'divx codec' not the 'xvid codec' to recode. You still need to enter the bitrate