@@ -48,23 +48,23 @@ func TestBuildArgs(t *testing.T) {
48
48
format : model .FormatVideo ,
49
49
output : "/tmp/1" ,
50
50
videoURL : "http://url" ,
51
- expect : []string {"--format" , "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" , "--output" , "/tmp/1" , "http://url" },
51
+ expect : []string {"--format" , "bestvideo[ext=mp4][vcodec^=avc1] +bestaudio[ext=m4a]/best[ext=mp4][vcodec^=avc1 ]/best[ext=mp4]/best" , "--output" , "/tmp/1" , "http://url" },
52
52
},
53
53
{
54
54
name : "Video unknown quality with maxheight" ,
55
55
format : model .FormatVideo ,
56
56
maxHeight : 720 ,
57
57
output : "/tmp/1" ,
58
58
videoURL : "http://url" ,
59
- expect : []string {"--format" , "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" , "--output" , "/tmp/1" , "http://url" },
59
+ expect : []string {"--format" , "bestvideo[ext=mp4][vcodec^=avc1] +bestaudio[ext=m4a]/best[ext=mp4][vcodec^=avc1 ]/best[ext=mp4]/best" , "--output" , "/tmp/1" , "http://url" },
60
60
},
61
61
{
62
62
name : "Video low quality" ,
63
63
format : model .FormatVideo ,
64
64
quality : model .QualityLow ,
65
65
output : "/tmp/2" ,
66
66
videoURL : "http://url" ,
67
- expect : []string {"--format" , "worstvideo[ext=mp4]+worstaudio[ext=m4a]/worst[ext=mp4]/worst" , "--output" , "/tmp/2" , "http://url" },
67
+ expect : []string {"--format" , "worstvideo[ext=mp4][vcodec^=avc1] +worstaudio[ext=m4a]/worst[ext=mp4][vcodec^=avc1 ]/worst[ext=mp4]/worst" , "--output" , "/tmp/2" , "http://url" },
68
68
},
69
69
{
70
70
name : "Video low quality with maxheight" ,
@@ -73,15 +73,15 @@ func TestBuildArgs(t *testing.T) {
73
73
maxHeight : 720 ,
74
74
output : "/tmp/2" ,
75
75
videoURL : "http://url" ,
76
- expect : []string {"--format" , "worstvideo[ext=mp4]+worstaudio[ext=m4a]/worst[ext=mp4]/worst" , "--output" , "/tmp/2" , "http://url" },
76
+ expect : []string {"--format" , "worstvideo[ext=mp4][vcodec^=avc1] +worstaudio[ext=m4a]/worst[ext=mp4][vcodec^=avc1 ]/worst[ext=mp4]/worst" , "--output" , "/tmp/2" , "http://url" },
77
77
},
78
78
{
79
79
name : "Video high quality" ,
80
80
format : model .FormatVideo ,
81
81
quality : model .QualityHigh ,
82
82
output : "/tmp/2" ,
83
83
videoURL : "http://url1" ,
84
- expect : []string {"--format" , "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" , "--output" , "/tmp/2" , "http://url1" },
84
+ expect : []string {"--format" , "bestvideo[ext=mp4][vcodec^=avc1] +bestaudio[ext=m4a]/best[ext=mp4][vcodec^=avc1 ]/best[ext=mp4]/best" , "--output" , "/tmp/2" , "http://url1" },
85
85
},
86
86
{
87
87
name : "Video high quality with maxheight" ,
@@ -90,7 +90,7 @@ func TestBuildArgs(t *testing.T) {
90
90
maxHeight : 1024 ,
91
91
output : "/tmp/2" ,
92
92
videoURL : "http://url1" ,
93
- expect : []string {"--format" , "bestvideo[height<=1024][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" , "--output" , "/tmp/2" , "http://url1" },
93
+ expect : []string {"--format" , "bestvideo[height<=1024][ext=mp4][vcodec^=avc1] +bestaudio[ext=m4a]/best[height<=1024][ext=mp4][vcodec^=avc1 ]/best[ext=mp4]/best" , "--output" , "/tmp/2" , "http://url1" },
94
94
},
95
95
{
96
96
name : "Video high quality with custom youtube-dl arguments" ,
@@ -99,7 +99,7 @@ func TestBuildArgs(t *testing.T) {
99
99
output : "/tmp/2" ,
100
100
videoURL : "http://url1" ,
101
101
ytdlArgs : []string {"--write-sub" , "--embed-subs" , "--sub-lang" , "en,en-US,en-GB" },
102
- expect : []string {"--format" , "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" , "--write-sub" , "--embed-subs" , "--sub-lang" , "en,en-US,en-GB" , "--output" , "/tmp/2" , "http://url1" },
102
+ expect : []string {"--format" , "bestvideo[ext=mp4][vcodec^=avc1] +bestaudio[ext=m4a]/best[ext=mp4][vcodec^=avc1 ]/best[ext=mp4]/best" , "--write-sub" , "--embed-subs" , "--sub-lang" , "en,en-US,en-GB" , "--output" , "/tmp/2" , "http://url1" },
103
103
},
104
104
}
105
105
0 commit comments