Skip to content

Instantly share code, notes, and snippets.

@mledoze
Last active February 16, 2021 20:43
Show Gist options
  • Select an option

  • Save mledoze/7119779 to your computer and use it in GitHub Desktop.

Select an option

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.

@xiangshuii

Copy link
Copy Markdown

If you want to download arte.tv Videos with Subtitles to MP4, AVI, MKV on Mac and Windows,you will need Allavsoft, the best Arte.tv downloader, to help you.

@bumi

bumi commented Apr 12, 2017

Copy link
Copy Markdown

thanks for sharing!! very helpful! :)

@raphaelmartin that could be: https://api.arte.tv/api/player/v1/config/fr/066698-000-A?platform=EXTERNAL&autostart=0&infoLink=&primaryAudioVersion=&lang=fr_FR&config=arte_external - but I think you have the wrong SRC address there.
I think my address started with something like http://www.arte.tv/player/v3/index.php?json_url

@gorillamoe

gorillamoe commented Jan 20, 2018

Copy link
Copy Markdown

@AcidBurn2018

Copy link
Copy Markdown

Oh wow I am very happy that i found this topic. I have a site and dont have any idea how to bring all of the json stuff together. I hope that this topic is not only for arte video streams. What I looking for is a direct url to the japanese live channel Music On! TV. After I try to get the url I found finaly the json file. This is the link to json: http://live.isp2017.com:9083/query/s/pgmLWFXQDT2BRXEZT-Hqvw==.json?type=live
And here is the content of json:<br><p>{"state":2,"uid":"1B27D19536BE9C738C528F451C90117E","vid":"A6098B5855D00D3D814571194FE1EABF","cid":"82E3629A1866A000001C6BFBD8220FB6","audited":1,"enable_hls":0,"name":"MUSIC ON! TV","description":"103-2","tags":"CS325ch,$LIVE_CAT_CS","ccount":null,"timeshift":null,"rate":0,"rate_count":0,"page":null,"movie_level":0,"running":1,"running_delta":21,"substreams":[{"id":"5F86807742A63CD32321743390FBE395","backup_id":null,"state":2,"live_id":"lv1","live_sid":"lv1","path":"/X4/aA/X4aAd0KmPNMjIXQzkPvjlQ==","audited":1,"width":1024,"height":576,"datarate":466,"vcodec":1748121140,"acodec":1633772320,"player1":null,"player2":null,"player3":null,"lang":null,"record":1,"encrypt_code":"5Q/abwJR/uiJ0vpUvE4Rzw==","def":"主码流","thumb_ver":2,"running":1,"running_delta":21,"format":1718646304,"http_url":"http://23.237.66.34:9083/live/lv1-lv1/X4/aA/X4aAd0KmPNMjIXQzkPvjlQ==","p2p_url":"rtmfp://23.237.66.34:9035/live/lv1-lv1/X4/aA/X4aAd0KmPNMjIXQzkPvjlQ==","rtmp_url":"rtmp://23.237.66.34:9035/live/lv1-lv1/X4/aA/X4aAd0KmPNMjIXQzkPvjlQ=="}],"downloadable":false,"sc_tk":"3Q096ulfsK19LsmHBU0BBpOlaBYwEFJC7o3EicdErzzFEf4C40airMA4icVdwKGF0QAwhoKpHz2CHEckHJ9+jw==","code":"OK","type":"live","play_host":"http://158.69.228.193:9083","play_host_rtmfp":"rtmfp://158.69.228.193:9035"}</p>
I'm really sorry for the confusion. The stream can only be opened with a flash player. I would be very happy if someone could tell me which way to go.

@JannikArndt

Copy link
Copy Markdown

@nicos99

nicos99 commented Jan 17, 2020

Copy link
Copy Markdown

Yet an other script, in Python ;-) https://github.com/nicos99/ArteDownloader

@miquelbofill

Copy link
Copy Markdown

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

It works perfectly. Thank you for sharing.

ghost commented Mar 29, 2020

Copy link
Copy Markdown

It worked! thanks.

@dtf505

dtf505 commented Apr 7, 2020

Copy link
Copy Markdown

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

valsou commented Jun 14, 2020

Copy link
Copy Markdown

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

https://github.com/valsou/artePlusPlus

@brugni

brugni commented Sep 11, 2020

Copy link
Copy Markdown

Is it possible to download only the subtitles in arte?

@jaimet

jaimet commented Feb 16, 2021

Copy link
Copy Markdown

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

mledoze commented Feb 16, 2021

Copy link
Copy Markdown
Author

@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

mledoze commented Feb 16, 2021

Copy link
Copy Markdown
Author

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