VideoHelp Forum
+ Reply to Thread
Results 1 to 26 of 26
Thread
  1. 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:
    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&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=0&amp;sig=PskRZY8L3a8&amp;ct=21&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;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&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=4&amp;sig=PK_HZnd5k5c&amp;ct=21&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;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&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=1&amp;sig=i1NgBlf1y1U&amp;ct=21&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;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&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=2&amp;sig=Trv24x7An-A&amp;ct=21&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;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&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=3&amp;sig=AvwzGZFjIDI&amp;ct=21&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;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&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=5&amp;sig=c0eM9FCMf7k&amp;ct=21&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;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&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=4&amp;sig=PK_HZnd5k5c&amp;ct=22&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;id=4838482053887</BaseURL><SegmentBase indexRange="480-78485"><Initialization range="0-479"/></SegmentBase></Representation><Representation bandwidth="128000" id="7"><BaseURL>?expires=1695518880837&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=0&amp;sig=PskRZY8L3a8&amp;ct=22&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;id=4838482053887</BaseURL><SegmentBase indexRange="480-80024"><Initialization range="0-479"/></SegmentBase></Representation><Representation bandwidth="192000" id="8"><BaseURL>?expires=1695518880837&amp;srcIp=50.7.93.29&amp;pr=40&amp;srcAg=GECKO&amp;ms=45.136.22.138&amp;type=1&amp;sig=i1NgBlf1y1U&amp;ct=22&amp;urls=45.136.20.205&amp;clientType=13&amp;appId=512000384397&amp;zs=43&amp;id=4838482053887</BaseURL><SegmentBase indexRange="480-80210"><Initialization range="0-479"/></SegmentBase></Representation></AdaptationSet></Period></MPD>
    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.
    Quote Quote  
  2. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    IDM can download it easily and then watch it with VLC.
    You can't use mpd file to watch the video.
    Last edited by Subtitles; 19th Sep 2023 at 05:21.
    Quote Quote  
  3. Psychology student CrymanChen's Avatar
    Join Date
    Apr 2022
    Location
    Mainland China
    Search Comp PM
    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)
    · Method 2: Pass the URL to the N_m3u8DL-RE and you will find the mpd extracted by the program.
    Image
    [Attachment 73912 - Click to enlarge]


    · Method 3: Copy the content you saw and pass it into whatever an XML online formatter:
    Image
    [Attachment 73913 - Click to enlarge]
    twitter @Cryman_Chen
    email crymanchen@gmail.com
    Quote Quote  
  4. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    If I understand the OP correctly, I think he wants to use the mpd file to watch the video, not download the video.
    Quote Quote  
  5. 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...)

    Image
    [Attachment 73914 - Click to enlarge]
    Quote Quote  
  6. Originally Posted by Subtitles View Post
    You can't use mpd file to watch the video.
    Yes, exactly.
    If I understood correctly - m3u8 CAN be used to watch the video, but mpd - CAN NOT ?
    Quote Quote  
  7. Originally Posted by CrymanChen View Post
    · Method 2: Pass the URL to the N_m3u8DL-RE and you will find the mpd extracted by the program.
    It seems that N_m3u8DL-RE can only download video. I am trying to find a way to watch video online without downloading it.
    Quote Quote  
  8. Originally Posted by Subtitles View Post
    If I understand the OP correctly, I think he wants to use the mpd file to watch the video, not download the video.
    Yes, exactly.
    Quote Quote  
  9. Originally Posted by LZAA View Post
    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
    or like this:
    Code:
    yt-dlp -j https://yandex.ru/video/preview/1321722922811280403
    But there is another problem: in my case requests to urls (from info about video) return response code 400 or 403. Probably it is because of wrong http headers. So I will try to send correct headers (but I still don't know where to take them from).

    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.
    Quote Quote  
  10. Originally Posted by sk8ordi3 View Post
    try mpv to watch directly (totally portable and can use with cli too)
    https://mpv.io/installation/
    For some reason does not work on Windows and MacOS (MPV player crashes). But in any case I need VLC Player (because it is integrated in my application).
    Quote Quote  
  11. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    Originally Posted by usilitel View Post
    Originally Posted by Subtitles View Post
    If I understand the OP correctly, I think he wants to use the mpd file to watch the video, not download the video.
    Yes, exactly.
    It is a bit unusual. You can watch the video online from the website itself, but you have your reasons not to do so.
    Can you please tell us why?
    Quote Quote  
  12. Originally Posted by Subtitles View Post
    It is a bit unusual. You can watch the video online from the website itself, but you have your reasons not to do so.
    Can you please tell us why?
    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.
    Quote Quote  
  13. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    Originally Posted by usilitel View Post
    Originally Posted by Subtitles View Post
    It is a bit unusual. You can watch the video online from the website itself, but you have your reasons not to do so.
    Can you please tell us why?
    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.
    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.
    Quote Quote  
  14. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    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.
    Quote Quote  
  15. Originally Posted by Subtitles View Post
    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.
    Answered in DM.
    Quote Quote  
  16. 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"
    Quote Quote  
  17. Originally Posted by LZAA View Post
    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"
    Yes, it works.
    Quote Quote  
  18. Originally Posted by LZAA View Post
    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"

    and the sintaxis? if we have the keys?
    Last edited by marioeivissa; 23rd Oct 2023 at 11:41.
    Quote Quote  
  19. Originally Posted by LZAA View Post
    Url?
    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?
    Quote Quote  
  20. Originally Posted by LZAA View Post
    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"
    -g????? can you explain this command for what is?
    im doing what you say, but black mirror in vlc
    Quote Quote  
  21. Search, Learn, Download!
    Join Date
    Oct 2022
    Location
    Belgium
    Search Comp PM
    Originally Posted by marioeivissa View Post
    Originally Posted by LZAA View Post
    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"
    -g????? can you explain this command for what is?
    im doing what you say, but black mirror in vlc
    Code:
    -g, --get-url                    --print urls
    Quote Quote  
  22. Originally Posted by LZAA View Post
    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"

    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
    Quote Quote  
  23. i have to say im using the last exe yt-dlp in windows 10 64, maybe is for that reason? also im using the last version of vlc


    or i think i need any coded for vlc?
    Last edited by marioeivissa; 24th Oct 2023 at 10:29.
    Quote Quote  
  24. ok guys i found the solucion!!!!!!!

    we have to fix vlc

    so go:

    tools/preferences/video/output modules:
    change the value "automatic"
    and thats it, everything working now like the mate LZAA said
    Last edited by marioeivissa; 24th Oct 2023 at 12:11.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!