Bug in latest 2.95dev code (with fix)

Vangelis forthnet northmedia1 at the.forthnet.gr
Thu Feb 4 22:00:57 PST 2016


@dinkypumpkin:

 While I was toying with the latest commit 488ab9b
of the main 2.95dev get_iplayer perl script:

https://github.com/get-iplayer/get_iplayer/raw/488ab9b6a2b53481afd4c57aa8c40f3f60a0c4f2/get_iplayer

I discovered what seems to be a small bug...

 When issuing the following GiP command to fetch
one of the non-[Video Factory] HLS tvmodes
(BTW, many thanks for bringing them back):

perl 
get_iplayer-295dev-g488ab9b.pl --pid=b06q9zv3 --tvmode=hlsvhigh1 --raw --force

(hlsvhigh = 468p25FPS/AAC LC)

the script correctly assigns file extension ".ts"
to the partial download:
================================
INFO: hlsvhigh1 modes will be tried for version original
INFO: Trying hlsvhigh1 mode to record tv: Russell Howard's Good News: Series 
10
- 5. Episode 5
INFO: File name prefix = 
Russell_Howards_Good_News_Series_10_-_5._Episode_5_b06q
9zv3_original
INFO: Begin recording file: D:\Vangelis\iPlayer 
Recordings\Russell_Howards_Good_
News_Series_10_-_5._Episode_5_b06q9zv3_original.partial.ts
================================

When, OTOH, I issue the next command to fetch
one of the Video Factory HLS tvmodes:

perl 
get_iplayer-295dev-g488ab9b.pl --pid=b06q9zv3 --tvmode=hvfvhigh2 --raw --force

(hvfvhigh = 540p25FPS/HE-AACv1)

the script wrongly assigns file extension ".mp4"
to the partial download:
================================
INFO: hvfvhigh2 modes will be tried for version original
INFO: Trying hvfvhigh2 mode to record tv: Russell Howard's Good News: Series 
10
- 5. Episode 5
INFO: File name prefix = 
Russell_Howards_Good_News_Series_10_-_5._Episode_5_b06q
9zv3_original
INFO: Begin recording file: D:\Vangelis\iPlayer 
Recordings\Russell_Howards_Good_
News_Series_10_-_5._Episode_5_b06q9zv3_original.partial.mp4
================================

It should again be ".ts", as the product
of AppleHLS download...

The bug manifests itself only when "--raw" is used;
if not (the common scenario), the script correctly
downloads a "*.partial.mp4.ts" file:
================================
INFO: Begin recording file: D:\Vangelis\iPlayer 
Recordings\Russell_Howards_Good_
News_Series_10_-_5._Episode_5_b06q9zv3_original.partial.mp4.ts
================================

Not a coder, but probably the solution is at line 8781:
https://github.com/get-iplayer/get_iplayer/blob/488ab9b6a2b53481afd4c57aa8c40f3f60a0c4f2/get_iplayer#L8781

a simple change like that:

-  $prog->{ext} = 'ts' if $opt->{raw} && $mode =~ /^hls/;
+ $prog->{ext} = 'ts' if $opt->{raw} && $mode =~ /^(hls|hvf)/;

should do it...

Kind regards,
Vangelis.
 




More information about the get_iplayer mailing list