Archive for the 'media' Category

Delete jpg and raw files simultaneously on Windows

This post is for Windows. A solution for Ubuntu could be Geeqie. [1]

I use my camera with the mode to save jpeg+raw. If I want to get skim through the pictures I always had twice the work (show jpg, skip raw)  and sorting out (delete jpg and delete raw). IrfanView at least allows to skip the raw image with the keyboard shortcut <Ctrl>+2. [2] Although the deletion process stays burdensome.

A much easier way on Windows for viewing JPG and then deleting JPG+RAW files simultaneously is to use XnView. After installing do the following:

  1. Open the XnView-config file: %appdata%\XnView\xnview.ini (in my case C:\Users\alex\AppData\Roaming\XnView\xnview.ini).
  2. In the section [File] add a new line at the end: Companion_00=jpg:cr2
    This links the .cr2 (raw-File) to the .jpg. So if you delete the jpg it automatically deletes the .cr2. Replace the cr2 with the extension of your raw-file (so eg nef for Nikon) and save the file.
    If you want the effect also in the other direction you have to create another newline:  Companion_01=cr2:jpg. For now you can just leave this, as we will hide the raw files in the next steps.
  3. Start XnView and open the options (Menu: Tools > Options or via <F12>) and see also screenshots below.
    1. In General open the tab File Operations tick the checkbox “For Copy/Move/Delete use companion file (.xmp/.thm/.jpg)
    2. In Browser > File List write the file extension you want to hide (the raw file: in my case cr2) in the last text input and click the OK button.

That is it. Now it should be easier to sort your pictures, as only the jpg-pictures are shown and if you delete it, the raw file automatically gets also deleted.


xnview-configfile xnview-general xnview-filelist


HowTo convert ogg to avi with mencoder

If I screencast something, than most of the time I do it with recordMyDesktop which produces .ogg-Videos. If you need to convert it so you can show it to your friend or upload it to a video hosting page like youtube or so you have to convert it into another format. I chose avi as format.

Simply fire up this command to convert your file:

mencoder out.ogg -o out.avi -oac mp3lame -ovc lavc

  • out.ogg is the .ogg-file you want to convert
  • out.avi is the .avi-file you want to create
  • mp3lame is the used audio-codec (here mp3)
  • lavc is the used video-codec (here libavcodec)

For more information you can look at the MPlayer manual page.