viki
goodluckspock
2019-06-16/12:03
Hi,

I love Savetube. Great work!

I am specifically looking for a way to download HD videos from viki while I am logged in. I have a viki pass and can watch videos on viki in HD, but not download them.

I see that you're using the viki api to get the streams, but of course that only returns LQ links.

I already looked in detail at your viki download mechanism and experimented a bit with the streams.json query. (To no effect.)

I wonder if it's possible to make that return the HD stream links as well if you're logged in. I couldn't figure out what other parameters to use to make it give up that information - and maybe it's not possible at all?

I just thought I'd ask. I'd be willing to help/experiment with my user id and session etc. whatever might be needed to get the hd links as well.

Best Regards,
Fangirlishness (goodluckspock)

sebaro
2019-06-16/13:31
VIKI uses HLS or DASH, depending on the device. On desktop it will use DASH. If you look in the video page source code, you'll see a "player5_fragment" url, if you open it you'll see on top the two streams, DASH: application/dash+xml and HLS: application/x-mpegURL. These are encrypted but you can get them in the browser's developer tools window, under Network. Here search for ".mpd?", this file will contain the streams, audio and video for each quality. You'll have to use a video muxer to mux the video and audio. Let me know if you have more questions.

sebaro
2019-06-17/11:54
Added DASH videos 480 and 720, see if this works for you:
http://sebaro.pro/savetube/files/savetubetest.user.js

goodluckspock
2019-06-18/19:21
Yes, thank you!!! It works! I couldn't have done the decryption, thank you so much for adding that.

I saw in the network console that some shows are 1080p, so I added another element to the video formats: " '_1080p_': '1080p HD MP4', " and that seems to work, too. I am unbelievably happy with that.

Thank you so much,
Fangirlishness

sebaro
2019-06-18/21:36
OK but that's just the video, so I assume you want the audio too, "track2". I can also add the HLS which has both tracks but still require an external tool for download.

godluckspock
2019-06-19/08:42
Well... I mostly need it for vidding/capping so audio is in fact secondary for me personally. And I can always remux it with an audio track from an LQ source. If I understood correctly, there is no way you can make it be in one direct download link with both video and audio together? So this is actually okay for as is (but probably not for anyone else...).

But, yes, try adding those HLS ones, too, and I'll see how it looks (or sounds)?

Thank you!

sebaro
2019-06-19/10:30
To make somehow automatic muxing is to use a browser protocol which will call a script that does the muxing. See the script's web page for more info (Linux and Mac). The script already supports this for YouTube, I can add VIKI too.

For DASH, does it have audio stream for each quality, including 720 and 1080?

For HLS there's no need for muxing but still need a tool for downloading. The HLS will have a stream (program) for each quality. First get the programs with ffprobe (Program 0, Program 1 etc), then with ffmpeg you can download the one you want (eg: -map p:4 for Program 4)
ffprobe i.m3u8
ffmpeg -i i.m3u8 -map p:4 -c copy o.mp4
I can also add HLS download support using the browser protocol/script.

Dailymotion
Hugh
2019-06-16/13:40
This might not be an error but I'm stumped as I get nothing. No 404, no video, no video removed, nothing. Does this private video work?

https://www.dailymotion.com/video/k7eYMEsLnDBvaatS0Eq

Hugh
2019-06-16/13:42
Delete the above, it's rejected video, just viewtube doesn't state so.

sebaro
2019-06-16/17:14
I'll check for this type of error on next update.

powerpc
oldmac
2019-06-18/20:51
hello,

it seems it would not longer workk on older safari 4 (it used to function perfectly with greasekit + viewtube script).

the error i get


Couldn't make the request. Make sure your browser user scripts extension supports cross-domain requests.

sebaro
2019-06-18/22:04
Update the script, the version you are using is very old, 2017.