Cron job for starting/stopping recorder

worked just now. of course, that captures ALL sound including the mic over whatever is coming on other channels :wink: It’s a poor man’s chorus effect.

.ogg (not oga) also works.

EDIT: I’m on crack. I’ve got redirects in my commands which shouldn’t be there. What DID work was

parecord -d sink.primary_output.monitor -r thing.mp3

EDIT: which is not mp3

[defaultuser@VollaPhone ~]$ file thing.mp3
thing.mp3: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

Sorry about the noise. I’ll go find an encoder method (probably pipe to ffmpeg ).

Sorry about the confusion. This works, but requires installing ffmpeg:

parecord -d sink.primary_output.monitor -r --raw --passthrough | ffmpeg -f s16le -i - test.ogg

It just does raw passthrough of s16le to ffmpeg which is, in this case without options, just doing basic default encoding. When I have some time I’ll send on the correct 2 channel encoding options.

EDIT: input correctly specified with:

ffmpeg -f s16le -ac 2 -ar 48000 -i - test.ogg

ac: number of channels, ar: rate.

1 Like

I was wondering if you had any examples in mind? I’m looking into gstreamer (which i haven’t used in many years) since jolla supplies : gstreamer1.0-libav … any tips would be appreciated or just tell me RTFM :slight_smile:

EDIT: ah, wthell, I just did the reading:

Ok, this is a primary monitor output recording using gstreamer. You need to install the tools:

zypper install gstreamer1.0-tools
gst-launch-1.0 pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=blah.ogg

That works.

1 Like

Good you figured out, I couldn’t have helped really.

I just remembered there was a thread about hw encoding and such pipelines were mentioned.

Yeah, but you got me thinking about it! I did some gstreamer programming (c++) about 10 years ago. So I’ve forgotten everything :slight_smile: But we actually have a lot there. I can replace a bunch of ‘ffmpeg’ binary calls with gstreamer. It’s still ‘work’ but all the libav/ffmpeg stuff is available on SFOS.

The hack with gst-launch-1.0 is cool. though. You can do a LOT of pipeline work with it without programming. I might write a gui wrapper app :slight_smile: