A Couple of Rookie Questions

*nix specific usage questions
jogl
New Cone
New Cone
Posts: 4
Joined: 03 Apr 2021 20:15

A Couple of Rookie Questions

Postby jogl » 03 Apr 2021 20:47

I have written a script to write an MP3 stream to a file:

Code: Select all

cvlc "http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_tor" --sout file/mp3:/home/jogl/audio/"$(date +%Y-%m-%d_CBC_%H:%M:%S).mp3" --run-time=3240 vlc://quit
It works fine, so far, outputs a file with name

Code: Select all

2021-04-03_CBC_15:06:01.mp3
but I don't understand why.

If I change it to:

Code: Select all

cvlc "http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_tor" --sout file/mp3:/home/jogl/audio/"$(%Y-%m-%d_CBC_%H:%M:%S).mp3" --run-time=3240 vlc://quit
I get a file called:

Code: Select all

.mp3
Why does it only work with the "date +" in the sout file name?


Q2:
How can I send the stream to the speakers while it is recording? Using the built in line out via PulseAudio Volume Control I believe. It is on a Debian 10 system with an XFCE desktop.

Thanks,
JP.

jogl
New Cone
New Cone
Posts: 4
Joined: 03 Apr 2021 20:15

Re: A Couple of Rookie Questions

Postby jogl » 03 Apr 2021 21:04

Well, cancel Q2, this, mostly stolen from another thread here, is working.

Code: Select all

cvlc "http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_tor" --sout "#duplicate{dst=display,dst=std{access=file,mux=mp3,dst=/home/jogl/audio/"$(date +%Y-%m-%d_%H%M%S).mp3"}}" --run-time=10 vlc://quit
If somebody could explain the command to me I would be grateful.

Thanks again,
JP.

jogl
New Cone
New Cone
Posts: 4
Joined: 03 Apr 2021 20:15

Re: A Couple of Rookie Questions

Postby jogl » 03 Apr 2021 21:09

Oops, one more thing, I am getting this "prefettch stream error", what does it mean?

Code: Select all

jogl@gateD10:~/audio$ cvlc "http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_tor" --sout "#duplicate{dst=display,dst=std{access=file,mux=mp3,dst=/home/jogl/audio/"$(date +%Y-%m-%d_%H%M%S).mp3"}}" --run-time=10 vlc://quit VLC media player 3.0.12 Vetinari (revision 3.0.12-1-0-gd147bb5e7e) [00005647bf8e9a00] dummy interface: using the dummy interface module... [00007f56ac004b40] dummy mux: Open [00007f56ac007fb0] prefetch stream error: unimplemented query (264) in control [00007f56ac0056d0] idummy demux: command `quit' jogl@gateD10:~/audio$
JP.

Rémi Denis-Courmont
Developer
Developer
Posts: 15271
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: A Couple of Rookie Questions

Postby Rémi Denis-Courmont » 04 Apr 2021 08:40

Your shell expands $(...) to nothing, that's all (and that's expected).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jogl
New Cone
New Cone
Posts: 4
Joined: 03 Apr 2021 20:15

Re: A Couple of Rookie Questions

Postby jogl » 27 Oct 2024 13:06

Reviving this old thread since the subject is basically the same.

I am using the command above:

Code: Select all

cvlc "http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_tor" --sout "#duplicate{dst=display,dst=std{access=file,mux=mp3,dst=/home/jogl/audio/"$(date +%Y-%m-%d_%H%M%S).mp3"}}" --run-time=10 vlc://quit
to record audio streams.

Is there a way to separate the songs and save them to separate files?

Thanks,
JP


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests