Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

we have a collection of old home videos that were saved in AVI format a long time ago. I want to convert these files to a more modern format because the Totem Movie Player that comes with Ubuntu 10.4 seems to be the only program capable of playing them.

The files seem to be encoded with a MJPEG codec, and playing them in VLC or Windows Media Player plays only the sound but there is no video.

Avidemux was able to open the files, but the quality of the video is severely degraded: The video skips frames and is interlaced (it's not interlaced when playing it in Totem).

Neither ffmpeg nor mencoder seems to be able to read the video stream. mencoder reports that it is using ffmpeg's codec. Here's a section from its output:

==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[mjpeg @ 0x92a7260]mjpeg: using external huffman table
[mjpeg @ 0x92a7260]mjpeg: error using external huffman table, switching back to internal
Unsupported PixelFormat -1
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)

while running ffmpeg produces the following:

$ ffmpeg -i input.avi output.avi
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar  4 2010 12:35:30, gcc: 4.4.3
[avi @ 0x87952c0]non-interleaved AVI
Input #0, avi, from 'input.avi':
  Duration: 00:00:15.24, start: 0.000000, bitrate: 22447 kb/s
    Stream #0.0: Video: mjpeg, yuvj422p, 720x544, 25 tbr, 25 tbn, 25 tbc
    Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Output #0, avi, to 'output.avi':
    Stream #0.0: Video: mpeg4, yuv420p, 720x544, q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Stream #0.1: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=    0 fps=  0 q=0.0 Lsize=     143kB time=15.23 bitrate=  76.9kbits/s    
video:0kB audio:119kB global headers:0kB muxing overhead 20.101777%

So the problem is that output does not contain any video, as evidenced by the video:0kB at the end.

In all of the above cases the audio comes out fine.

So my question is: What can I do to convert these files to a more modern format with more modern codecs?

share|improve this question
    
your old videos won't work in vlc? how old are they? –  cipricus Apr 3 '12 at 18:53

2 Answers 2

up vote 3 down vote accepted

For easy transcoding arista Install arista can be used.

Like totem it uses gstreamer as backend and so should be able to read your files.

share|improve this answer
1  
Arista worked, but thank you most of all for pointing out GStreamer. A search on Google allowed me to convert these files with gst-launch, which is the solution I prefer since it allows me to write a script to convert all the files at once. –  iWerner Jan 13 '11 at 10:07

I'd recommend trying the other MJPEG codecs mplayer has. mplayer -vc help lists the whole lot. Some of them depend on Win32 DLL codecs, so you might need to consider the medibuntu packages.

share|improve this answer
    
+1: When it comes to supporting weird formats, there's little that mplayer isn't capable of. –  loevborg Jan 11 '11 at 14:29
    
Thank you for your answer, but I struggled a bit to find the correct command line options to make it work (which is strange, since gst-launch (which I used in the end)'s command line options are even worse) –  iWerner Jan 13 '11 at 10:09
    
@iWerner the two are arcane, but gst is indeed more tractable. Cheers. –  Chipaca Jan 13 '11 at 13:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.