Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cdnapisec.kaltura.com #25757
cdnapisec.kaltura.com #25757
Comments
|
The cdnapisec domain requires a ks signature value. The kaltura extractor can sometimes get this value, but for your video it would need to be customized for this site specifically. The ks value for your video is within the following url (view-source):
With a fresh ks value, the following workarounds can be used for the time being (replace the ks value shown in example):
or:
|
|
Woah! This is awesome, however, I'm not sure how you did this..? I think in my example above the ks is: "MjNjYmNjN2JhZGU5ZGFkYjJhNTRiMWU5ZTBlZjM4YWQ4MTNjMWY5MnwxMzA3NzAxOzEzMDc3MDE7MTU5MjkyMzI4MTswOzQwMTg4O2hlcmljay5tb25pekByYWRpby1jYW5hZGEuY2E7c3ZpZXc6MV9waDF4c2xmOQ==" I'm not sure how you assembled it to get the big URL.. Lastly, how did you assemble it to get the final clean curio,radio-canada.ca URL?? Thanks again, in advance!! |
|
ok I think I see how you got the clean url, it displays when I use -v: $ youtube-dl -v "https://cdnapisec.kaltura.com/p/1307701/sp/130770100/playManifest/entryId/1_ph1xslf9/flavorIds/1_hlcfxgv2/format/http/protoc For me my system/python hangs here.. high memory usage and ends up dying: Traceback (most recent call last): and the file wont download. I have to use the new found short URL and it will download! Now if I can only figure out how you assembled the original URL in the first place: I'll be in business... still trying here :) I'm attempting to get another video in the series, and I can't seem to recreate this. :( I'm sure, when you have a moment, if you can help me, that this thread will help others! |
|
For the long url, change: And it will probably work directly. I believe the playManifest url is within the mwEmbedFrame.php url, but I don't have the CA vpn connected now on this device in order to re-check. But you can just use the stated playManifest url as a template, and replace the entryId and flavorId values (for different videos) as needed. |
|
You are correct, swapping html for url worked directly; I just tried updating the entryId and flavorId to get a different video:
But no go: $ youtube-dl -v "https://cdnapisec.kaltura.com/p/1307701/sp/130770100/playManifest/entryId/1_dz56ag5q/flavorIds/1_qldhzovx/format/url/protocol/https/a.mp4?referrer=aHR0cHM6Ly9jdXJpby5jYQ==&ks=MDE3MTIyMDAwYzM0MGMzMDZmZjFiZGFmZjdiMTg4ODIzZGU1OTc2M3wxMzA3NzAxOzEzMDc3MDE7MTU5MjkzMDcyODswOzQ1ODE1O2hlcmljay5tb25pekByYWRpby1jYW5hZGEuY2E7c3ZpZXc6MV9waDF4c2xmOQ==" |
|
For a different video (or entryId), you'll need a new ks value that is for that entryId. view-source: So, the values that are unique to any video (or other) are the entryId, the flavorId, and the ks value. |
|
So the secret sauce here is:
Is there an easier way to get the flavorId's other than having to manually edit the API call? |
|
It all can be automated with a new extractor. The flavorIds are in a few spots, but none easier. The api, or inspection of the m3u8 url, are probably the easiest ways manually. |
|
How does one get the m3u8 url to inspect? |
Checklist
Verbose log
youtube-dl -v kaltura:1307701:1_ph1xslf9
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'kaltura:1307701:1_ph1xslf9']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg git-2020-06-17-0b3bd00
[debug] Proxy map: {}
[Kaltura] 1_ph1xslf9: Downloading video info JSON
[Kaltura] 1_ph1xslf9: Checking mp4-1373 URL
[Kaltura] 1_ph1xslf9: mp4-1373 URL is invalid, skipping
[Kaltura] 1_ph1xslf9: Downloading m3u8 information
WARNING: Failed to download m3u8 information: HTTP Error 404: Not Found
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'http://cdnapi.kaltura.com/p/1307701/sp/130770100/playManifest/entryId/1_ph1xslf9/format/url/protocol/http/flavorId/1_hlcfxgv2'
ERROR: unable to download video data: HTTP Error 404: Not Found
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpspbsbtmq\build\youtube_dl\YoutubeDL.py", line 1926, in process_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpspbsbtmq\build\youtube_dl\YoutubeDL.py", line 1865, in dl
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpspbsbtmq\build\youtube_dl\downloader\common.py", line 366, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpspbsbtmq\build\youtube_dl\downloader\http.py", line 341, in real_download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpspbsbtmq\build\youtube_dl\downloader\http.py", line 109, in establish_connection
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpspbsbtmq\build\youtube_dl\YoutubeDL.py", line 2238, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
Description
WRITE DESCRIPTION HERE
I am in the same location as this video so it shouldn't be an issue. I can't seem to get a working formula. I've searched all other issues (And even commented there) but decided this wasn't quite the same, so I'm opening this one. Hopefully it's something simple.
I'm trying to get the video from here (I am in this geo-location):
https://curio.ca/en/video/the-great-transformation-1746/
It is a kaltura video.
The watch link has this bit of information in the web source:
And I was able to find the API call like youtube-dl does:
http://cdnapi.kaltura.com/api_v3/index.php?2%3AresponseProfile%3Atype=1&clientTag=kdp%3Av3.8.5&4%3Afilter%3AentryIdEqual=1_ph1xslf9&3%3Aks=%7B1%3Aresult%3Aks%7D&4%3Aks=%7B1%3Aresult%3Aks%7D&action=null&1%3AwidgetId=_28723181&4%3Aservice=caption_captionasset&2%3Aaction=get&3%3AentryId=1_ph1xslf9&1%3Aexpiry=86400&1%3Aaction=startWidgetSession&2%3Aks=%7B1%3Aresult%3Aks%7D&3%3Aservice=flavorAsset&3%3Aaction=getbyentryid&2%3AresponseProfile%3Afields=createdAt%2CdataUrl%2Cduration%2Cname%2Cplays%2CthumbnailUrl%2CuserId&4%3Aaction=list&1%3Aservice=session&service=multirequest&2%3AentryId=1_ph1xslf9&format=1&2%3Aservice=baseentry&apiVersion=3.1.5
but this did not 'work'
so I found a working one with "sec" in the URL:
https://cdnapisec.kaltura.com/api_v3/index.php?4%3Aks=%7B1%3Aresult%3Aks%7D&clientTag=kdp%3Av3.8.5&2%3Aks=%7B1%3Aresult%3Aks%7D&2%3AentryId=1_ph1xslf9&1%3Aexpiry=86400&4%3Aaction=list&2%3Aservice=baseentry&1%3Aaction=startWidgetSession&2%3AresponseProfile%3Atype=1&2%3Aaction=get&3%3AentryId=1_ph1xslf9&apiVersion=3.1.5&2%3AresponseProfile%3Afields=createdAt%2CdataUrl%2Cduration%2Cname%2Cplays%2CthumbnailUrl%2CuserId&3%3Aaction=getbyentryid&3%3Aks=%7B1%3Aresult%3Aks%7D&format=1&4%3Afilter%3AentryIdEqual=1_ph1xslf9&4%3Aservice=caption_captionasset&action=null&1%3Aservice=session&3%3Aservice=flavorAsset&1%3AwidgetId=_1307701&service=multirequest
output:
[{"partnerId":1307701,"ks":"djJ8MTMwNzcwMXzoS_CD6fv3K80BDY_Pck7znlH1abmKBJDKpVRqb53UndfG7eF0GGbHfWUhs0IyB56KCS2etxFk3IGFgrBt3V9JXympSTOWLNbyH6Yt8gge3A==","userId":0,"objectType":"KalturaStartWidgetSessionResponse"},{"dataUrl":"https://cdnapisec.kaltura.com/p/1307701/sp/130770100/playManifest/entryId/1_ph1xslf9/format/url/protocol/https","plays":10473,"duration":6380,"name":"The Great Transformation","userId":"hericke.moniz@radio-canada.ca","type":1,"createdAt":1374782038,"thumbnailUrl":"https://cfvod.kaltura.com/p/1307701/sp/130770100/thumbnail/entry_id/1_ph1xslf9/version/100081","objectType":"KalturaMediaEntry"},[{"flavorParamsId":0,"width":718,"height":360,"bitrate":1373,"frameRate":29.97,"isOriginal":true,"isWeb":true,"containerFormat":"mp42","videoCodecId":"avc1","status":2,"isDefault":false,"id":"1_x22x1afq","entryId":"1_ph1xslf9","partnerId":1307701,"version":"1","size":1069547,"tags":"web","fileExt":"mp4","createdAt":1374782765,"updatedAt":1374782773,"description":"","objectType":"KalturaFlavorAsset"},{"flavorParamsId":487041,"width":480,"height":256,"bitrate":461,"frameRate":29.97,"isOriginal":false,"isWeb":true,"containerFormat":"isom","videoCodecId":"avc1","status":2,"isDefault":false,"id":"1_shhf71g1","entryId":"1_ph1xslf9","partnerId":1307701,"version":"1","size":359424,"tags":"mobile,web,mbr,iphone,iphonenew","fileExt":"mp4","createdAt":1374782773,"updatedAt":1374788038,"description":"","objectType":"KalturaFlavorAsset"},{"flavorParamsId":487051,"width":640,"height":360,"bitrate":660,"frameRate":29.97,"isOriginal":false,"isWeb":true,"containerFormat":"isom","videoCodecId":"avc1","status":2,"isDefault":false,"id":"1_nkq47xph","entryId":"1_ph1xslf9","partnerId":1307701,"version":"1","size":514048,"tags":"mobile,web,mbr,iphone,iphonenew","fileExt":"mp4","createdAt":1374782773,"updatedAt":1374827629,"description":"audio warnings: 2106,#Redundant bitrate.\n","objectType":"KalturaFlavorAsset"},{"flavorParamsId":487061,"width":640,"height":360,"bitrate":954,"frameRate":29.97,"isOriginal":false,"isWeb":true,"containerFormat":"isom","videoCodecId":"avc1","status":2,"isDefault":false,"id":"1_vgdbwbji","entryId":"1_ph1xslf9","partnerId":1307701,"version":"1","size":737280,"tags":"mobile,web,mbr,ipad,ipadnew","fileExt":"mp4","createdAt":1374782773,"updatedAt":1374825979,"description":"audio warnings: 2106,#Redundant bitrate.\n","objectType":"KalturaFlavorAsset"},{"flavorParamsId":487071,"width":640,"height":360,"bitrate":1560,"frameRate":29.97,"isOriginal":false,"isWeb":true,"containerFormat":"isom","videoCodecId":"avc1","status":2,"isDefault":false,"id":"1_hlcfxgv2","entryId":"1_ph1xslf9","partnerId":1307701,"version":"1","size":1216348,"tags":"mobile,web,mbr,ipad,ipadnew","fileExt":"mp4","createdAt":1374782773,"updatedAt":1374826281,"description":"","objectType":"KalturaFlavorAsset"},{"flavorParamsId":487091,"width":0,"height":0,"bitrate":0,"frameRate":0,"isOriginal":false,"isWeb":true,"status":4,"isDefault":false,"id":"1_e3sn5h0e","entryId":"1_ph1xslf9","partnerId":1307701,"size":0,"tags":"web,mbr","fileExt":"mp4","createdAt":1374782773,"updatedAt":1374782773,"description":"video warnings: 2107,1440,4000#The target flavor bitrate (1440) does not comply with the requested bitrate (4000).; 2106,#Redundant bitrate.\naudio warnings: 2106,#Redundant bitrate.\n","objectType":"KalturaFlavorAsset"},{"flavorParamsId":487081,"width":0,"height":0,"bitrate":0,"frameRate":0,"isOriginal":false,"isWeb":true,"status":4,"isDefault":false,"id":"1_nfotuudg","entryId":"1_ph1xslf9","partnerId":1307701,"size":0,"tags":"web,mbr","fileExt":"mp4","createdAt":1374782773,"updatedAt":1374782773,"description":"video warnings: 2107,1440,2500#The target flavor bitrate (1440) does not comply with the requested bitrate (2500).; 2106,#Redundant bitrate.\naudio warnings: 2106,#Redundant bitrate.\n","objectType":"KalturaFlavorAsset"}],{"objects":[],"totalCount":0,"objectType":"KalturaCaptionAssetListResponse"}]
I think the underlying issue may be that youtube-dl is using the non sec URL:
[debug] Invoking downloader on 'http://cdnapi.kaltura.com/p/1307701/sp/130770100/playManifest/entryId/1_ph1xslf9/format/url/protocol/http/flavorId/1_hlcfxgv2'
instead of the sec URL "cdnapisec.kaltura.com" that you can see in my above outputs.
I have no idea what to do or how to fix from here.
I had a really hard time trying to find any information on the "kaltura:" URL parameter option as well.
Thanks in advance!