Re: modes=good gone?
Damn it this still produces a 700KB file ... >get_iplayer --pid m001kdwp --tv-quality web --subtitles --overwrite CJB On 28/03/2023, Chris Brady wrote: > Hmm - so I ended up with > >>get_iplayer --pid m001kxyz --tv-quality sd --subtitles --overwrite >> --tv-lower-bitrate > > and the file is 700KB > > But I don't understand the value 'web' for --tv-quality, and yet 'sd' > is not commnsurate with modes=good > > CJB > -- MSc. (O.R.); BSc. (Ind Maths); Dip. Ed. (F.E.); Cert Mgt (O.U.) Health & Safety Rep. - Unite (MSF/AMICUS) + Brit. Airways Freelance Investigative Journalist - re: Rogue Leasehold / Managing / Letting / Estate Agents ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: modes=good gone?
Hmm - so I ended up with >get_iplayer --pid m001kxyz --tv-quality sd --subtitles --overwrite >--tv-lower-bitrate and the file is 700KB But I don't understand the value 'web' for --tv-quality, and yet 'sd' is not commnsurate with modes=good CJB ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: OT yt-dlp and Python snag
On 28/03/2023 15:51, Jim web wrote: Sorry to hear about your wife, commiserations to you both. In article , MacFH - C E Macfarlane - News wrote: Might as well be sure, so what happens when you type: python --version If that comes up with 3.7 as desired, what do you get for: pip --help It gives me Python 2.7.17 However if I look in usr/lib/ I can see directories for Python 2.7, 3, 3.6, 3.7, and 3.8. Different versions of Java, Perl, and Python can be a right royal PITA - seemingly endless updates seem to require anything based on them that you are using needing programs to be rewritten and/or recompiled. If you have a genuine need for different versions as opposed to having arrived with multiple versions merely by happenstance, one possible workaround is to have some means of determining the default version for a given shell instance. For example, in Unbuntu 18, I get ... # which python /usr/bin/python # ls -al /usr/bin/python /usr/bin/python->python2.7 ... and ... # ls -al /usr/bin/python* ... is also quite instructive, but would be overkill to transcribe in its entirety here! This gives the possibility of a given shell instance pointing that link to whichever version of python that it needs, either directly or via an environment variable, as it launches ... # ln -s -f /usr/bin/python2.7 /usr/bin/python ... or ... # export PYTH_VER=2.7 # ln -s -f /usr/bin/python${PYTH_VER} /usr/bin/python ... however, although I have seen it done this way, I DON'T RECOMMEND IT, because if you have two shells running simultaneously requiring different versions of python [the rest of this sentence is left as an exercise to the programmer]! Better is to use a different alias within each shell ... # python --version Python 2.7.17 # alias python=/usr/bin/python3.6 # python --version Python 3.6.9 If this works, fine, but if, say, more than one change to the environment is needed, perhaps because the PATH or LIB variables need to include the directories for a different versions of Python or some such, then use an environment variable in all the settings so that between different shells you have to change only the value of that: # python --version Python 3.6.9 # export PYTH_VER=2.7 # alias python=/usr/bin/python${PYTH_VER} # python --version Python 2.7.17 HTHs ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: modes=good gone?
On 28/03/2023 15:56, Chris Brady wrote: Am trying to download tv using modes=good for low res. but adequate watchable quality However this is not now working and I am getting the default of HD with 2GB file sizes I only want files about 300KB in lo res What do I use now? Thank you. Mode settings have been replaced by quality settings, as follows: --quality ,,... TV and radio recording quality preference. See --tv-quality and --radio-quality for available values and defaults. Default: default for programme type. --radio-quality ,,... Radio recording quality preference (overrides --quality): high,std,med,low,default (Aliases: 320k,128k,96k,48k). Comma-delimited list in descending order of preference. Default: high,std,med,low. --tv-lower-bitrate, --tvlbr Prefer 25fps (or lower-bitrate 50fps) streams for TV programmes if available. --tv-quality ,,... TV recording quality preference (overrides --quality): fhd,hd,sd,web,mobile,default (Aliases: 1080p,720p,540p,396p,288p). Comma-delimited list in descending order of preference. Default: hd,sd,web,mobile For further help, use the --helplong switch. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: Fwd: Re: output format
On 28/03/2023 15:43, MacFH - C E Macfarlane - News wrote: Tch! Both Fred and then myself forgot to reply to all ... Forwarded Message Subject: Re: output format Date: Tue, 28 Mar 2023 01:13:58 +0100 From: MacFH - C E Macfarlane - News To: fred.d On 27/03/2023 18:54, fred.d wrote: On 27/03/2023 18:22, MacFH - C E Macfarlane - News wrote: On 27/03/2023 17:56, fred.d wrote: Recently started using gip to download sounds and audio files. Unfortunately I've got my prefs set to force output to mpeg .TS. Result is my downloaded audio is being converted to .ts files unless I override the command line with --raw when downloading audio :-( What command-line option are you using to set this? options config file: mpegts 1 Equivalent to ... --mpeg-ts Ensure raw audio and video files are re-muxed into MPEG-TS file regardless of stream format. Overrides --raw. Does anyone know a way to configure gip Video output format separately from Audio output format? I've had a quick look at all the options I have docs on but I can't see anything obvious. Difficult to say without knowing how you set the preference in the first place. I think you have two options. The following examples use "Bells On Sunday" (radio) and weather forecasts (TV) as being conveniently short programmes with correspondingly small download sizes to test with. Also, make sure you read the notes below before trying anything out: 1. Leave the option --mpeg-ts as is, but add an additional post-download option for audio files using --command-radio to convert the download to m4a (or any other audio format of your choice). The downside of this is that it may sometimes mean converting audio files twice, depending on the format of the original download. Example: --command-radio "ffmpeg -i '' -c:a copy '.m4a' && del '" --type radio --pid m001jkbm --raw -g Not sure how this happened when cutting & pasting but every example is missing a closing single quote just before the closing double quote, as follows: del ''" [<-here] So the above should have read: --command-radio "ffmpeg -i '' -c:a copy '.m4a' && del ''" --type radio --pid m001jkbm --raw -g 2. Remove that option altogether and use the --raw option instead, and give different --command-radio and --command-tv options to get the two different types into the respective end formats required. This should ensure that each type only gets converted once. Examples: --command-radio "ffmpeg -i '' -c:a copy '.m4a' && del '" --type radio --pid m001jkbm --raw -g --command-tv "ffmpeg -i '' -c:a copy -c:v copy '.mp4' & del '" --type tv --tv-quality sd --pid m001kjpf --raw -g As above, should have read: --command-radio "ffmpeg -i '' -c:a copy '.m4a' && del ''" --type radio --pid m001jkbm --raw -g --command-tv "ffmpeg -i '' -c:a copy -c:v copy '.mp4' & del ''" --type tv --tv-quality sd --pid m001kjpf --raw -g Sorry about that. IMPORTANT! Notes: Firstly, note that unless you want to keep the originally downloaded file as well as the converted file, you have to include a command to delete it, the double ampersand means that the del command only happens if the ffmpeg command didn't produce an error code when making the conversion. The command is for a Windows set up, you'd use rm instead of DEL on a Linux system. Secondly, the above FFMPEG commands are greatly simplified from the original commands that GiP would have fed to FFMPEG without the --mpeg-ts or --raw options being specified, which may be why the video one above corresponding to 2 below gave an avalanche of 'Invalid DTS' messages that don't occur when you let GiP do the job. As the weather video played back alright, I didn't bother to investigate that further. 1) ffmpeg -loglevel fatal -stats -y -i "\Bells On Sunday - Cathedral Church Of St Mary The Virgin With St Paul In Blackburn Lancashire.hls.ts" "-c:v" copy "-c:a" copy "-bsf:a" aac_adtstoasc -movflags faststart "\Bells On Sunday - Cathedral Church Of St Mary The Virgin With St Paul In Blackburn Lancashire.partial.m4a" 2) ffmpeg -loglevel fatal -stats -y -i "\Weather For The Week Ahead - 2023-03-27.hls.ts" "-c:v" copy "-c:a" copy "-bsf:a" aac_adtstoasc -movflags faststart "\Weather For The Week Ahead - 2023-03-27.partial.mp4" Thirdly, the available substitution parameters to use in the filenames are here, but not all will have values in all circumstances, for example was empty when I tried it https://github.com/get-iplayer/get_iplayer/wiki/subparams Lastly, I know that once upon another life in some obscure case I tried to use a post-download command before, but struggled with it for hours, and now can't remember whether actually I ever even got it to work! A significant part of the problem was that, as above, you need to put some parameters in quotes, for example filenames with spaces, but they tend to get stripped off by GetIPlayer when it feeds the quoted parameter
Re: OT yt-dlp and Python snag
In article , MacFH - C E Macfarlane - News wrote: > > Might as well be sure, so what happens when you type: python > > --version > > > > If that comes up with 3.7 as desired, what do you get for: pip > > --help It gives me Python 2.7.17 However if I look in usr/lib/ I can see directories for Python 2.7, 3, 3.6, 3.7, and 3.8. When I get a chance I'll go back to the beginning and re-install (or try to) the current version of yt-dlp. I usually cheat and make it local, but will try and install as normally described. Jim -- Electronics https://www.st-andrews.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html biog http://jcgl.orpheusweb.co.uk/history/ups_and_downs.html Audio Misc http://www.audiomisc.co.uk/index.html ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Fwd: Re: output format
Tch! Both Fred and then myself forgot to reply to all ... Forwarded Message Subject: Re: output format Date: Tue, 28 Mar 2023 01:13:58 +0100 From: MacFH - C E Macfarlane - News To: fred.d On 27/03/2023 18:54, fred.d wrote: On 27/03/2023 18:22, MacFH - C E Macfarlane - News wrote: On 27/03/2023 17:56, fred.d wrote: Recently started using gip to download sounds and audio files. Unfortunately I've got my prefs set to force output to mpeg .TS. Result is my downloaded audio is being converted to .ts files unless I override the command line with --raw when downloading audio :-( What command-line option are you using to set this? options config file: mpegts 1 Equivalent to ... --mpeg-ts Ensure raw audio and video files are re-muxed into MPEG-TS file regardless of stream format. Overrides --raw. Does anyone know a way to configure gip Video output format separately from Audio output format? I've had a quick look at all the options I have docs on but I can't see anything obvious. Difficult to say without knowing how you set the preference in the first place. I think you have two options. The following examples use "Bells On Sunday" (radio) and weather forecasts (TV) as being conveniently short programmes with correspondingly small download sizes to test with. Also, make sure you read the notes below before trying anything out: 1. Leave the option --mpeg-ts as is, but add an additional post-download option for audio files using --command-radio to convert the download to m4a (or any other audio format of your choice). The downside of this is that it may sometimes mean converting audio files twice, depending on the format of the original download. Example: --command-radio "ffmpeg -i '' -c:a copy '.m4a' && del '" --type radio --pid m001jkbm --raw -g 2. Remove that option altogether and use the --raw option instead, and give different --command-radio and --command-tv options to get the two different types into the respective end formats required. This should ensure that each type only gets converted once. Examples: --command-radio "ffmpeg -i '' -c:a copy '.m4a' && del '" --type radio --pid m001jkbm --raw -g --command-tv "ffmpeg -i '' -c:a copy -c:v copy '.mp4' & del '" --type tv --tv-quality sd --pid m001kjpf --raw -g IMPORTANT! Notes: Firstly, note that unless you want to keep the originally downloaded file as well as the converted file, you have to include a command to delete it, the double ampersand means that the del command only happens if the ffmpeg command didn't produce an error code when making the conversion. The command is for a Windows set up, you'd use rm instead of DEL on a Linux system. Secondly, the above FFMPEG commands are greatly simplified from the original commands that GiP would have fed to FFMPEG without the --mpeg-ts or --raw options being specified, which may be why the video one above corresponding to 2 below gave an avalanche of 'Invalid DTS' messages that don't occur when you let GiP do the job. As the weather video played back alright, I didn't bother to investigate that further. 1) ffmpeg -loglevel fatal -stats -y -i "\Bells On Sunday - Cathedral Church Of St Mary The Virgin With St Paul In Blackburn Lancashire.hls.ts" "-c:v" copy "-c:a" copy "-bsf:a" aac_adtstoasc -movflags faststart "\Bells On Sunday - Cathedral Church Of St Mary The Virgin With St Paul In Blackburn Lancashire.partial.m4a" 2) ffmpeg -loglevel fatal -stats -y -i "\Weather For The Week Ahead - 2023-03-27.hls.ts" "-c:v" copy "-c:a" copy "-bsf:a" aac_adtstoasc -movflags faststart "\Weather For The Week Ahead - 2023-03-27.partial.mp4" Thirdly, the available substitution parameters to use in the filenames are here, but not all will have values in all circumstances, for example was empty when I tried it https://github.com/get-iplayer/get_iplayer/wiki/subparams Lastly, I know that once upon another life in some obscure case I tried to use a post-download command before, but struggled with it for hours, and now can't remember whether actually I ever even got it to work! A significant part of the problem was that, as above, you need to put some parameters in quotes, for example filenames with spaces, but they tend to get stripped off by GetIPlayer when it feeds the quoted parameters to the external command. I remember a lot of faffing around with single quotes inside double, and vice versa, trying to get it to work, but above examples do work on my system! ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: OT yt-dlp and Python snag
In article , MacFH - C E Macfarlane - News wrote: > On 27/03/2023 10:44, Jim web wrote: > Glad to see you're still alive and kicking. I'd noticed your absence in > another place and was a little worried for you. Warning for the sensitive. Much of the following is even more OT. :-) I'm still alive... I think!... but these days I'm ultra-busy with non-maskable interrupts. My wife now needs 24/7 care due to some falls added to other problems. So when it comes to time, usenet has drawn one of the short straws in recent weeks. I also now have to be nagged by editors when they want an item *now* "You'r holding up the magazine!" [snip] I've also been doing an urgent task - finding a new supplier for decent FF teas, etc. Our old one ceased trading. Sad as their teas were great, and they are nice people. Now found two candidates and doing trial orders. Back on topic... I've got Python 3.7 installed. But as my distro is 'just out of span' Synaptic can't find related packages beyond the ones mentioned earlier. However I suddenly realised that I'd probably messed up in another way as well. Apologies to all if so. I keep having to do things in a rush, which amplifies my usual state of muddle. I'd first tried to use -U to update yt-dip on a machine where it had been OK, but now fails due - I suspect - to YT moving their deckchairs. The new version there also failed. *That* machine, though runs an even older distro, so I decided to try my newer one. But probably fouled up by simply copying across the updated yt-dlp and latterly installing the Python 3.7. Instead, when I can find time I'll now do the standard install approach for yt-dlp from the net. That may then sort out things I didn't do, or did wrong. But there is no hurry. As usual, I'm doing this for some test reasons similar to those reported on https://www.audiomisc.co.uk/YouTube/SpotTheDifference.html Say more about that if I ever get somewhere... :-) However, progress is sloower than it used to be as I can't get as much time for things like this as I was. BTW The VW on Brass CD is superb. :-) Jim -- Electronics https://www.st-andrews.ac.uk/~www_pa/Scots_Guide/intro/electron.htm Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html biog http://jcgl.orpheusweb.co.uk/history/ups_and_downs.html Audio Misc http://www.audiomisc.co.uk/index.html ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer