HaarigerHarald / android-youtubeExtractor

Deprecated: Android based YouTube URL extractor and downloader
Other
876 stars 304 forks source link

Youtube live video url #189

Open SushilBerwal opened 3 years ago

SushilBerwal commented 3 years ago

After added c=TVHTML5&cver=6.20180913 this parameter. Youtube recorded video is working fine but live video url not played. if anyone solved this problem then share detail.

lortspogi commented 3 years ago

I'm having the same problem, live broadcast stops after 3secs even if you copy the url to your browser same behavior.

lortspogi commented 3 years ago

To found out, it is not detecting videoMeta.isLiveStream(), inside get_video_info hlsManifestUrl and also .m3u8 format is nowhere to be found.

private static final Pattern patHlsvp = Pattern.compile("hlsManifestUrl\":\"(.+?)(&|\z)");

vikashbhr commented 2 years ago

In getStreamUrl() method of YouTubeExtractor.java add these line of code :

if (streamingData.has("dashManifestUrl")) { dashManifestUrl = streamingData.getString("dashManifestUrl"); }

if (streamingData.has("hlsManifestUrl")) { hlsManifestUrl = streamingData.getString("hlsManifestUrl"); } and use hlsManifestUrl to play live video. It will fix your issue.

itstanany commented 1 year ago

vikashbhr @vikashbhr Please can You clarify more where to add these lines and how to get the live stream to play in Eexoplayer? Thanks in advance!