• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

[youtube-dl] Download files from youtube.com or other video platforms

What is the purpose of video only files?
This has the potential advantages of easier management and reduced space required on the server and also gives the client the ability to change audio choice without having to download any video again.
Re the space saving if the video and audio were pre-combined on the server then to give the same flexibility the server would need to have multiple versions of the same video where the only difference is the audio tracks.

For some examples see
https://medium.com/canal-tech/how-video-streaming-works-on-the-web-an-introduction-7919739f7e1
 
@af123 - is it feasible to compile a version of ffmpeg with openssl or will this just make it too bloated? Alternatively, is it possible to add such functionality to python?
 
Throwing in my two penn'orth, it doesn't seem to have been mentioned above that including the --restrict-filenames command to limit filenames to ASCII will make sure you don't get the "Cannot support this file format" message when playing them on the HDR.

(I'm not using youtube-dl on the HDR, I'm using it with Youtube-DLG to download to a shared drive on a Windows PC.)
 
Last edited:
Well I got it to work, not an easy feat for me, I used this command youtube https://www.bbc.co.uk/iplayer/episode/b07c6fjk/louis-theroux-a-different-brain#
When the video is played back on my box, the picture flickers - stutters. Is there anything I can do about it.
Here is the output of the CLI.
Code:
Menu version 1.23                                                                                                 
Enter system PIN: ****                                                                                             
                                                                                                                  
      /-------------------------\                                                                                 
      |  T E L N E T   M E N U  |                                                                                 
      \-------------------------/                                                                                 
                                                                                                                  
  [ Humax HDR-Fox T2 (humax) 1.03.12/3.13 ]                                                                       
                                                                                                                  
   maint - Restart into maintenance mode.                                                                         
    safe - Enable safe mode on next boot.                                                                         
     rma - Enable return-to-manufacturer (RMA) mode.                                                               
   reset - Reset custom firmware environment.                                                                     
 upgrade - Upgrade all installed packages.                                                                         
  passwd - Remove web interface password.                                                                         
  fixweb - Re-install web interface.                                                                               
    stat - Show current activity.                                                                                 
       x - Exit and close connection.                                                                             
  reboot - Reboot the Humax.                                                                                       
    diag - Run a diagnostic.                                                                                       
     cli - System command line (advanced users).                                                                   
                                                                                                                  
Please select option: cli                                                                                         
                                                                                                                  
-----------------------------------------------------------------------                                           
                                                                                                                  
Humax HDR-Fox T2 (humax) 1.03.12/3.13                                                                             
                                                                                                                  
To return to the menu, type: exit                                                                                 
                                                                                                                  
humax# youtube https://www.bbc.co.uk/iplayer/episode/b07c6fjk/louis-theroux-a-different-brain#                     
[bbc.co.uk] b07c6fjk: Downloading video page                                                                       
[bbc.co.uk] b07c6fjk: Downloading playlist JSON                                                                   
[bbc.co.uk] b07dbj0j: Downloading media selection XML                                                             
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading MPD manifest                                                                     
[bbc.co.uk] b07dbj0j: Downloading MPD manifest                                                                     
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading MPD manifest                                                                     
[bbc.co.uk] b07dbj0j: Downloading MPD manifest                                                                     
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[bbc.co.uk] b07dbj0j: Downloading m3u8 information                                                                 
[hlsnative] Downloading m3u8 manifest                                                                             
[hlsnative] Total fragments: 459                                                                                   
[download] Destination: /mnt/hd2/My Video/Louis Theroux, A Different Brain.mp4                                     
[download] 100% of 2.04GiB in 26:23
[ffmpeg] Fixing malformed AAC bitstream in "/mnt/hd2/My Video/Louis Theroux, A Different Brain.mp4"               
humax#
 
When the video is played back on my box, the picture flickers - stutters. Is there anything I can do about it.
I've never found a problem playing these downloads, although I do restrict the quality and you have defaulted to the HiDef download.

Whether you can do anything about it depends what's causing it. It could be that your HDD has errors/faults, and that might cause glitches but you should expect the same on other recordings (especially high-bandwidth HiDef recordings). If it's a faulty download the only thing you can do is try again (but try lower quality).
 
Turned out later that evening lip sync was out too. The next day all is good, so I don't know if the box was doing stuff at the same time and it was running slow.
 
I'm not sure if there is a time / file size limit on downloads, but I recently got an Error 403 half way throught a 14.23GiB download, I have a slow broadband connection and the 8GiB I managed to get before the 'Error' took about 5 hours and plays fine with no sound due to the incomplete download, details below :-

