{"id":564,"date":"2016-01-30T10:16:07","date_gmt":"2016-01-30T16:16:07","guid":{"rendered":"http:\/\/jimlund.org\/blog\/?p=564"},"modified":"2016-01-30T10:18:48","modified_gmt":"2016-01-30T16:18:48","slug":"saving-streaming-audio-on-linux","status":"publish","type":"post","link":"https:\/\/jimlund.org\/blog\/?p=564","title":{"rendered":"Saving streaming audio on Linux"},"content":{"rendered":"<p>MONITOR=$(pactl list | egrep -A2 &#8216;^(\\*\\*\\* )?Source #&#8217; | grep &#8216;Name: .*\\.monitor$&#8217; | awk &#8216;{print $NF}&#8217; | tail -n1)<\/p>\n<p>goes to alsa_output.pci-0000_00_1b.0.analog-stereo.monitor on my system<\/p>\n<p>LAMEOPTIONS=&#8217; -s 44.1 &#8211;preset cbr 192&#8242;<br \/>\nFILENAME=foo.mp3<\/p>\n<p>Record currently playing audio:<br \/>\nparec -d $MONITOR | lame $LAMEOPTIONS -r $FILENAME  <\/p>\n<p>Split into separate 1 hr files with a 3 sec overlap:<br \/>\nffmpeg -ss 00:00:00 -t 01:00:03 -i foo.mp3 $1.01.mp3 -acodec copy<br \/>\nffmpeg -ss 01:00:00 -t 01:00:03 -i foo.mp3 $1.02.mp3 -acodec copy<\/p>\n<p>Commands from <a href=\"https:\/\/www.pantz.org\/software\/alsa\/recording_sound_from_your_web_browser_using_linux.html\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MONITOR=$(pactl list | egrep -A2 &#8216;^(\\*\\*\\* )?Source #&#8217; | grep &#8216;Name: .*\\.monitor$&#8217; | awk &#8216;{print $NF}&#8217; | tail -n1) goes to alsa_output.pci-0000_00_1b.0.analog-stereo.monitor on my system LAMEOPTIONS=&#8217; -s 44.1 &#8211;preset cbr 192&#8242; FILENAME=foo.mp3 Record currently playing audio: parec -d $MONITOR | lame $LAMEOPTIONS -r $FILENAME Split into separate 1 hr files with a 3 sec overlap: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-564","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=564"}],"version-history":[{"count":2,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/564\/revisions"}],"predecessor-version":[{"id":566,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/564\/revisions\/566"}],"wp:attachment":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}