LinHES Forums
http://forum.linhes.org/

Script Help / Mythmusic bug?
http://forum.linhes.org/viewtopic.php?f=14&t=5600
Page 1 of 1

Author:  prosonik [ Sat Aug 06, 2005 4:33 pm ]
Post subject:  Script Help / Mythmusic bug?

Hi All,

I'm not sure what forum to dump this under.. but.. I've created a script that rips cbcradio2 every saturday (for cbcradio3). I used streamripper instead of mplayer b/c it handles things a little nicer (You can say "record for this amount of time then die").

That being said, when I try to play the ogg file it creates in mythmusic, it dies and says "DecorderOgg: Error while decoding stream, File Appears to be corrupted". However, when i play it using winamp, it works fine. Also the stream gets name -.ogg instead of the file name i specify..

Here is the script (I'm a bash scripting dummy.. sorry)

#!/bin/bash
cd /myth/music/streamrips/
TODAY=`(set \`date +%F\`; echo $1)`
streamripper http://oggtrial.nm.cbc.ca:80/cbcr2-toronto.ogg -a -l 30600 -D "%S-$TODAY"


Any ideas? Hints? I'd like to expand this script into a larger Streaming project.. (Sorta like mythstream)

prosonik

Author:  Human [ Thu Sep 08, 2005 3:21 pm ]
Post subject: 

I think this is the proper place to post: "Installing and configuration of addition software not included in KnoppMyth." So no worries :)

I wanted to thank you for asking this question - I didn't know about streamripper until just now :) I knew of :oops: Windows :oops: programs to do this, but no Linux ones.

I have half your problem solved. If you do this:

Code:
streamripper http://oggtrial.nm.cbc.ca:80/cbcr2-toronto.ogg -a -l 30600


you will get files named, e.g.
Code:
sr_program_2005_09_08_17_09_08.ogg

inside a directory named
Code:
CBC Radio Two Toronto


If you tell me what naming convention you want, I can help you fix the script to do that, but I'm really not sure what the -D parameter is for, since I found no reference to it in the streamripper man pages. Did you mean -d instead?

As for why MythMusic choked on it, I'm not sure. Mplayer did not choke on my test sample, but it did complain a bit:
Code:
Ogg : bad packet in stream 0
Maybe MythMusic has a stricter ogg implementation?

In any case, the docs on streamripper say it's for ripping mp3s from shoutcast-compatible streams. Since the stream you're ripping is ogg, maybe it's luck that it works at all? Is the stream shoutcase-compatible?

Author:  mjl [ Thu Sep 08, 2005 7:15 pm ]
Post subject: 

Hi,

I'm not very creative when it comes writing scripts but have been fairly successful with modifications (enhancements if you will). There was an article in the Linux Journal recently about capturing a stream. http://linuxjournal.com/article/8402 (with scripts) and with a few tweaks, works very well for a half dozen shows / stations that I have tested. I will also try your site as I don't know what is being fed where I go. It will also do RSS but since I have not been there I simply #'d them out for now.

ls /myth/music/Radio
prairie.2005-09-04.mp3 Which will show up in myth music as Garrison Keillor Parrie Home Companion

Only bad part is once a week I have to do a manual music scan until I can find the magic switch to do it automaticly.
Hope this is helpful.
Mike

Author:  mjl [ Fri Sep 09, 2005 8:51 pm ]
Post subject: 

Hi,

I wasn't succesful in getting a capture however it may be some silly switch that I don't understand. I use mplayer to do my other stream captures and mplayer handles the ogg very nicly. (very pretty music while typing replies)


$ mplayer http://oggtrial.nm.cbc.ca:80/cbcr2-toronto.ogg

Here's the results to read while enjoying the easy listening music :)

Playing http://oggtrial.nm.cbc.ca:80/cbcr2-toronto.ogg.
Resolving oggtrial.nm.cbc.ca for AF_INET6...
Couldn't resolve name for AF_INET6: oggtrial.nm.cbc.ca
Resolving oggtrial.nm.cbc.ca for AF_INET...
Connecting to server oggtrial.nm.cbc.ca[159.33.6.141]:80 ...
Cache size set to 320 KBytes
Connected to server: oggtrial.nm.cbc.ca
Cache fill: 15.00% (49152 bytes) Ogg file format detected.
==========================================================================
Opening audio decoder: [libvorbis] Ogg/Vorbis audio decoder
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 4000->176400 (32.0 kbit)
Selected audio codec: [vorbis] afm:libvorbis (OggVorbis Audio Decoder)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Video: no video
Starting playback...
Ogg : bad packet in stream 0 < don't know what it means but doesn't stop the music
A:272417.3 (75:40:17.3) 0.0% 33%

Maybe some one has some ideas or a little more expertise to help us along?
Mike

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/