0

I am using pulseaudio, but I don't really understand it.

I am recording the audio stream from a video playing in my browser. If I use module-combine-sink, I can record the monitor stream as well as hear it through my headphones. When the video ends, parec stops generating any output. This is great, since I have several multiple-hour video recordings and I don't want to hang around to wait for them to finish.

But I don't always want to send the stream through my headphones. If I use module-null-sink instead of module-combine-sink, I can just record -- but now, parec will keep generating output even after the stream stops playing. When I come back the next morning, I have an enormous output file (I'm piping it to an mp3 compressor, so it's not that big, but still.) The audio I want is at the beginning, and then hours of silence are at the end.

I could probably do it by sending the audio to my laptop speakers instead and muting them, I guess? But I guess I'd like to understand how this is working in the module-combine-sink so maybe I could come up with a more straightforward approach. And I might want to use my speakers for other things while recording, as well.

  • How exactly did you use module-combine-sink so the audio stops recording? The problem is that you are recording from the monitor output of a sink, which always produces output by design, even if no streams are connected to the sink. But somehow you worked around this in the combined sink, and I don't understand how... unless the "resampling on clock deviation" feature of the combined sink is somehow responsible. In which case you could probably use a combined sink and a null sink. – dirkt May 10 '18 at 19:45
  • I didn't do anything special. My command was pactl load-module module-combine-sink sink_name=tee-plantronics slaves=$output sink_properties=device.description="Record-and-Play-Plantronics". I don't know why it stopped producing output. I imagine the stream changed state when it hit the end, but if the combine sink doesn't care... I dunno. – sfink May 11 '18 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.