Skip to content

Instantly share code, notes, and snippets.

@mledoze
Last active February 16, 2021 20:43
Show Gist options
  • Save mledoze/7119779 to your computer and use it in GitHub Desktop.
Save mledoze/7119779 to your computer and use it in GitHub Desktop.
This tutorial explains how to download videos from http://www.arte.tv/

Edit 2021/02/16: warning

This gist is very old. I don't even know if it still works. Check the comments below to find more robust solutions, like youtube-dl for example, see this comment.

1

Go to http://www.arte.tv/ and select any videos, for example http://www.arte.tv/guide/fr/046618-011/silex-and-the-city

2

In the source code extract the src parameter of the iframe player:

http://www.arte.tv/player/v2/index.php?json_url=http%3A%2F%2Farte.tv%2Fpapi%2Ftvguide%2Fvideos%2Fstream%2Fplayer%2FF%2F046618-011_PLUS7-F%2FALL%2FALL.json&lang=fr_FR&config=arte_tvguide&rendering_place=http://www.arte.tv/guide/fr/046618-011/silex-and-the-city

3

From this URL, extract the json URL from the json_url parameter:

http://arte.tv/papi/tvguide/videos/stream/player/F/046618-011_PLUS7-F/ALL/ALL.json

4

In the JSON, select the video quality that you want, for example videoJsonPlayer.VSR.RTMP_SQ_8:

{
    "quality": "HD - 720p",
    "width": 1280,
    "height": 720,
    "mediaType": "rtmp",
    "mimeType": "application/x-fcs",
    "bitrate": 2200,
    "streamer": "rtmp://artestras.fcod.llnwd.net/a3903/o35/",
    "url": "geo/videothek/EUR_DE_FR/tvguide/046618-011-A_SQ_2_VOF-STMF_00767011_MP4-2200_AMM-Tvguide.mp4?e=1382539093&h=1bace4e51c75f98ed5bce1ca727d2651",
    "videoFormat": "RMP4",
    "versionProg": "8",
    "versionCode": "VOF-STMF",
    "versionLibelle": "ST sourds/mal"
}

5

Now you can download the video with rtmpdump http://rtmpdump.mplayerhq.hu/

6

Execute rtmpdump with the following parameters (replace with the good values):

  −−tcUrl "rtmp://artestras.fcod.llnwd.net/a3903/o35/"

  −−swfVfy "http://www.arte.tv/player/v2/jwplayer6/mediaplayer.6.6.swf"
  
  --app "a3903/o35/"
  
  −−pageUrl "http://www.arte.tv/player/v2/index.php?json_url=..."
  
  −−playpath "mp4:geo/videothek/..."
  
  −−rtmp "rtmp://artestras.fcod.llnwd.net/a3903/o35/geo/videothek/..."
  
  −−flv output_file

7

Enjoy.

@miquelbofill
Copy link

I created a script for this: https://github.com/JannikArndt/arte-downloader

It works perfectly. Thank you for sharing.

Copy link

ghost commented Mar 29, 2020

It worked! thanks.

@dtf505
Copy link

dtf505 commented Apr 7, 2020

Hello,
I'm new at this. Can someone explain me how this works. I used IDM to extract from arte.tv, doesn't work anymore.

Thanks in advance

@valsou
Copy link

valsou commented Jun 14, 2020

Yet another² userscript (javascript/any monkey you want). I added a sort to see the best options.

https://github.com/valsou/artePlusPlus

@brugni
Copy link

brugni commented Sep 11, 2020

Is it possible to download only the subtitles in arte?

@jaimet
Copy link

jaimet commented Feb 16, 2021

I realise that it's over 7 years since this original gist, but FWIW youtube-dl can download from http://www.arte.tv, eg:

$ youtube-dl https://www.arte.tv/en/videos/102131-001-A/daniel-hope-raul-da-costa-and-maria-carvalho/
[ArteTV] 102131-001-A: Downloading JSON metadata
[ArteTV] 102131-001-A: Downloading m3u8 information
[download] Destination: Daniel Hope, Raúl da Costa and Maria Carvalho-102131-001-A.mp4
[download]   2.4% of 759.54MiB at 539.42KiB/s ETA 23:27

You can also use youtube-dl's "-F" option to list all the available formats, eg:

$ youtube-dl -F https://www.arte.tv/en/videos/102131-001-A/daniel-hope-raul-da-costa-and-maria-carvalho/
[ArteTV] 102131-001-A: Downloading JSON metadata
[ArteTV] 102131-001-A: Downloading m3u8 information
[info] Available formats for 102131-001-A:
format code    extension  resolution note
HLS_XQ_1-61    mp4        audio only   61k , mp4a.40.2
HLS_XQ_1-356   mp4        384x216     356k , avc1.66.30, mp4a.40.2
HLS_XQ_1-909   mp4        640x360     909k , avc1.77.30, mp4a.40.2
HLS_XQ_1-1548  mp4        720x406    1548k , avc1.77.30, mp4a.40.2
HLS_XQ_1-2213  mp4        1280x720   2213k , avc1.77.30, mp4a.40.2
HTTPS_MQ_1     mp4        384x216    VO, Musical (Original)  300k 
HTTPS_HQ_1     mp4        640x360    VO, Musical (Original)  800k 
HTTPS_EQ_1     mp4        720x406    VO, Musical (Original) 1500k 
HTTPS_SQ_1     mp4        1280x720   VO, Musical (Original) 2200k  (best)

HTH.

@mledoze
Copy link
Author

mledoze commented Feb 16, 2021

@jaimet thank you for the tip, I didn't know youtube-dl could do that. I will add a warning to my gist to say that it is outdated. People should use more robust tools, like youtube-dl.

@mledoze
Copy link
Author

mledoze commented Feb 16, 2021

Is it possible to download only the subtitles in arte?

@brugni apparently not, see GuGuss/ARTE-7-Downloader#63 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment