Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lbry
ytsync
Commits
64ab2490
Commit
64ab2490
authored
Jul 22, 2019
by
ci
Browse files
fix bugs
improve debugging
parent
1760935e
Changes
1
Hide whitespace changes
Inline
Side-by-side
sources/youtubeVideo.go
View file @
64ab2490
...
...
@@ -204,12 +204,12 @@ func (v *YoutubeVideo) download(useIPv6 bool) error {
"--match-filter"
,
fmt
.
Sprintf
(
"duration <= %d"
,
int
(
math
.
Round
(
v
.
maxVideoLength
*
3600
))),
"-fbestvideo[ext=mp4][height<="
+
qualities
[
qualityIndex
]
+
"]+bestaudio[ext!=webm]"
,
"-o"
+
strings
.
TrimSuffix
(
v
.
getFullPath
(),
".mp4"
),
"-o
\"
"
+
strings
.
TrimSuffix
(
v
.
getFullPath
(),
".mp4"
)
+
"
\"
"
,
"--merge-output-format"
,
"mp4"
,
"--abort-on-unavailable-fragment"
,
"--fragment-retries"
,
"0"
,
"mp4"
,
}
sourceAddress
,
err
:=
ipManager
.
GetNextIP
(
useIPv6
)
if
err
!=
nil
{
...
...
@@ -251,7 +251,7 @@ func (v *YoutubeVideo) download(useIPv6 bool) error {
runcmd
:
cmd
:=
exec
.
Command
(
"youtube-dl"
,
ytdlArgs
...
)
log
.
Printf
(
"Running command
and waiting for it to finish...
"
)
log
.
Printf
(
"Running command
youtube-dl %s"
,
strings
.
Join
(
ytdlArgs
,
"
"
)
)
stderr
,
err
:=
cmd
.
StderrPipe
()
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment