Audio resampler only works with 16 bits per sample, patch welcome
Trying to convert avi's from my camera to flv format, like so: joehill at node1:~$ ffmpeg -i dscf0014.avi -acodec libmp3lame -ar 22050 -f flv magda.flv FFmpeg version SVN-r15773, Copyright (c) 2000-2008 Fabrice Bellard, et al. configuration: --prefix=/usr --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libgsm --enable-postproc --enable-libxvid --enable-libfaac --enable-pthreads --enable-libvorbis --enable-libfaad --enable-gpl --enable-x11grab libavutil 49.12. 0 / 49.12. 0 libavcodec 52. 2. 0 / 52. 2. 0 libavformat 52.23. 1 / 52.23. 1 libavdevice 52. 1. 0 / 52. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 built on Nov 8 2008 23:11:08, gcc: 4.3.2 Input #0, avi, from 'dscf0014.avi': Duration: 00:02:04.00, start: 0.000000, bitrate: 9365 kb/s Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30.00 tb(r) Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, s16, 88 kb/s Output #0, flv, to 'magda.flv': Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 30.00 tb(c) Stream #0.1: Audio: libmp3lame, 22050 Hz, mono, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding Audio resampler only works with 16 bits per sample, patch welcome. I see that this was reported as a bug here: https://roundup.mplayerhq.hu/roundup/ffmpeg/issue582 but do not see if it has been fixed. Any ideas on how to get around this? Perhaps some intermediary conversion step? Many thanks for any tips. -- J
I use mencoder as an intermediate step: mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -of avi input.flv -o output.temp.avi ffmpeg -i output.temp.avi -vcodec flv -s 480x320 -acodec libmp3lame output.flv On Wed, Dec 24, 2008 at 9:36 PM, JoeHill <joehill at teksavvy.com> wrote:
Trying to convert avi's from my camera to flv format, like so:
joehill at node1:~$ ffmpeg -i dscf0014.avi -acodec libmp3lame -ar 22050 -f flv magda.flv FFmpeg version SVN-r15773, Copyright (c) 2000-2008 Fabrice Bellard, et al. configuration: --prefix=/usr --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libgsm --enable-postproc --enable-libxvid --enable-libfaac --enable-pthreads --enable-libvorbis --enable-libfaad --enable-gpl --enable-x11grab libavutil 49.12. 0 / 49.12. 0 libavcodec 52. 2. 0 / 52. 2. 0 libavformat 52.23. 1 / 52.23. 1 libavdevice 52. 1. 0 / 52. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 built on Nov 8 2008 23:11:08, gcc: 4.3.2 Input #0, avi, from 'dscf0014.avi': Duration: 00:02:04.00, start: 0.000000, bitrate: 9365 kb/s Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30.00 tb(r) Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, s16, 88 kb/s Output #0, flv, to 'magda.flv': Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 30.00 tb(c) Stream #0.1: Audio: libmp3lame, 22050 Hz, mono, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding Audio resampler only works with 16 bits per sample, patch welcome.
I see that this was reported as a bug here:
https://roundup.mplayerhq.hu/roundup/ffmpeg/issue582
but do not see if it has been fixed.
Any ideas on how to get around this? Perhaps some intermediary conversion step?
Many thanks for any tips.
-- J _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Mason Nugent wrote:
I use mencoder as an intermediate step: mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -of avi input.flv -o output.temp.avi ffmpeg -i output.temp.avi -vcodec flv -s 480x320 -acodec libmp3lame output.flv
That looks like you're going from an flv to an avi with mencoder. I am starting with an avi, and wanting to go to flv, so I was thinking something like: mencoder input.avi <options> output.avi then ffmpeg output.avi final.flv Am I misunderstanding? Thanks! -- J
No, you're right, I just mistyped when I replaced the vars from my script; it should have been input.avi. I also use mencoder for an intermediate step with qcelp. Good luck. On Wed, Dec 24, 2008 at 11:02 PM, JoeHill <joehill at teksavvy.com> wrote:
Mason Nugent wrote:
I use mencoder as an intermediate step: mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -of avi input.flv -o output.temp.avi ffmpeg -i output.temp.avi -vcodec flv -s 480x320 -acodec libmp3lame output.flv
That looks like you're going from an flv to an avi with mencoder. I am starting with an avi, and wanting to go to flv, so I was thinking something like:
mencoder input.avi <options> output.avi
then
ffmpeg output.avi final.flv
Am I misunderstanding?
Thanks!
-- J _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Mason Nugent wrote:
No, you're right, I just mistyped when I replaced the vars from my script; it should have been input.avi.
I also use mencoder for an intermediate step with qcelp. Good luck.
Ah, okay. I tried it with the example you gave, still complaining about the audio being a very low bitrate, perhaps because mencoder appears to be using...ffmpeg? joehill at node1:~$ mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -of avi dscf001 dscf0014.avi dscf0015.avi joehill at node1:~$ mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -of avi dscf0014.avi -o output.temp.avi MEncoder dev-SVN-r26940 (C) 2000-2008 MPlayer Team CPU: Intel(R) Pentium(R) 4 CPU 2.66GHz (Family: 15, Model: 4, Stepping: 1) CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with runtime CPU detection. success: format: 0 data: 0x0 - 0x8a6fb64 AVI file format detected. [aviheader] Video stream found, -vid 0 [aviheader] Audio stream found, -aid 1 VIDEO: [MJPG] 640x480 24bpp 30.000 fps 9270.8 kbps (1131.7 kbyte/s) [V] filefmt:3 fourcc:0x47504A4D size:640x480 fps:30.000 ftime:=0.0333 ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 11024 Hz, 1 ch, u8, 88.2 kbit/100.00% (ratio: 11024->11024) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ========================================================================== Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder) ========================================================================== Cannot set LAME options, check bitrate/samplerate, some very low bitrates (<32) need lower samplerates (i.e. -srate 8000). If everything else fails, try a preset. Exiting... -- J
JoeHill wrote:
Ah, okay. I tried it with the example you gave, still complaining about the audio being a very low bitrate, perhaps because mencoder appears to be using...ffmpeg?
It's not that mencoder uses ffmpeg, but both rely on the same libraries for encoding/decoding.
Cannot set LAME options, check bitrate/samplerate, some very low bitrates (<32) need lower samplerates (i.e. -srate 8000). If everything else fails, try a preset
Have you tried this suggestion? That is, setting the audio parameters? -- Art is anything you can get away with. -- Marshall McLuhan. Eduardo M KALINOWSKI eduardo at kalinowski.com.br http://move.to/hpkb
Yes, what he said, I had removed some of the extra information from my line, but I guess I should have left in the -ar setting for you. Here is my entire second line: ffmpeg -i input.temp.avi -vcodec flv -s 480x320 -acodec libmp3lame -t 00:00:30 -r 24 -y -ac 1 -ar 22050 output.flv You probably don't need to resize the video or switch to mono or limit your duration or convert to 24fps or auto-overwrite (which doesn't work for me anyway), so maybe just try adding in the -ar 22050 command. On Thu, Dec 25, 2008 at 10:48 AM, Eduardo M KALINOWSKI < eduardo at kalinowski.com.br> wrote:
Ah, okay. I tried it with the example you gave, still complaining about
JoeHill wrote: the
audio being a very low bitrate, perhaps because mencoder appears to be using...ffmpeg?
It's not that mencoder uses ffmpeg, but both rely on the same libraries for encoding/decoding.
Cannot set LAME options, check bitrate/samplerate, some very low bitrates (<32) need lower samplerates (i.e. -srate 8000). If everything else fails, try a preset
Have you tried this suggestion? That is, setting the audio parameters?
-- Art is anything you can get away with. -- Marshall McLuhan.
Eduardo M KALINOWSKI eduardo at kalinowski.com.br http://move.to/hpkb
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Mason Nugent wrote:
Yes, what he said, I had removed some of the extra information from my line, but I guess I should have left in the -ar setting for you.
Here is my entire second line: ffmpeg -i input.temp.avi -vcodec flv -s 480x320 -acodec libmp3lame -t 00:00:30 -r 24 -y -ac 1 -ar 22050 output.flv
You probably don't need to resize the video or switch to mono or limit your duration or convert to 24fps or auto-overwrite (which doesn't work for me anyway), so maybe just try adding in the -ar 22050 command.
I already had that parameter in my original run of ffmpeg, it won't work without it for flv output. Is there some other audio codec that could be used for flv? -- J
Eduardo M KALINOWSKI wrote:
JoeHill wrote:
Ah, okay. I tried it with the example you gave, still complaining about the audio being a very low bitrate, perhaps because mencoder appears to be using...ffmpeg?
It's not that mencoder uses ffmpeg, but both rely on the same libraries for encoding/decoding.
Ah, okay.
Cannot set LAME options, check bitrate/samplerate, some very low bitrates (<32) need lower samplerates (i.e. -srate 8000). If everything else fails, try a preset
Have you tried this suggestion? That is, setting the audio parameters?
Yes, I tried setting -srate 8000, and 4000 just for kicks, same error. I also tried an svn up to the latest revision of ffmpeg, same deal. D'oh! -- J
participants (3)
-
colevlly@pacbell.net -
eduardo@kalinowski.com.br -
joehill@teksavvy.com