Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arecord creates a lot of useless files #178

Open
ukicar opened this issue Apr 18, 2015 · 24 comments
Open

arecord creates a lot of useless files #178

ukicar opened this issue Apr 18, 2015 · 24 comments
Assignees

Comments

@ukicar
Copy link

ukicar commented Apr 18, 2015

When trying to record sound arecord produces a huge amount of useless files, only the first one in the chain has sound. Other thing is that program don't exit when duration of recording is expired. I'm afraid that our arecord has some kind of bug... tested the same program under Rpi where it works well
here is test instruction
cd /tmp
arecord -f cd -d 5 tt.wav

instruction means : record in cd quality duration of 5 seconds

@ks156
Copy link
Contributor

ks156 commented Apr 18, 2015

What are the other files created ? Also .wav files ?

@ukicar
Copy link
Author

ukicar commented Apr 18, 2015

yes exactly a lot of wav files that can't be read. Wave files 44bits in size not usable except the first one... I haven't see this behavior when tested on raspberry pi for example...
I couldn't find similar case on google

@ks156
Copy link
Contributor

ks156 commented Apr 18, 2015

Is the behavior identical when the file is stored on flash, sd and usbFlash ?
And what's the name of the other files ?

@ukicar
Copy link
Author

ukicar commented Apr 18, 2015

same thing!
other files are named with numbers name-xxx.wav

@drasko
Copy link
Contributor

drasko commented Oct 2, 2015

@ukicar can you please take a look at new version or alternative solution. Please research and advise how to proceed with this.

@ks156
Copy link
Contributor

ks156 commented Oct 20, 2015

To be tested with the new openWRT version

@dasariarun
Copy link

How to over come the issue??any clue?

@drasko
Copy link
Contributor

drasko commented Oct 30, 2015

Is this re-appearing in the new version v1.2 as well?

@ks156
Copy link
Contributor

ks156 commented Nov 1, 2015

I don't have an USB soundcard. @ukicar, can you try with v1.2 ?

@bcpu
Copy link

bcpu commented Jan 7, 2016

I was struggling with this as well but this is these are the parameters that allowed me to record a 10 second wav file with no other files being created.

arecord -D plughw:1,0 -d 10 test.wav

@ThisNameNotUsed
Copy link

Well I have some other bug that seems to record to the .wav file okay but doesn't output sound with I play or use sox to "play."
The weird thing is too is that sox's "play" command shows an equalizer bar that goes up and down as if sound is coming out but it really isn't.

So I can arecord with a -f command that outputs thousands of blank .wav files or I can leave out the -f and get a .wav file that seems to have when played with with sox but doesn't actually output anything.

@nagimov
Copy link

nagimov commented Aug 12, 2016

The problem seems to appear on ARM architecture starting from 1.0.28 arecord version (arecord --version).
On Raspberry Pi 3 running Raspbian Jessie I had the exact same issue (creating bunch of files, not stopping after --duration seconds). Downgrading alsa-utils from 1.0.28-1 to 1.0.25-4 (rolling back to Wheezy's repo) fixed the problem.

@ctownj30
Copy link

navimov - any way you could share how you downgraded alsa-utils? the apt repository on jessie does not seem to list older versions and I'm a bit new to this.

@nagimov
Copy link

nagimov commented Aug 19, 2016

@dmarman
Copy link

dmarman commented Dec 1, 2016

I am not able to downgrade alsa-utils. I get this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '1.0.25-4' for 'alsa-utils' was not found

@nagimov
Copy link

nagimov commented Dec 5, 2016

@dmarman
platform? linux distro & version?
output of sudo aptitude versions alsa-utils ?

@dmarman
Copy link

dmarman commented Dec 5, 2016

ARM Raspberry Pi 3

Linux version 4.4.26-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) )

pi@raspberrypi:~ $ sudo aptitude versions alsa-utils
Package alsa-utils:
i   1.0.28-1                                      stable                    500

@nagimov
Copy link

nagimov commented Dec 6, 2016

@dmarman have you modified your /etc/apt/sources.list ?

@dmarman
Copy link

dmarman commented Dec 6, 2016

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free r$
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

Do I have to uncomment that?

@nagimov
Copy link

nagimov commented Dec 8, 2016

@dmarman

  • Add deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi line to the end of /etc/apt/sources.list file.

  • sudo apt-get update

  • sudo aptitude versions alsa-utils

@saurabhvyas
Copy link

I can confirm this is a bug , It happened with me on my pi 3

@slmnv5
Copy link

slmnv5 commented Jul 1, 2017

The same happens on my Pi 3 with Jessie. This command creates small files and does not stop in 5 seconds:
arecord -f s16_le -r 44100 -D hw:0 -d 5 test44.wav
however this similar command works just fine:
arecord -f s16_le -r 48000 -D hw:0 -d 5 test.wav

@dmarman
Copy link

dmarman commented Jul 1, 2017

This is a bug in alsa 1.0.28 on ARM. A solution is to upgrade your alsa-utils to 1.1.3 from source code. I followed the last answer here:

link

If I remember correctly I got a problem with the installation. I think I didn't have libasound2 installed in my raspberry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests