Home‎ > ‎Luc‎ > ‎Common Knowledge‎ > ‎

Valuable Software Information

Here are some things about software that took me a long time to figure out:

1. Re-encoding video with mencoder.
    The following line is the typical way to re-encode videos with mencoder, kind of annoying to find it each time in the man pages...

    C:\Documents and Settings\Luc\Desktop>mencoder.exe inputFile.avi -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o outputFile.avi

    Now this uses an mpeg4 codec for the output file and just copies the input audio to the output file. If you want to encode the output audio with AAC for example, then:

    C:\Documents and Settings\Luc\Desktop>mencoder.exe inputFile.avi -ovc lavc -lavcopts vcodec=mpeg4 -oac lavc -lavcopts acodec=faac -o outputFile.avi

    To see what different codecs are available, click here: http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html

    and then search "lavc (−lavcopts)". Scroll down slightly to see the acodec and vcodec options...

    Some other useful features for the output video are as follows:

 Flag             Purpose           What to search in man file to find documentation
 -of    Encode to the specified container format. Useful if you are trying to force a specific file type.
 Encode to the specified container format (default: AVI).
 -ofps     Manually set the frame rate for videos.
 Specify a frames per second (fps) value
 -vo null -vc null
 Different options for ommiting audio or video. Useful in the case that you want to put your own audio in.
 Do not play/encode sound.
2. Re-encoding using techniques from 1. and having it work in Windows Media Player
    Using some details from: http://ffmpeg.mplayerhq.hu/faq.html#SEC9,

    the best working video codecs for Windows Media Player are the "msmpeg4v2" and "wmv2", make sure to use an ".avi" extension though, or else WMP complains            slightly. I always use -oac mp3lame as the audio codec (MP3). The "msmpeg4" and "wmv1" work as well. The "mpeg4" codec does not work even if you have xvid            codec installed. The whole list of codecs play in mplayer (that's because mplayer plays ANYTHING.

3. Large SATA2 harddrives on SATA(1) hardware

    I bought a 1.5TB Hard Drive which uses SATA2. It is also gigantic, obviously. I was wondering if it would work on my 2005 HP Worktation xw4100, which only has            SATA(1). Anyway, long story short, it works fine. The 48-bit LBA here works perfectly, since I guess HP put some thought into it. It formatted perfectly and Windows        recognizes the entire drive. Anyway, at least I know that it works now, because some people online reportedly are having issues with getting these drives to work on     older hardware.

4. DataBinding and Combo Boxes

    View the link for full description regarding a problem I had a solution that was provided for me on the MSDN forums.
    http://social.msdn.microsoft.com/forums/en-US    /winformsdatacontrols/thread/dc697766-212e-4566-ba8a-c238a853d94c/

5. Setting the caption of a label in excel using VBA

    This article describes how to simply set the label of a worksheet in excel using VBA. I found this useful at some point in time.

6. Application deployment using ClickOnce in Visual Studio 2005 (2008 is out now, I'm wondering if there is something better)

    This makes it very easy to have the .NET application installed elsewhere, and was especially useful in 2005 when the .NET framework was not as prevalent as it is
    today. http://www.c-sharpcorner.com/UploadFile/arun777/108122005054109AM/1.aspx?ArticleID=c52ed11b-29d3-4b49-b59b-be17b53a6e7a

7. Windows Explorer crashing when browing folders containing .avi files

I basically tore my hair out with this one. When I would browse a folder with .avi files (only over the network in my case) explorer would crash with an error such as: "Application popup: explorer.exe - Application Error : The instruction at "0x77f580db" referenced memory at "0x00720065". The memory could not be written"." Very, very frustrating. Initially I did not know that it happened in the thumbnails view. It also happened in any view it just took more time than in the thumbnail view. I found the solution online to unregister the dll file which does the previewing. To do this run REGSVR32 /U SHMEDIA.DLL in the command prompt. A few references here:

    1) http://www.moviecodec.com/topics/3588p1.html
    2) http://www.annoyances.org/exec/forum/winxp/t1061425126