Record octoshape stream with VLC Player
To use VLC player to record an octoshape stream, first you need to figure out the HTTP location of the octoshape stream when it is played in your local computer. To find that out, play the octoshape stream with VLC player. You can check how to do that in Windows here. In Linux, one can do that according to the instruction here, with an additional simple config.
For example, when I use the stream rthk.ch2., the corresponding HTTP location is shown as the window title.
If you choose to record using VLC Player interface, then from the main menu, select "Media" -> "Convert/Save". Under the "Network" tab, enter the network URL in the only text field, and click on the "Convert/Save" button below.
In the subsequent window, fill in the destination file name. Click "Start" to start recording.
[Updated 2014/07/12] NOTE: The file has to be named with .mp4 as extenstion instead of .mp3 shown in the screenshot below. (i.e. /home/test/Desktop/rthk.mp3 should be changed to /home/test/Desktop/rthk.mp4)
You may choose to work with the command line instead.
The following is the general VLC player command line to record a media stream:
cvlc [HTTP_location] vlc://quit --stop-time=[stop_time_in_seconds] --sout file:[output_file_name]
The command line to record the above example stream to the file /home/test/Desktop/rthk.mp3 for 30 seconds and quit automatically is as follows.
cvlc http://127.0.0.1:6498/ms2/1306678103565/0MediaPlayer+0+/rthk.ch2/rthkch2 vlc://quit --stop-time=30 --sout file:/home/test/Desktop/rthk.mp4
For example, when I use the stream rthk.ch2., the corresponding HTTP location is shown as the window title.
If you choose to record using VLC Player interface, then from the main menu, select "Media" -> "Convert/Save". Under the "Network" tab, enter the network URL in the only text field, and click on the "Convert/Save" button below.
In the subsequent window, fill in the destination file name. Click "Start" to start recording.
[Updated 2014/07/12] NOTE: The file has to be named with .mp4 as extenstion instead of .mp3 shown in the screenshot below. (i.e. /home/test/Desktop/rthk.mp3 should be changed to /home/test/Desktop/rthk.mp4)
You may choose to work with the command line instead.
The following is the general VLC player command line to record a media stream:
cvlc [HTTP_location] vlc://quit --stop-time=[stop_time_in_seconds] --sout file:[output_file_name]
The command line to record the above example stream to the file /home/test/Desktop/rthk.mp3 for 30 seconds and quit automatically is as follows.
cvlc http://127.0.0.1:6498/ms2/1306678103565/0MediaPlayer+0+/rthk.ch2/rthkch2 vlc://quit --stop-time=30 --sout file:/home/test/Desktop/rthk.mp4
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteYou can also record using the octoshape client and an external player by configuring the setup.xml.
ReplyDeleteHere is a sample setup.xml:
<config EulaAccepted="true" EulaId="0000000.en" EulaMethod="installerwindow"
Language="en" PlayerExec="ffmpeg -i $url -c copy outputnew.ts" TempID="Something_00000000"/>
The EulaID and TempID given are just examples. Your EulaID will be different and is generated after installing the octoshape command line client. The TempID is generated dependent on the most recent stream, and is not necessary to add.
So just replace the text in setup.xml with:
<config EulaAccepted="true" EulaId="0000000.en" EulaMethod="installerwindow"
Language="en" PlayerExec="ffmpeg -i $url -c copy outputnew.ts"/>
and replace EulaId="0000000.en" with your original configuration. TempID is not important.
Hi Eddie, any updates on recording octoshape stream with VLC Player? I have been using your steps to schedule the recording but it is no longer working since Jan 2014. Thanks.
ReplyDeleteWorking on it. Thanks.
DeleteI have just updated the blog entry. Now you need to save the output files with .mp4 as file extension rather than .mp3. Thanks for reporting your finding by the way!
DeleteThanks Eddie, it works by just changing MP3 to MP4!!
Delete