Closed ar2rworld closed 1 year ago
but it requires ffmpeg
installed
Hey, looks good and i think ffmpeg is more or less required anyway. Wonder if we want some kind if test?
Also fixes #151 i think
Hey @wader, check this one out. And I am not sure if
if ydlResult.Options.DownloadSections != "*0:0-0:5" {
t.Errorf("failed to setup --download-sections")
}
is required?
Probably good idea to check that the option "round-trips" so leave it i think. I guess one could check the duration of the output but would require ffmpeg etc. ...but i notice now that ffmpeg is not installed in the Dockerfile when running tests, so how does this work? ffmpeg not needed by yt-dlp for this or it behaves differently?
Hi again, took a deeper look and found some issues:
ydlResult.Options.DownloadSections != "*0:0-0:5"
check, i somehow assumed it was a value from info.json but see now it just our own option :) but maybe it still make sense to checkTestDownloadSections
seems to fail because ffmpeg is missing, see log example below. But also the format that gets downloaded ydlResult.Info.Formats[0].FormatID
is "sb2" which seems to be an image or something? maybe it's better to just leave it empty or "best" etc?root@44453646f6dd:/Users/wader/src/goutubedl# yt-dlp -o - -f sb2 --download-sections '*0:0-0:5' 'https://www.youtube.com/watch?v=OyuL5biOQ94' > test
[youtube] Extracting URL: https://www.youtube.com/watch?v=OyuL5biOQ94
[youtube] OyuL5biOQ94: Downloading webpage
WARNING: [youtube] unable to extract initial player response; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
[youtube] OyuL5biOQ94: Downloading ios player API JSON
[youtube] OyuL5biOQ94: Downloading android player API JSON
[youtube] OyuL5biOQ94: Downloading iframe API JS
[youtube] OyuL5biOQ94: Downloading player c153b631
[youtube] OyuL5biOQ94: Downloading web player API JSON
[youtube] OyuL5biOQ94: Downloading m3u8 information
WARNING: [youtube] unable to extract yt initial data; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
WARNING: [youtube] Incomplete data received in embedded initial data; re-fetching using API.
[youtube] OyuL5biOQ94: Downloading initial data API JSON
[info] OyuL5biOQ94: Downloading 1 format(s): sb2
[info] OyuL5biOQ94: Downloading 1 time ranges: 0.0-5.0
ERROR: You have requested downloading the video partially, but ffmpeg is not installed. Aborting
I tried installing ffmpeg and change format then --download-sections
seem to work fine. So maybe we should install it and do some checks?
added ffmpeg to the Dockerfile and added exec.Command check for FFmpeg in the test
ci fails on installing ffmpeg, missing &&
i think. there is some tips how to build and run tests here https://github.com/wader/goutubedl#development
thanks that was helpful, i think it is good to go?
looks very messy, what do you think?
yeah a bit messy but maybe ok?
how can I improve it?
I guess it could be refactored to some kind of ffprobe/get value function but maybe can wait until another test needs it
Thanks!
Thanks for your support)
--download-sections support