Detect live videos by parsing the output #23245

Open
opened 2026-02-21 12:41:56 -05:00 by deekerman · 2 comments
Owner

Originally created by @hbtalha on GitHub (Mar 21, 2021).

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

WRITE QUESTION HERE
I am calling youtube-dl from C++ and I getting all the download info by parsing the output.
So my question is: how can I detect by a live video download by parsing the output?

I've managed to do it on youutube live video with the following regular expression(C++)
\\[youtube\\]\\s.*\\:\\sDownloading\\sMPD\\smanifest
And for facebook:
\\[facebook\\] playlist .*\\: "
I am not sure though they will always work.

Is there any regular expression for live video downloads in the output(preferably one that comes before youtube-dl creates any file) so I can detect on other websites?

Originally created by @hbtalha on GitHub (Mar 21, 2021). <!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions - Search the bugtracker for similar questions: http://yt-dl.org/search-issues - Finally, put x into all relevant boxes (like this [x]) --> - [x] I'm asking a question - [x] I've looked through the README and FAQ for similar questions - [x] I've searched the bugtracker for similar questions including closed ones ## Question <!-- Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. --> WRITE QUESTION HERE I am calling youtube-dl from C++ and I getting all the download info by parsing the output. So my question is: how can I detect by a live video download by parsing the output? I've managed to do it on youutube live video with the following regular expression(C++) `\\[youtube\\]\\s.*\\:\\sDownloading\\sMPD\\smanifest` And for facebook: `\\[facebook\\] playlist .*\\: "` I am not sure though they will always work. Is there any regular expression for live video downloads in the output(preferably one that comes before youtube-dl creates any file) so I can detect on other websites?
Author
Owner

@Lesmiscore commented on GitHub (Mar 29, 2021):

Do something like youtube-dl --dump-json and then test for .is_live

@Lesmiscore commented on GitHub (Mar 29, 2021): Do something like `youtube-dl --dump-json` and then test for `.is_live`
Author
Owner

@hbtalha commented on GitHub (Mar 29, 2021):

Do something like youtube-dl --dump-json and then test for .is_live

I tried that but not every video will dump a is_live field. Videos from facebook for example, none of those I tested had a is_live field. Videos from YouTube worked well though, but I need a more generalized way.

youtube-dl.exe --dump-json > teast.json https://www.facebook.com/90canal90/videos/1337887116651990/
youtube-dl.exe --dump-json > teast.json https://fb.watch/4xCwFj3KlF/

Live facebook video, at the moment of this writing
youtube-dl.exe --dump-json > teast.json https://www.facebook.com/gaming/omegaheroic/videos/299352561579835/

@hbtalha commented on GitHub (Mar 29, 2021): > Do something like `youtube-dl --dump-json` and then test for `.is_live` I tried that but not every video will dump a `is_live` field. Videos from facebook for example, none of those I tested had a `is_live` field. Videos from YouTube worked well though, but I need a more generalized way. `youtube-dl.exe --dump-json > teast.json https://www.facebook.com/90canal90/videos/1337887116651990/` `youtube-dl.exe --dump-json > teast.json https://fb.watch/4xCwFj3KlF/` Live facebook video, at the moment of this writing `youtube-dl.exe --dump-json > teast.json https://www.facebook.com/gaming/omegaheroic/videos/299352561579835/`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#23245
No description provided.