Code:
Humax2# youtube -F https://www.youtube.com/watch?v=RK1K2bCg4J8
[youtube] RK1K2bCg4J8: Downloading webpage
[youtube] RK1K2bCg4J8: Downloading video info webpage
[info] Available formats for RK1K2bCg4J8:
format code  extension  resolution note
249          webm       audio only DASH audio   62k , opus @ 50k, 47.88MiB
250          webm       audio only DASH audio   78k , opus @ 70k, 63.08MiB
171          webm       audio only DASH audio  134k , vorbis@128k, 111.77MiB
140          m4a        audio only DASH audio  135k , m4a_dash container, mp4a.40.2@128k, 118.22MiB
251          webm       audio only DASH audio  141k , opus @160k, 123.06MiB
160          mp4        256x144    144p  114k , avc1.4d400c, 30fps, video only, 63.36MiB
278          webm       256x144    144p  133k , webm container, vp9, 30fps, video only, 85.41MiB
133          mp4        426x240    240p  253k , avc1.4d4015, 30fps, video only, 128.01MiB
242          webm       426x240    240p  319k , vp9, 30fps, video only, 168.07MiB
134          mp4        640x360    360p  735k , avc1.4d401e, 30fps, video only, 339.45MiB
243          webm       640x360    360p  883k , vp9, 30fps, video only, 320.17MiB
135          mp4        854x480    480p 1353k , avc1.4d401f, 30fps, video only, 666.55MiB
244          webm       854x480    480p 1493k , vp9, 30fps, video only, 568.39MiB
136          mp4        1280x720   720p 2711k , avc1.4d401f, 30fps, video only, 1.27GiB
247          webm       1280x720   720p 3292k , vp9, 30fps, video only, 1.16GiB
137          mp4        1920x1080  1080p 5007k , avc1.640028, 30fps, video only, 2.30GiB
248          webm       1920x1080  1080p 5978k , vp9, 30fps, video only, 2.13GiB
271          webm       2560x1440  1440p 11755k , vp9, 30fps, video only, 5.95GiB
313          webm       3840x2160  2160p 21350k , vp9, 30fps, video only, 14.23GiB
17           3gp        176x144    small , mp4v.20.3, mp4a.40.2@ 24k, 72.17MiB
36           3gp        320x180    small , mp4v.20.3, mp4a.40.2, 203.76MiB
18           mp4        640x360    medium , avc1.42001E, mp4a.40.2@ 96k, 623.39MiB
43           webm       640x360    medium , vp8.0, vorbis@128k, 865.64MiB
22           mp4        1280x720   hd720 , avc1.64001F, mp4a.40.2@192k (best)

Humax2# youtube -f "313+251" https://www.youtube.com/watch?v=RK1K2bCg4J8
[youtube] RK1K2bCg4J8: Downloading webpage
[youtube] RK1K2bCg4J8: Downloading video info webpage
[download] Destination: /mnt/hd2/My Video/Breathtaking Colors of Nature in 4K III Beautiful Nature - Sleep Relax Music 4K UHD TV Screensaver.f313.webm
[download]  55.6% of 14.23GiB at 432.92KiB/s ETA 04:15:05

ERROR: unable to download video data: HTTP Error 403: Forbidden
 
You should just be able to restart it. I suspect a server side problem rather than client side.
Why are you using the 4K download anyway? I'd have thought "137+140" more appropriate.
 
I recently purchased a 4K tv and at the moment have little content to view

EDIT
Great suggestion, even though I have renamed - copied - and then deleted the file from the Humax, after copying it back and renaming it back to *.webm.part, did indeed allow the download to resume, only another 5 - 6 - 7 hours to go :) :-
Code:
Humax2# youtube -f "313+251" https://www.youtube.com/watch?v=RK1K2bCg4J8
[youtube] RK1K2bCg4J8: Downloading webpage
[youtube] RK1K2bCg4J8: Downloading video info webpage
[download] Resuming download at byte 8492218108
[download] Destination: /mnt/hd2/My Video/Breathtaking Colors of Nature in 4K III Beautiful Nature - Sleep Relax Music 4K UHD TV Screensaver.f313.webm
[download]  55.7% of 14.23GiB at 254.62KiB/s ETA 07:12:38
 
Last edited:
How are you expecting to get it to the TV? The HDMI from the Humax won't do it. Maybe DLNA? Or something else?
 
Like every smart TV I've seen in the last 10 years it has a USB port that plays video directly from a HDD, DLNA does also work from the Humax, although currently the TV is in a bedroom without wired LAN, so it is connecting via WiFi to the Humax (also on Wifi in the same bedroom), so 4K streaming does occasionally break up

BTW
The 2hour 10 min video I downloaded appears to have multiple copies of the same videos, so I probably got all I needed in the first partial download anyway, but hey, it worked
 
Last edited:
It would not have been possible without @af123 making changes to the queue service to allow the queuing of URLs

Am I not right in thinking that without af123, there wouldn’t even be custom firmware of any description, (and not only for the Fox T2 but also for the Foxsat)?
 
Thank you! What a brilliant example of collaboration this project has become.
Always was.

Am I not right in thinking that without af123, there wouldn’t even be custom firmware of any description, (and not only for the Fox T2 but also for the Foxsat)?
Not entirely. See Glossary (click), entry BYTs.

However, it is true that af123 has (and developed) the skills and did the "heavy lifting", with some collaboration and encouragement along the way. Otherwise it would have been a very lonely task.
 
Is it possible to download an entire BBC series with one request?
Or must each episode be individually downloaded?

I am attempting to download the Granddaughter's current favourite programme https://www.bbc.co.uk/iplayer/episodes/p06m8m6y

I put in the URL for the series into youtube-dl and it claimed to have downloaded a playlist but downloaded 0 videos
Code:
113    25/10/2018 19:53:02 - completed download of ? options
112    25/10/2018 19:53:02 - [download] Finished downloading playlist: p06m8m6y
111    25/10/2018 19:53:01 - [bbc.co.uk:iplayer:playlist] playlist p06m8m6y: Downloading 0 videos
110    25/10/2018 19:53:01 - [download] Downloading playlist: p06m8m6y
109    25/10/2018 19:53:00 - [bbc.co.uk:iplayer:playlist] p06m8m6y: Downloading webpage
108    25/10/2018 19:52:02 - --newline https://www.bbc.co.uk/iplayer/episodes/p06m8m6y?
107    25/10/2018 19:52:02 - Starting download URL https://www.bbc.co.uk/iplayer/episodes/p06m8m6y? Options  QID 20425
It says it downloaded a playlist but I cant find any corresponding file
 
Back
Top