edgecase
Now that West-African war-drum had been made to signal across estuaries and deltas. Number Five was forbidden to wake the engine within earshot of the school. But a deep devastating drone filled the passages as M'Turk and Beetle scientifically rubbed its top. Anon it changed to the blare of trumpets - of savage pursuing trumpets. Then, as M'Turk slapped one side, smooth with the blood of ancient sacrifice, the roar broke into short coughing howls such as the wounded gorilla throws in his native forest. These were followed by the wrath of King - three steps at a time, up the staircase, with a dry whirr of the gown. Aladdin and company, listening, squeaked with excitement as the door crashed open. King stumbled into the darkness, and cursed those performers by the gods of Balliol and quiet repose.

~ from Stalky & Co.: The Slaves of the Lamp Part I
Author: StJohn Piano
Published: 2020-08-09
Datafeed Article 163
This article has been digitally signed by Edgecase Datafeed.
347 words - 115 lines - 3 pages




Recently, I found an ambience track that I quite like, which has helped me several times to sink into the undistracted trance-like state in which the best programming occurs.

Details:
- Title: "Rainy Night Coffee Shop Ambience with Relaxing Jazz Music and Rain Sounds - 8 Hours"
- Link: www.youtube.com/watch?v=c0_ejQQcrwI
- Channel: Calmed By Nature
- Date: May 3, 2020

I decided that I'd like to have my own copy. You never know when something will just disappear from the internet.

Also, I didn't want the entire 8-hour track. 1 hour on a loop is fine, and takes up less space.



Here's the approach I used:


0) Machine details.

- Windows 10
- Windows Subsystem for Linux (WSL): Ubuntu 16.04

I'm using the WSL Ubuntu terminal.

I already have the
youtube-dl
and
ffmpeg
tools installed.


1) Check the available formats on Youtube.

youtube-dl https://www.youtube.com/watch?v=c0_ejQQcrwI -F



2) Choose a format number. Download the video.

I chose format number 18 (mp4).

youtube-dl https://www.youtube.com/watch?v=c0_ejQQcrwI -f 18


The downloaded file was named "Rainy Night Coffee Shop Ambience with Relaxing Jazz Music and Rain Sounds - 8 Hours-c0_ejQQcrwI.mp4".

I renamed it to "ambience.mp4". It's 1.3 GB.


3) Extract the audio into its own file.

ffmpeg -i ambience.mp4 ambience.mp3


The audio file is 443 MB.


4) Split the audio file into hour-long segments. The last segment will contain any left-over portion of the track.

ffmpeg -i ambience.mp3 -f segment -segment_time 3600 -c copy out%03d.mp3


Source: unix.stackexchange.com/a/283547

Note: The
-segment_time
value is in seconds.


5) Keep the first segment. Delete the others. Also delete the original ambience.mp4 and ambience.mp3 files.

The first segment ends on a jazz resolution and some rain noise, which means it will loop without causing a distraction. If it had ended on a jarring note, I would have looked for a good ending point and used an audio editor (e.g. Audacity) to edit the file to end at that point.

I can use the VLC media player to play it on a loop.

The final file is named "out000.mp3". It's 55 MB.

Rename it to:
ambience_rainy_night_coffee_shop_with_jazz.mp3