Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I`ve already asked how to do it with ffmpeg but nobody replied. Maybe anybody know how to convert from mjpeg format? Do not suggest to use virtual dub to convert to avi as all it does is putting mjpeg inside avi container and I need to convert from mjpeg to some other format like mpeg or flv.

share|improve this question
    
What is the second format? It's gotten garbled somehow –  Dan Walker Aug 27 '09 at 3:58
    
ref to the other question: superuser.com/questions/29893/… –  nik Aug 27 '09 at 4:10
    
yes, and there`s no answer, that`s why I reposted and without asking to convert with ffmpeg only. –  Yaroslav Yakovlev Aug 27 '09 at 4:19
    
Can you please post a link to a sample file? Its hard to figure out ffmpeg options w/o a file to work with. –  derobert Aug 27 '09 at 5:06
    
link to file : onlinedisk.ru/file/205435 –  Yaroslav Yakovlev Aug 27 '09 at 6:34

1 Answer 1

up vote 1 down vote accepted

Your problem with that file is actually the audio sampling rate, 11024 Hz isn't supported by MP3. Easy enough to fix:

ffmpeg -i MVI_2130.avi -ar 11025 test.flv

Of course, there are a lot of quality options you may want to set, such as the video (-vb) and audio (-ab) bitrates.

The ffmpeg output actually told you this:

FFmpeg version SVN-r19468, Copyright (c) 2000-2009 Fabrice Bellard, et al.
⋮
Output #0, flv, to 'test.flv':
    Stream #0.0: Video: flv, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 15 tbc
    Stream #0.1: Audio: libmp3lame, 11024 Hz, 1 channels, s16, 64 kb/s
⋮
Error while opening encoder for output stream #0.1 - […]

Note how the error was with stream #0.1, which is the audio stream. It (unfortunately!) doesn't tell you that the sample rate is wrong; you just have to know what your output codec is capable of. And for mp3, that's 8000, 11025, 12000, 22050, 24000, 32000, 44100, and 48000 Hz according to Wikipedia.

share|improve this answer
    
Thanks, it really does video conversion now. But sound conversion failed and the result file is silent. Can it be fixed in some way? –  Yaroslav Yakovlev Aug 27 '09 at 7:24
    
Sound conversion worked just fine here... Did ffmpeg give any errors? –  derobert Aug 27 '09 at 13:39
    
Just copied from stream mapping: Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding Warning, using s16 intermediate sample format for resampling [libmp3lame @ 0x3df830]lame: output buffer too small (buffer index: 8359, free b ytes: 1433) Audio encoding failed –  Yaroslav Yakovlev Aug 30 '09 at 12:03
    
Weird, what version of ffmpeg are you using? –  derobert Sep 1 '09 at 5:29

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.