I haven't been able to download using PID for ages....
Hi I haven't been able to download using PID for ages but finally got some spare time to try solve it. I'm using Windows 7. I did an uninstall using iplayers own utility loaded the get_iplayer_setup_latest.exe (2.82) I have a shortcut on my desktop with the Target command line: C:\Program Files (x86)\get_iplayer\get_iplayer.cmd -o C:\Downloads\BBC\ --modes=flashaaclow,flashaacstd,rtspaaclow,rtspaacstd,wma --pid b012klt2 I've tried it without the --modes option, also with/out the --type=radio (is that required when using the specific --pid?). Hope you can help Cheers Dave F. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: I haven't been able to download using PID for ages....
On 26/09/2012 13:42, Jon Davies wrote: On 26 September 2012 12:59, Dave F. dave...@madasafish.com wrote: I haven't been able to download using PID for ages but finally got some spare time to try solve it. [...] C:\Program Files (x86)\get_iplayer\get_iplayer.cmd -o C:\Downloads\BBC\ --modes=flashaaclow,flashaacstd,rtspaaclow,rtspaacstd,wma --pid b012klt2 You should read the messages that get_iplayer gives you, specifically this one, which appears at the end after a long list of episodes: I'm not getting any messages. The output file has the warranty disclaimer followed by a list of 'matched' programs ends with INFO: 974 Matching Programmes INFO: Please run the command again using one of the above episode PIDs or to get all programmes add the --pid-recursive option I may have given you a wrong PID. I wasn't trying to record a whole series/brand, just one show. Try this one: C:\Program Files (x86)\get_iplayer\get_iplayer.cmd -o C:\Downloads\BBC\ --refresh --force -f --modes=best --pid b01mxvr5 --i -v Which should be this: http://www.bbc.co.uk/programmes/b01mxvr5 I've added a couple of other options to hopefully help but didn't. Cheers Dave F. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: I haven't been able to download using PID for ages....
-Original Message- From: Dave F. Sent: Wednesday, September 26, 2012 2:25 PM To: get_iplayer@lists.infradead.org Subject: Re: I haven't been able to download using PID for ages Try this one: C:\Program Files (x86)\get_iplayer\get_iplayer.cmd -o C:\Downloads\BBC\ --refresh --force -f --modes=best --pid b01mxvr5 --i -v Surely it's pid= not, pid , is it not? That's what I always use and it works fine. Eg, get_iplayer --mode=flashhigh --pid=b01n1tbz should download episode 2 of the BBC4 series Love and Marriage. Cheers, Chris ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: I haven't been able to download using PID for ages....
On 26/09/2012 14:25, Dave F. wrote: Try this one: C:\Program Files (x86)\get_iplayer\get_iplayer.cmd -o C:\Downloads\BBC\ --refresh --force -f --modes=best --pid b01mxvr5 --i -v From your example, the command line should look like: get_iplayer -o C:\Downloads\BBC\ --modes=best --type radio --pid b01mxvr5 ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: I haven't been able to download using PID for ages....
-Original Message- From: dinkypumpkin Sent: Wednesday, September 26, 2012 5:06 PM To: get_iplayer@lists.infradead.org Subject: Re: I haven't been able to download using PID for ages On 26/09/2012 16:31, Chris Marriott wrote: Surely it's pid= not, pid , is it not? That's what I always Either form is OK for get_iplayer Thanks for clarifying that - I didn't know! The form of the command that I posted is what I use daily, and it always works for me. Chris ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Automatic Downloading of Regular Episodes
If I am away for some weeks is there any way I can download regular programmes, e.g. the weekly Dad's Army on Radio 4 Extra? Each episode seems to get replaced as soon as a new one is aired; and previous episodes are then unobtainable until they come round again in say a few years. So if an episode is missed there is no going back. So its a matter of capturing each episode as and when they are available. Thanks - CJB. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
RE: I haven't been able to download using PID for ages....
Using --raw obviates the transcoding (yeurgh). use FLVExtract to rip out AAC from the FLVs and then use YAMB (or MP4Box if you're not lazy like me) to remux as an M4A and get it seekable. For videos, I just leave as FLV as MPC can parse and decode them fine natively; when I remuxed as MP4 I had frame drift for whatever reason... and at that point I was happy enough anyway with the H.264 FLVs. :-) Hi Surely for m4a/mp4 files get_iplayer uses FFmpeg to do just what you're doing with FLVExtract and YAMB? Not 'transcoding', only re-packaging. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
[PATCH 3/3] Web PVR: use dynamic discovery of configured ffmpeg
The location of ffmpeg may be changed during update by the Windows installer and thus should not be hard-coded in get_iplayer.cgi.cmd. This change enables web pvr to query get_iplayer for configured ffmpeg if it is not specified on get_iplayer.cgi command line. This is probably only relevant on Windows, where ffmpeg will not generally be in PATH. --- get_iplayer.cgi | 13 - windows/get_iplayer/get_iplayer.cgi.cmd |2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/get_iplayer.cgi b/get_iplayer.cgi index 62da240..d7f9103 100755 --- a/get_iplayer.cgi +++ b/get_iplayer.cgi @@ -88,7 +88,6 @@ EOF # Some defaults my $default_modes = 'flashaachigh,flashaacstd,flash,realaudio,flashaaclow'; -$opt_cmdline-{ffmpeg} = 'ffmpeg' if ! $opt_cmdline-{ffmpeg}; $opt_cmdline-{listen} = '0.0.0.0' if ! $opt_cmdline-{listen}; # Search for get_iplayer if ( ! $opt_cmdline-{getiplayer} ) { @@ -100,6 +99,18 @@ if ( ( ! $opt_cmdline-{getiplayer} ) || ! -f $opt_cmdline-{getiplayer} ) { print ERROR: Cannot find get_iplayer, please specify its location using the --getiplayer option.\n; exit 2; } +if ( ! $opt_cmdline-{ffmpeg} ) { + chomp(my @ffmpegs = map { s/^\s*ffmpeg\s*=\s*// ? $_ : () } + get_cmd_output( + $opt_cmdline-{getiplayer}, + '--nopurge', + '--nocopyright', + '--show-options' + ) + ); + $opt_cmdline-{ffmpeg} = pop @ffmpegs; +} +$opt_cmdline-{ffmpeg} = 'ffmpeg' if ! $opt_cmdline-{ffmpeg}; # Path to get_iplayer (+ set HOME env var cos apache seems to not set it) my $home = $ENV{HOME}; diff --git a/windows/get_iplayer/get_iplayer.cgi.cmd b/windows/get_iplayer/get_iplayer.cgi.cmd index 5ebbeb3..613c368 100644 --- a/windows/get_iplayer/get_iplayer.cgi.cmd +++ b/windows/get_iplayer/get_iplayer.cgi.cmd @@ -1,2 +1,2 @@ @echo off -perl.exe get_iplayer.cgi --port 1935 --listen=127.0.0.1 --ffmpeg .\ffmpeg\bin\ffmpeg.exe --getiplayer .\get_iplayer.cmd +perl.exe get_iplayer.cgi --port 1935 --listen=127.0.0.1 --getiplayer .\get_iplayer.cmd -- 1.7.10.2 (Apple Git-33) ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
[PATCH 2/3] Web PVR: updated streaming and transcoding parameters
1. Fixed some typos 2. Removed hard-coded dependency on libfaac. Windows ffmpeg is not built with libfaac, so FLV transcoding fails. Recent versions of have internal AAC codec. 3. Set M4A transcoding to FLV by default (as with MP4). This only seems necessary for Windows server but should work as default. --- get_iplayer.cgi | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/get_iplayer.cgi b/get_iplayer.cgi index 60741d6..62da240 100755 --- a/get_iplayer.cgi +++ b/get_iplayer.cgi @@ -587,7 +587,7 @@ sub run_cgi { # cannot stream mp4/avi so transcode to flv # Add types here which you want re-muxed into flv #if ( $src_ext =~ m{^(mp4|avi|mov|mp3|aac)$} ! $ext ) { - } elsif ( $src_ext =~ m{^(mp4|avi|mov)$} ! $ext ) { + } elsif ( $src_ext =~ m{^(mp4|m4a|aac|avi|mov)$} ! $ext ) { $ext = 'flv'; # Else Default to no transcoding @@ -813,7 +813,7 @@ sub stream_prog { # Default modes to try $modes = $default_modes if ! $modes; - print $se INFO: Start Streaming $pid to browser using modes '$modes', output ext '$ext', audio bitrate '$abitrate', video size '$vsize', video fram rate '$vfr'\n; + print $se INFO: Start Streaming $pid to browser using modes '$modes', output ext '$ext', audio bitrate '$abitrate', video size '$vsize', video frame rate '$vfr'\n; my @cmd = ( $opt_cmdline-{getiplayer}, @@ -866,7 +866,7 @@ sub stream_prog { sub stream_file { my ( $filename, $mimetype, $src_ext, $ext, $notranscode, $abitrate, $vsize, $vfr ) = ( @_ ); - print $se INFO: Start Direct Streaming $filename to browser using mimetype '$mimetype', output ext '$ext', audio bitrate '$abitrate', video size '$vsize', video fram rate '$vfr'\n; + print $se INFO: Start Direct Streaming $filename to browser using mimetype '$mimetype', output ext '$ext', audio bitrate '$abitrate', video size '$vsize', video frame rate '$vfr'\n; # If transcoding required (i.e. output ext != source ext) - OR, if one of the transcoing options is set if ( ( ! $notranscode ) ( lc( $ext ) ne lc( $src_ext ) || $abitrate || $vsize || $vfr ) ) { @@ -916,7 +916,7 @@ sub build_ffmpeg_args { if ( lc( $ext ) =~ m{^(flv|aac|m4a)$} ) { # Tweak: ffmpeg cannot understand aac or m4a as audio output formats - force flash audio $ext = 'flv' if lc( $ext ) =~ m{^(aac|m4a)$} $mimetype =~ m{^audio}; - push @cmd_aopts, ( '-acodec', 'libfaac', '-ab', ${abitrate}k ); + push @cmd_aopts, ( '-ar', '44100', '-ab', ${abitrate}k ); # else just copy the codec? } else { push @cmd_aopts, ( '-ab', ${abitrate}k ); @@ -924,7 +924,7 @@ sub build_ffmpeg_args { } else { if ( lc( $ext ) eq 'flv' ) { # 160k is the max for libfaac! - push @cmd_aopts, ( '-acodec', 'libfaac', '-ab', '160k' ); + push @cmd_aopts, ( '-ar', '44100', '-ab', '160k' ); } # cannot copy code if for example we have an aac stream output as WAV (e.g. squeezebox liveradio flashaac) #push @cmd_aopts, ( '-acodec', 'copy' ); -- 1.7.10.2 (Apple Git-33) ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Recent Web PVR patches
The patches following are now in Git: http://git.infradead.org/get_iplayer.git If you're not Git-literate: https://github.com/dinkypumpkin/get_iplayer/wiki/githead ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: Automatic Downloading of Regular Episodes
I'm sure Windows systems can be bludgeoned to have similar functionality... but may not keep on doing the job unattended for several years at a time (the low-power PC that does my getiplayer stuff is a headless EeePC that I don't touch more than a couple of times a year). Andy Windows doesn't need bludgeoning. Simply set up a Scheduled Task through Control Panel to run every night. Mine runs get_iplayer--pvr.bat at 00.01 as my ISP doesn't count usage between midnight and 8 a.m. I use the Web PVR manager with no problems to control what programmes are downloaded. Be careful of programmes with punctuation marks in the title (e.g. Who Do You Think You Are?) as they might need a bit of tampering with what the web pvr set up. The only occasional missed programme gets picked up the following night if it hasn't been listed on iPlayer when the job runs. I run using a Samsung Notebook using Windows 7 Starter, but transfer the files to an external 1TB HD that is normally attached to a different machine. I have to admit that I use Radio Downloader for most radio programmes as I had that before I found get_iplayer and some of its features are better than those offered by the latter (IMHO). HTH Don ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: I haven't been able to download using PID for ages....
Some interesting comments all, thanks. The reason I put --pid at the end of my string is partially to stop me from forgetting to change it ;-) And I only ever use get_iplayer to grab stuff for which I've already found the PID for, I always found its PVR features a little cumbersome for what I wanted. My explicit SWFVfy declaration was after the default player URL was removed by the BBC so rtmpdump was having problems with dropped frames and corrupt downloads, particularly on the HD content. I was under the impression get_iplayer still transcoded to MP3? I'm using 2.79 on Windows; I remember a lot of discussion a while back about the quality of the downloads and people asking how to stop it from transcoding. I left it as-is because I remember a few things being broken in updates pushed out - but if newer versions have those bugs squished and have a newer build of ffmpeg rolled in, I'll certainly give that a try. I'm a sucker for metadata. Undoubtedly YAMB is a bit long in the tooth now, I've only just got used to some of its UI quirks ;-) On 26/09/2012 19:26, dinkypumpkin wrote: On 26/09/2012 18:19, Christopher Woods (CM) wrote: Some clarification for new users - get_iplayer --raw --output G:\iplayer\raw\ --modes flashaachigh,flashaac,flashaacstd,flashaudio,flashaaclow --rtmptvopts --swfVfy http://www.bbc.co.uk/emp/revisions/18269_21576_10player.swf; --rtmpradioopts --swfVfy http://www.bbc.co.uk/emp/revisions/18269_21576_10player.swf; --force --get --type=liveradio --pid=pidhere The --swfvfy value is built into get_iplayer. There is no need to use it on a command line unless you know of a case where the built-in value no longer works. Also, you don't need --get if you specify --pid. Think of --pid as shortcut to download a specific programme when you already know its unique identifier. a liveradio category result for the pid you enter. My golden rule is to always have --pid or --url at the very end of the string. Specifying the 10player URL stopped frame drops in videos when rtmpdump couldn't swfvfy properly. There is no need to put --url or --pid at the end of your command line. get_iplayer's argument parsing is not sensitive to entry order. Using --raw obviates the transcoding (yeurgh). use FLVExtract to rip out AAC from the FLVs and then use YAMB (or MP4Box if you're not lazy like me) to remux as an M4A and get it seekable. For videos, I just leave as FLV as MPC can parse and decode them fine natively; when I remuxed as MP4 I had frame drift for whatever reason... and at that point I was happy enough anyway with the H.264 FLVs. :-) To echo SeƱor Guano: get_iplayer does not transcode. You only need to re-mux files yourself if you wish to use a different tool or different parameters. If you prefer to use --raw and stick with FLV files, that's fine. But if you prefer to re-mux files to MP4 format and get metadata tags, etc., the combination of get_iplayer and ffmpeg works pretty well. If you're using YAMB and consistently seeing drift in re-muxed video, get an up-to-date version of ffmpeg and let get_iplayer re-mux a few programmes and then compare the results. No guarantee it will be better, but ffmpeg (as well as MP4Box) has come along a bit since YAMB was released a few years ago. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: I haven't been able to download using PID for ages....
On 26/09/2012 23:02, Christopher Woods (CM) wrote: My explicit SWFVfy declaration was after the default player URL was removed by the BBC so rtmpdump was having problems with dropped frames and corrupt downloads, particularly on the HD content. The BBC has gone through several generations of player URLs. At one time they would delete or move old ones when a new ones came online, but that hasn't happened for quite a while. You do need the player URL for HD programmes in order to avoid continual dropping/reconnecting while downloading, but the built-in value in get_iplayer 2.80+ has been working fine for the last 18 months or so. I was under the impression get_iplayer still transcoded to MP3? I'm using 2.79 on Windows; I remember a lot of discussion a while back about MP3 transcoding was done for realaudio streams, but those are long dead, though the code remains in get_iplayer. get_iplayer 2.80+ has the --aactomp3 to give you option of transcoding national radio programmes from AAC audio to MP3 (with metadata) if you prefer that to M4A. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Start from offset
get_iplayer --mode=flashaaclow1 --flvstreamer=/usr/local/bin/rtmpdump --start $((120*60)) --get 10480 is what i attempted (start two hours in from start of the programme). I get INFO: Connected... ERROR: RTMP_ReadPacket, failed to read RTMP packet header INFO: Command exit code 1 (raw code = 256) WARNING: Failed to stream file /tmp/Breakfast_-_Friday_-_Sara-Mohr_Pietsch_b01mny7n_default.partial.aac.flv via RTMP INFO: skipping flashaaclow1 mode ERROR: Failed to record 'Breakfast - Friday - Sara-Mohr Pietsch (b01mny7n)' Is this an incorrect invocation or is it simply that the offset is unsupported? CJ ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: Start from offset
On 26/09/2012 23:45, Charles Johnson wrote: get_iplayer --mode=flashaaclow1 --flvstreamer=/usr/local/bin/rtmpdump --start $((120*60)) --get 10480 is what i attempted (start two hours in from start of the programme). I get INFO: Connected... ERROR: RTMP_ReadPacket, failed to read RTMP packet header INFO: Command exit code 1 (raw code = 256) WARNING: Failed to stream file /tmp/Breakfast_-_Friday_-_Sara-Mohr_Pietsch_b01mny7n_default.partial.aac.flv via RTMP INFO: skipping flashaaclow1 mode ERROR: Failed to record 'Breakfast - Friday - Sara-Mohr Pietsch (b01mny7n)' Is this an incorrect invocation or is it simply that the offset is unsupported? Just what it says: rtmpdump couldn't read a some data, so stopped downloading. The connection was interrupted or there was an error at the server or any number of other things happened. Nothing to do with the --start offset, assuming you have an up-to-date version of rtmpdump. The error is unique to your system, network, etc. You can run with --verbose to see if there are any more clues in the rtmpdump output. But there is no one solution, and probably no solution per se. You just have to keep trying the download. Search the mailing list archive - this has come up many times before: http://www.mail-archive.com/search?l=get_iplayer%40lists.infradead.orgq=%22ERROR%3A+RTMP_ReadPacket%2C+failed+to+read+RTMP+packet+header%22 ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer