The Battle Of Britain At 75

Vangelis forthnet northmedia1 at the.forthnet.gr
Thu Oct 1 20:28:22 PDT 2015


On Thu Oct 1 19:37:36 BST 2015, Kenny Routledge wrote: 

> Is there a way of checking if the HLS downloads 
> have retried midstream, RTMP gives a retry response, 
> then I would start a fresh download 
> as otherwise there will be glitch in the file.

Hello Kenny

 When GiP downloads TV through a hls tvmode, 
ffmpeg is actually being used for the fetch (no 
doubt you already know that); however, the console 
output ffmpeg produces while downloading TV is 
quite voluminous when compared to hls radiomodes 
or the output produced by rtmpdump in flashmodes...
So it's not easy to inspect the Command Prompt 
Window for stream interruptions post download...

One half-solution (if on windows) is to increase 
the Command Prompt window's (used for GiP CLI) 
"Screen Buffer Size -> Height" value to a big 
number (search google on how to do that); I 
have mine set to  900 (default is 300) - by doing 
that you can use the vertical scroll line upwards 
to "go back" quite a bit into the stream downloading 
and look out for error messages...

But a nicer solution would be to redirect the 
ffmpeg output from the CPW to a log file, 
which you can inspect post download by 
opening it up in a text editor (do not use notepad).
E.g., as a test I've issued the command: 

get_iplayer --pid=b007v15w --tvmode=hlshigh --raw --force 2> D:\HLS.log

(you can specify your path of choice for the log...).
I've set --raw just for this test, so as to exclude 
ffmpeg output from ts remuxing to mp4, thus 
reducing log size. 
 If latency is introduced during download, 
it will result in missed segments and ffmpeg will print warnings 
accordingly - my connection is pretty robust 
and I've not experienced (yet) completely broken hls 
downloads, but I'm sure if that was the case 
with you, you'd see it printed inside the log... 

You can find my test log at:
http://pastebin.com/LN9eyfcr

As you can see, no incidents during download - 
end .ts file is absolutely fine!

> With HLS, I'm downloading, renaming the downloaded file
> and then downloading a 2nd time. 
> If the two file sizes are identical 
> then I know the download is clean.

 Isn't this an unjustified waste of bandwidth?
And in the event the two file sizes are not the same, 
how can you tell if both files aren't truncated due to 
missing HLS segments during download?
The "bigger" file may also be "incomplete", 
just have fewer segments missing than its "smaller" 
counterpart; would you then 
attempt a third download?
And last time I checked, all the flashmodes 
were still working from within the UK; 
is there some other reason you've 
changed already to the HLS modes?

Regards, 
Vangelis.



More information about the get_iplayer mailing list