I want to watch MPEG-DASH video from web page in VLC Player.
For this I need to get .mpd file (manifest of video).
I extracted it from web page (using browser), but VLC Player can not play this file.
May be it is just in wrong format (see example below)?
Also I tried to use yt-dlp (former youtube-dl), but I do not understand how to get .mpd file using this library.
yt-dlp can download video, but I do not need to download it, I need only to get .mpd file (to watch it online in VLC Player).
Example:
web page:
https://yandex.ru/video/preview/1321722922811280403
url of MPEG-DASH manifest (I extracted it from web page):
https://vkvd48.mycdn.me/?srcIp=50.7.93.29&pr=40&expires=1695518880837&srcAg=GECKO&from...887&offset_p=0
response of MPEG-DASH manifest:
When I save this response as .mpd file and try to play it in VLC Player - VLC Player says that this file can't be played. And also some other players.Code:<?xml version="1.0" encoding="UTF-8" standalone="no"?><MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" mediaPresentationDuration="PT8900.900S" minBufferTime="PT0.5S" profiles="urn:webm:dash:profile:webm-on-demand:2012" type="static" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011"><Period duration="PT8900.900S" id="0" start="PT0S"><AdaptationSet bitstreamSwitching="true" codecs="vp9" id="0" maxFrameRate="30" maxHeight="1080" maxWidth="1920" mimeType="video/webm" subsegmentAlignment="true" subsegmentStartsWithSAP="1"><Representation bandwidth="196765" frameRate="30" height="240" id="0" quality="lowest" width="426"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=0&sig=PskRZY8L3a8&ct=21&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="433-53602"><Initialization range="0-432"/></SegmentBase></Representation><Representation bandwidth="198464" frameRate="30" height="144" id="1" quality="mobile" width="256"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=4&sig=PK_HZnd5k5c&ct=21&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="433-53668"><Initialization range="0-432"/></SegmentBase></Representation><Representation bandwidth="346644" frameRate="30" height="360" id="2" quality="low" width="640"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=1&sig=i1NgBlf1y1U&ct=21&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="435-53697"><Initialization range="0-434"/></SegmentBase></Representation><Representation bandwidth="562487" frameRate="30" height="480" id="3" quality="sd" width="852"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=2&sig=Trv24x7An-A&ct=21&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="435-53734"><Initialization range="0-434"/></SegmentBase></Representation><Representation bandwidth="1067086" frameRate="30" height="720" id="4" quality="hd" width="1280"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=3&sig=AvwzGZFjIDI&ct=21&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="435-53776"><Initialization range="0-434"/></SegmentBase></Representation><Representation bandwidth="1893372" frameRate="30" height="1080" id="5" quality="full" width="1920"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=5&sig=c0eM9FCMf7k&ct=21&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="435-53795"><Initialization range="0-434"/></SegmentBase></Representation></AdaptationSet><AdaptationSet audioSamplingRate="48000" bitstreamSwitching="true" codecs="opus" id="1" mimeType="audio/webm" subsegmentAlignment="true" subsegmentStartsWithSAP="1"><Representation bandwidth="32001" id="6"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=4&sig=PK_HZnd5k5c&ct=22&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="480-78485"><Initialization range="0-479"/></SegmentBase></Representation><Representation bandwidth="128000" id="7"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=0&sig=PskRZY8L3a8&ct=22&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="480-80024"><Initialization range="0-479"/></SegmentBase></Representation><Representation bandwidth="192000" id="8"><BaseURL>?expires=1695518880837&srcIp=50.7.93.29&pr=40&srcAg=GECKO&ms=45.136.22.138&type=1&sig=i1NgBlf1y1U&ct=22&urls=45.136.20.205&clientType=13&appId=512000384397&zs=43&id=4838482053887</BaseURL><SegmentBase indexRange="480-80210"><Initialization range="0-479"/></SegmentBase></Representation></AdaptationSet></Period></MPD>
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 26 of 26
Thread
-
-
It's not difficult if you want to save the mpd file.
· Method 1: Use Python to save the content of this mpd file:
Code:with open(filename, "wb") as file: file.write(response.content)
[Attachment 73912 - Click to enlarge]
· Method 3: Copy the content you saw and pass it into whatever an XML online formatter:
[Attachment 73913 - Click to enlarge]twitter @Cryman_Chen
email crymanchen@gmail.com -
If I understand the OP correctly, I think he wants to use the mpd file to watch the video, not download the video.
-
yt-dlp https://yandex.ru/video/preview/1321722922811280403 -o - | "Path to vlc.exe" -
-
try mpv to watch directly (totally portable and can use with cli too)
https://mpv.io/installation/
than just need to drag this url and drop to an opened mpv
https://yandex.ru/video/preview/1321722922811280403
(or write a little script that link open with mpv...)
[Attachment 73914 - Click to enlarge] -
-
-
Yes, it works, but there is a problem with this solution: it is impossible to jump video forwards/backwards, VLC Player can only play and pause the video. Probably it is because video is piped (through something like fd://0).
I think I should get the correct url of video. I can do it like this:
Code:yt-dlp --write-info-json --skip-download https://yandex.ru/video/preview/1321722922811280403
Code:yt-dlp -j https://yandex.ru/video/preview/1321722922811280403
PS
I am writing Android application which will watch online videos from Internet. User will specify web page with video and will watch that video in my application. That is why I need to extract "playable" url of video from web page.
Update:
Yes, the problem was in wrong http-headers. I found correct headers in json-file which is saved by this command:
Code:yt-dlp --write-info-json --skip-download https://yandex.ru/video/preview/1321722922811280403
Last edited by usilitel; 20th Sep 2023 at 01:34.
-
-
Yes, sure.
My Android-application will show clickable subtitles in a foreign language. User watches a movie, clicks on unknown word, and the application shows translation of this word.
I have already done this for local video files, but I also want to add a feature with online watching (so that the user does not need to pre-download movie to device). That's why I need to get a url-link to video from the web page.
That is, the user specifies the url of the web page, I get a link to the video from this page, run this video in my player and show subtitles for it.Last edited by usilitel; 20th Sep 2023 at 01:11.
-
Wow this is very interesting application. but you are limited to websites that show subtitles already and the user can stop the video and look up the subtitle text and get the translation to the language of his choice. But that specific website didn't have subtitles stream, or did I miss it?
Are you transcribing the audio as it plays, in case there is no subtitles?
Is it only for Android or it can run on Windows as well?Last edited by Subtitles; 20th Sep 2023 at 03:28.
-
I don't want to discourage you, but why do you think there is a demand for such an application?
It is hardly unlickly that a user would stop the video in VLC and click the subtitle text for example in Russian, highlight just a word to get the translation in English.
The usual model while playing a video in YouTube is to select the auto translation (if it has one. There are only few languages that YouTube does bothers to transcribe for example Hebrew, Polish, Turkish, Arabic are not transcribed) and get the whole video transcription in the preferred language. This way the video is played continuously without stopping and resuming.
Perhaps I haven't fully understood your intention. You can DM me if you prefer. -
yt-dlp -g https://yandex.ru/video/preview/1321722922811280403 | vlc - :http-user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36"
-
Last edited by marioeivissa; 23rd Oct 2023 at 11:41.
-
https://dce-ak-livewwdazn.akamaized.net/dashdrm/dazn-linear-059/stream.mpd?p=web
i play with vlc, but cant see anything, scream black
i have the keys, but using yt-lpd can i play with vlc? or should i use ffmpeg and mp4decrypt to convert and fix and bla bla bla? -
-
if i usevlc player)
C:\yt-dlp>yt-dlp -g https://yandex.ru/video/preview/1321722922811280403 | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" - :http-user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
*black mirror
if i usempc hc64 video player)
C:\yt-dlp>yt-dlp -g https://yandex.ru/video/preview/1321722922811280403 | "C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" - :http-user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
*dont find video
if i usempc hc64 video player)
C:\yt-dlp>yt-dlp --referer "https://yandex.ru/video/preview/1321722922811280403" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36" -o - | "C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" -
*its downloading and playing."Working"
if i usevlc video player)
C:\yt-dlp>yt-dlp --referer "https://yandex.ru/video/preview/1321722922811280403" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36" -o - | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -
*VLC es incapaz de abrir el MRL «fd://0». Vea el registro para más detalles.
So only work without (-g)parameter, and downloading first (-o) and doesnt work anyway witn vlc, its only working with mpc hc64 video player
Similar Threads
-
web does not show mpd
By Zabon in forum Video Streaming DownloadingReplies: 5Last Post: 25th Apr 2023, 22:27 -
How To Download Audio From A Player on A Web Page?
By abrogard in forum Newbie / General discussionsReplies: 13Last Post: 1st Jul 2022, 10:40 -
i need to refresh the page many times to get the right mpd link
By Loryanam2 in forum Video Streaming DownloadingReplies: 3Last Post: 18th Jun 2022, 15:59 -
How to extract source audio from MPD?
By ST02 in forum Video Streaming DownloadingReplies: 16Last Post: 8th Jan 2022, 13:07 -
web page coding
By vhelp in forum ProgrammingReplies: 8Last Post: 15th Feb 2019, 09:48