Re: [ubuntu-uk] BBC Click includes Ubuntu: Mark II

2007-06-12 Thread Adam Funk
On 2007-06-12, Jim Kissel wrote:

> In my case firefox has a player installed for wmv files and starts to
> play this stream in the browser.  All I see is the tail end of a bbc
> weather forcast.  Just the bbc weather logo and about 5 seconds of
> sound.  Then nothing.
>
> wget doesn't get much.
>
> Can anyone up the ante with a better URL or an alternate method to
> view/download Click?  (ubuntu 7.04 FF)

Below is my ~/bin/record-real-media script for recording realplayer
audio streams.  I haven't tried video, but this might give you some
helpful ideas.  (It gives mplayer the -noconsolecontrols and
-really-quiet options because I usually use it in an at job.)


~~
#!/usr/bin/perl -w
##
use strict ;
use Getopt::Std ;
use LWP::UserAgent ;

my ( %option ) ;

getopts("pvhna", \%option) ;

if ($option{h}) {
exec("perldoc " . $0) ;  # exec terminates this script
}

else {
while (@ARGV) {
my $url = shift(@ARGV);

my $mplayer = mplayer_command($url);
run_command($mplayer);

if ($option{a}) {
my $normalize = normalize_command($mplayer);
run_command($normalize);
}

my $lame = lame_command($mplayer);
run_command($lame);
}
}

##
# END MAIN
##

sub mplayer_command {
my $url = $_[0];
my $filename = time() ;
if ($url =~ /([^\/]+)$/) {
$filename = $1 ;
}
$filename .= ".wav" ;

my $command = "mplayer -noconsolecontrols -really-quiet -ao pcm:file=" . 
$filename ;

if ( ($option{p}) || ($url =~ /\.r[ap]m$/) )  {
$command .= " -playlist ";
}

$command .= " \'" . $url . "\'" ;
return $command ;
}


sub lame_command {
my $input = $_[0] ;
print ("lame <- $input\n") if ($option{v}) ;
my $command = "echo \'no wav found\'" ;
if ( $input =~ /=(\S+)(\.wav)/ ) {
my $wav_file = $1 . $2 ;
my $mp3_file = $1 . ".mp3" ;
$command = "lame --quiet $wav_file $mp3_file" ;
}
return $command ;
}


sub normalize_command {
my $input = $_[0] ;
print ("normalize <- $input\n") if ($option{v}) ;
my $command = "echo \'no wav found\'" ;
if ( $input =~ /=(\S+)(\.wav)/ ) {
my $wav_file = $1 . $2 ;
$command = "normalize-audio -a 20dB $wav_file" ;
}
return $command ;
}


sub run_command {
my $command = $_[0];
print("CMD: $command\n");
system($command) unless ($option{n});
}


##
=head1 Options

=over

=item -h

Print this help and quit.

=item -v

Increase verbosity.

=item -a

Normalize to -20dB.

=item -p

Force mplayer '-playlist' option (automatically used for *.ram and *.rpm files).

=item -n

Dry run.

=back

=cut


-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/


Re: [ubuntu-uk] BBC Click includes Ubuntu: Mark II

2007-06-12 Thread Jim Kissel


Alex Latchford wrote:
> Robert McWilliam wrote:
>> On Mon, 11 Jun 2007 08:43:31 +0100
>> alan c <[EMAIL PROTECTED]> wrote:
>>   
>>> which appears to be the url of the wmv file(s) but
>>> rtsp://wm-acl.bbc.co.uk/wms/news/n5ctrl/tvseq/od/bbc1/bb/wm/video/click_bb.wmv
>>> by itself does not launch in firefox, what should I now be doing?
>>> thanks
>>> 
>> I don't think firefox speaks RTSP (Real Time Streaming Protocol), so
>> you need to use an app that does. As per previous responses in this
>> thread mplayer is a good choice for this.
>>
>> 
>> Robert McWilliam [EMAIL PROTECTED]www.ormiret.com
>>
>> Long periods of drought are always followed by rain.
>>
>>   
> Just change the protocol to http.. so..
> 
> http://wm-acl.bbc.co.uk/wms/news/n5ctrl/tvseq/od/bbc1/bb/wm/video/click_bb.wmv
> 
> Will allow you to download it to your hard drive..

In my case firefox has a player installed for wmv files and starts to
play this stream in the browser.  All I see is the tail end of a bbc
weather forcast.  Just the bbc weather logo and about 5 seconds of
sound.  Then nothing.

wget doesn't get much.

Can anyone up the ante with a better URL or an alternate method to
view/download Click?  (ubuntu 7.04 FF)

---Mark II---
Stranger and stranger?

BBC News 24, a live stream works as does the audio channels/stories. 
None of the other video channels/stories work.

selective DRM?  sun spots?

> 
> Thanks.. Alex.
> 

-- 
Simple effective migration to Open Source based computing

Jim Kissel
Open Source Migrations Limited
w: http://www.osml.eu
e: [EMAIL PROTECTED]
p: +44(0) 8703 301044
m: +44(0) 7976 411 679

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/