Skip to content

Commit

Permalink
Fixed the downloading of livestreams with yt-dlp.
Browse files Browse the repository at this point in the history
  • Loading branch information
trizen committed Feb 4, 2023
1 parent 876f667 commit c4d121a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/pipe-viewer
Original file line number Diff line number Diff line change
Expand Up @@ -3590,7 +3590,9 @@ sub download_from_url {
# Download with yt-dlp / youtube-dl
if ($opt{ytdl} and $opt{download_with_ytdl} and defined($info->{_youtube_url}) and defined($info->{itag})) {
my $cmd = join(' ',
$opt{ytdl_cmd}, '-f', $info->{itag}, quotemeta($info->{_youtube_url}),
$opt{ytdl_cmd},
($info->{wkad} ? () : ('-f', $info->{itag})),
quotemeta($info->{_youtube_url}),
'-o', quotemeta("$output_filename.part"));
$yv_obj->proxy_system($cmd);
return if $?;
Expand Down
4 changes: 3 additions & 1 deletion lib/WWW/PipeViewer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,8 @@ sub _extract_streaming_urls {
push @results,
{
itag => 38,
type => "video/ts",
type => "video/mp4",
wkad => 1,
url => $json->{streamingData}{hlsManifestUrl},
};
}
Expand Down Expand Up @@ -1391,6 +1392,7 @@ sub get_streaming_urls {
{
itag => 38,
type => "video/mp4",
wkad => 1,
url => "https://www.youtube.com/watch?v=$videoID",
};
}
Expand Down

0 comments on commit c4d121a

Please sign in to comment.