Page 1 of 1

URL_address_storage

Posted: 11 Aug 2008 02:09
by jmm
Hi, i use vlc to record streaming radio, always from the same url: is there any way to store the url address for me not to have to type it in every time (in "file -> open peripheric capture -> file -> open [translated from French]), just like in any other player?
thank you

Re: URL_address_storage

Posted: 11 Aug 2008 17:57
by VLC_help
It might be easier to create .bat file for recording.

Re: URL_address_storage

Posted: 11 Aug 2008 20:35
by jmm
It might be easier to create .bat file for recording.
i dont know how to do that but i have another question: can vlc record to an mp3 file? or do you know a player (like real or winamp) that would?
thank you

Re: URL_address_storage

Posted: 12 Aug 2008 01:35
by Arite
Yes, VLC can stream to an MP3 file, although the header might need to be re-written for compatibility.

As for writing a simple *.bat file just create an empty text documents in e.g. Notepad and enter, as a basic example, the commandline you wish to run such as:

Code: Select all

@ECHO OFF CD "C:\Program Files\VideoLAN\VLC\" START vlc.exe INPUT SOUT_STRING
Where INPUT is the http:// location and SOUT_STRING is the complete generated string which is generated in the "Stream output" window when setup.

Then save the text document as a *.bat file - e.g. "VLC.bat" - and then just double click it to run.

For example a SOUT_STRING to a mp3 file called "C:\Temp\Test.mp3" could be:

Code: Select all

:sout=#transcode{acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=file,dst=C:\Temp\Test.mp3}}
Cheers, Arite.

Re: URL_address_storage

Posted: 12 Aug 2008 17:02
by jmm
thanks arite, but the bat below doesnt save to the specified file (however it plays the station ok) - must be a mistake somewhere...
@ECHO OFF
CD "C:\Program Files\VideoLAN\VLC\"
START vlc.exe http://74.222.8.253:8015 sout=#transcode{acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=file,dst=C:\Users\jmm\Desktop\Dump.mp3}}

Re: URL_address_storage

Posted: 12 Aug 2008 23:52
by Arite
You need something like:

Code: Select all

:sout=SOUT_STRING
Or e.g.:

Code: Select all

--sout "SOUT_STRING"
Just "sout=SOUT_STRING" will not work. i.e. add e.g. a colon such as:

Code: Select all

@ECHO OFF CD "C:\Program Files\VideoLAN\VLC\" START vlc.exe http://74.222.8.253:8015 :sout=#transcode{acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=file,dst=C:\Users\jmm\Desktop\Dump.mp3}}
Arite.

Re: URL_address_storage

Posted: 13 Aug 2008 01:05
by jmm
ye, i had tried that - doesnt work either - perhaps a vista pb - never mind...
thnx - jm

Re: URL_address_storage

Posted: 13 Aug 2008 02:51
by Arite
No, it is not a Vista problem - my mistake, I didn't specify the encapsulation method.

The following should stream to a LPCM WAVE file:

Code: Select all

@ECHO OFF CD "C:\Program Files\VideoLAN\VLC\" START vlc.exe http://74.222.8.253:8015 :sout=#transcode{acodec=s16l,ab=192,channels=2}:duplicate{dst=std{access=file,mux=wav,dst="C:\Temp\Test.wav"}}
Where "C:\Temp\Test.wav" is the destination. That should be playable in VLC.

The following will stream to a 192kbps CBR MP3 file:

Code: Select all

@ECHO OFF CD "C:\Program Files\VideoLAN\VLC\" START vlc.exe http://74.222.8.253:8015 :sout=#transcode{acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=file,mux=wav,dst="C:\Temp\Test.mp3"}}
Where "C:\Temp\Test.mp3" is the destination. That will not be playable as-is in VLC. It is, however, playable in e.g. foobar2000. Using the utility "Rebuild MP3 Stream" within foobar2000 will rewrite the header etc. and make it playable in VLC and other media players (e.g. Windows Media Player).

Alternatively the outputted MP3 file can be opened in e.g. mp3DirectCut where doing a "File >> Save all..." will also rebuild the stream losslessly (If you do not have either programs mp3DirectCut is probably the best choice since it is a small/lightweight program).

There are other tools which should alse be able to rebuild the mp3 stream, the above two are just a couple of examples.

Cheers, Arite.

Re: URL_address_storage

Posted: 13 Aug 2008 03:27
by jmm
yep, that works! too bad vlc doesnt record to regular mp3! - what i'm really trying to do is to record stream to listen offline on my mp3 player, which i load with windows media player - the file generated by vlc is, as you said, unreadable by wmp, but i was able to convert it to readable mp3 with audacity (which i already had installed) - so it takes 2 (rather long, as i sometimes record overnight) operations - it would be nice if there was a stream player that would record directly to wmp-readable mp3... would mp3directcut do that?

Re: URL_address_storage

Posted: 13 Aug 2008 03:45
by Arite
mp3DirectCut is an MP3 editor for cutting/spliting etc. without the need to transcode/recompress into MP3. It will not capture audio from an HTTP source however. Audacity decompresses the MP3 and then recompresses it, hence the resultant MP3 is slightly lower quality due to the lossy-to-lossy transcoding, and why it takes a long time to process. mp3DirectCut should not take very long at all for large MP3 files (foobar2000 being potentially quickly still).

As for a program which will output an MP3 file that do not need to be fixed - MPlayer/MEncoder may work, however if mp3DirectCut will rewrite the MP3 file quickly there would be little benefit to using VLC with e.g. mp3DirectCut.

Arite.

Re: URL_address_storage

Posted: 13 Aug 2008 04:32
by jmm
alright arite, i'll try to speed things up with foobar...
thnx 4 everything - jm