aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-09-09 13:57:31 +0200
committerdec05eba <dec05eba@protonmail.com>2021-09-09 13:57:31 +0200
commitb88c367c48da452f0100bd8cffaba5d76cd83f0d (patch)
treed0bea9df38b74287373206a40b6a7c35e64dbb14
parentc64d577cb053b6fee8e84f768419e84c3c9df2cc (diff)
Temporary fix for shitty ffmpeg being unable to play hls streams on peertube
-rw-r--r--TODO3
-rw-r--r--src/plugins/Peertube.cpp12
2 files changed, 14 insertions, 1 deletions
diff --git a/TODO b/TODO
index 26eee9c..2697269 100644
--- a/TODO
+++ b/TODO
@@ -196,4 +196,5 @@ Add ctrl+r menus for peertube.
Add audio-only mode for peertube (without also downloading video).
Add option to play peertube video directly from url, along with timestamp. Should also work for playlists.
Peertube urls should play directly in quickmedia.
-Test peertube with live streams. \ No newline at end of file
+Test peertube with live streams.
+Peertube hls streams can be really slow to start up (especially for videos.autizmo.xyz). This is an issue in ffmpeg. Maybe use youtube proxy downloader for this? those videos are fragmented. \ No newline at end of file
diff --git a/src/plugins/Peertube.cpp b/src/plugins/Peertube.cpp
index 2b2d654..df715c1 100644
--- a/src/plugins/Peertube.cpp
+++ b/src/plugins/Peertube.cpp
@@ -415,7 +415,19 @@ namespace QuickMedia {
for(const Json::Value &streaming_playlist_json : streaming_playlists_json) {
if(!streaming_playlist_json.isObject())
continue;
+#if 0
files_get_sources(streaming_playlist_json["files"], video_sources);
+#else
+ const Json::Value &playlist_url_json = streaming_playlist_json["playlistUrl"];
+ if(!playlist_url_json.isString())
+ continue;
+
+ PeertubeVideoPage::VideoSource video_source;
+ video_source.url = playlist_url_json.asString();
+ video_source.resolution = 0;
+ video_sources.push_back(std::move(video_source));
+ break;
+#endif
}
if(video_sources.empty())