Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-20 Thread christina zou
To follow-up on my problems, After a lot of experimenting, I've decided to use Sox for audio capture and encoding. The following line does PCM audio capture AND encoding to mp3 using <20% CPU, so it's much more efficient than Ffmpeg on my Pi Zero. rec --buffer 200 -c 1 -r 44100 -b 32

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-19 Thread christina zou
Hi Nicolas, > I suspect the difference might be related to the period time. FFmpeg uses the lowest possible period time to allow low-latency uses, but it makes for heavier CPU consumption. I actually ran a test where I ran Arecord using FFMPEG's period_size and buffer_size settings. Even when

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-19 Thread Nicolas George
Le nonidi 29 pluviôse, an CCXXV, christina zou a écrit : > Here is the result of your two commands: > 1. time ffmpeg -i temp_arecord.wav temp_ffmpeg.wav > real 0m3.154s > user 0m1.230s > 2. time ffmpeg -i temp_arecord.wav -c copy temp_ffmpeg2.wav > real 0m0.986s > user 0m0.510s (for a

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-19 Thread christina zou
Nicolas, You're right and I understand your point. Apologies that I have top-posted several times. I'll make sure to avoid it from now on. This community is my last hope, as I've been stuck on this issue for over a month. If I've been hasty about formatting in my frustration, it's my fault. I

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-19 Thread Nicolas George
Le nonidi 29 pluviôse, an CCXXV, Phil Rhodes a écrit : > Don't worry about it - it isn't very important, and Carl has no formal > authority to tell you what to do. Replying to the troll, for once. Carl Eugen has no formal authority on anybody on the list. But he, like anybody else, has the

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-19 Thread christina zou
Hi, You're right. The 3Mbps speed is as expected. However, this still doesn't explain why my FFmpeg command requires 95% of my device's CPU to record raw audio audio, when the equivalent Arecord command takes 5% of my CPU. Again, here are my two commands: arecord -v -r48000 -c2 -fS32_LE

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread christina zou
I also wanted to share my full debug-level log from FFMPEG when I try to record ALSA audio, below. I have a few questions: 1. Why is my ALSA duration a *negative* value? 2. My ALSA bitrate is shown as 3072 kbps. This seems high - I only have a Pi Zero. Is this a value I can manually set? $

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread christina zou
Hi Carl (and all), Well, I can't remove the -acodec pcm_s32le option. If I just run: ffmpeg -f alsa -i mic_sv temp.wav '[alsa @ 0x243b3f0] cannot set sample format 0x1 2 (Invalid argument) mic_sv: Input/output error' > Next step will be to copy the options used for arecord. I already made

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread christina zou
Hi Nicolas, Here is the result of your two commands: 1. time ffmpeg -i temp_arecord.wav temp_ffmpeg.wav Full output: http://pastebin.com/HU8qeggq real 0m3.154s user 0m1.230s sys 0m0.370s 2. time ffmpeg -i temp_arecord.wav -c copy temp_ffmpeg2.wav Full

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Carl Eugen Hoyos
2017-02-17 12:50 GMT+01:00 Erik Dobberkau : >> > I would also suggest using -acodec pcm_s16le (and maybe -ac 1 when using >> a >> > mono microphone) as well as -ar 48000 (or 44100) and checking the results >> > thereof. >> >> Please don't! >> Using -acodec pcm_s16le is

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Erik Dobberkau
> > I would also suggest using -acodec pcm_s16le (and maybe -ac 1 when using > a > > mono microphone) as well as -ar 48000 (or 44100) and checking the results > > thereof. > > Please don't! > Using -acodec pcm_s16le is not doing what you expect, just remove > all options. > > Carl Eugen > Oh,

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Phil Rhodes
> I'm really sorry about top-posting, but I have no idea what it means? Don't worry about it - it isn't very important, and Carl has no formal authority to tell you what to do. P ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Carl Eugen Hoyos
2017-02-17 12:19 GMT+01:00 christina zou : > Hi Carl, > > Thanks for the quick reply!! > > My mic natively records in 32bit LE format. I thought -acodec > pcm_s32le was merely supplying the input format? You are right and it seems to work here but since you are reporting

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread christina zou
Carl, thanks again for the help. I'm really sorry about top-posting, but I have no idea what it means? I'm replying to this email thread that I've started to ffmpeg-users from gmail. Please advise me how else I should continue replying to this thread? Thanks again. On Fri, Feb 17, 2017 at 3:26

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Carl Eugen Hoyos
2017-02-17 12:19 GMT+01:00 christina zou : > My mic natively records in 32bit LE format. I thought -acodec pcm_s32le was > merely supplying the input format? No, it overwrites the decoder to produce stuttery, unusable audio. Please do not top-post here, Carl Eugen

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread christina zou
Hi Carl, Thanks for the quick reply!! My mic natively records in 32bit LE format. I thought -acodec pcm_s32le was merely supplying the input format? On Fri, Feb 17, 2017 at 3:11 AM, Carl Eugen Hoyos wrote: > 2017-02-17 11:59 GMT+01:00 christina zou

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Carl Eugen Hoyos
2017-02-17 12:19 GMT+01:00 Erik Dobberkau : > 2017-02-17 12:11 GMT+01:00 Carl Eugen Hoyos : > >> 2017-02-17 11:59 GMT+01:00 christina zou : >> >> > 1. ffmpeg -f alsa -acodec pcm_s32le -i mic_sv temp.wav >> >> I don't understand

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Erik Dobberkau
2017-02-17 12:11 GMT+01:00 Carl Eugen Hoyos : > 2017-02-17 11:59 GMT+01:00 christina zou : > > > 1. ffmpeg -f alsa -acodec pcm_s32le -i mic_sv temp.wav > > I don't understand this command line: What is "-acodec pcm_s32le" > supposed to do (except

Re: [FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread Carl Eugen Hoyos
2017-02-17 11:59 GMT+01:00 christina zou : > 1. ffmpeg -f alsa -acodec pcm_s32le -i mic_sv temp.wav I don't understand this command line: What is "-acodec pcm_s32le" supposed to do (except forcing stuttery, unusable audio)? Carl Eugen

[FFmpeg-user] Bug in FFMPEG Alsa?

2017-02-17 Thread christina zou
Hello, I have two alsa commands: 1. ffmpeg -f alsa -acodec pcm_s32le -i mic_sv temp.wav 2. arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.wav Command 1 takes 95% CPU and produces stuttery, clicky unusable audio. Command 2 takes 5% CPU and produces perfect audio. I'm on a Pi Zero. I