youtube_dl config file is not fully processed

Here you can submit bugreports
Post Reply
movalex
Posts: 36
Joined: Thu Feb 06, 2020 2:23 pm

youtube_dl config file is not fully processed

Post by movalex »

Hi!
It seems for some videos FFST settings will override the settings in youtube_dl conf file.
For instance, id the video has this parameters:
format code extension resolution note
249 webm audio only tiny 51k , opus @ 50k (48000Hz), 7.80MiB
250 webm audio only tiny 74k , opus @ 70k (48000Hz), 10.44MiB
140 m4a audio only tiny 128k , m4a_dash container, mp4a.40.2@128k (44100Hz), 19.53MiB
251 webm audio only tiny 130k , opus @160k (48000Hz), 18.54MiB
160 mp4 256x144 144p 30k , avc1.4d400c, 30fps, video only, 2.96MiB
133 mp4 426x240 240p 51k , avc1.4d4015, 30fps, video only, 4.42MiB
394 mp4 256x144 144p 61k , av01.0.00M.08, 30fps, video only, 7.87MiB
395 mp4 426x240 240p 72k , av01.0.00M.08, 30fps, video only, 6.56MiB
278 webm 256x144 144p 79k , webm container, vp9, 30fps, video only, 7.34MiB
242 webm 426x240 240p 80k , vp9, 30fps, video only, 7.36MiB
243 webm 640x360 360p 117k , vp9, 30fps, video only, 10.95MiB
396 mp4 640x360 360p 127k , av01.0.01M.08, 30fps, video only, 10.70MiB
244 webm 854x480 480p 170k , vp9, 30fps, video only, 15.27MiB
134 mp4 640x360 360p 210k , avc1.4d401e, 30fps, video only, 8.34MiB
397 mp4 854x480 480p 210k , av01.0.04M.08, 30fps, video only, 16.90MiB
247 webm 1280x720 720p 263k , vp9, 30fps, video only, 24.81MiB
135 mp4 854x480 480p 340k , avc1.4d401f, 30fps, video only, 12.30MiB
248 webm 1920x1080 1080p 409k , vp9, 30fps, video only, 39.24MiB
398 mp4 1280x720 720p 420k , av01.0.05M.08, 30fps, video only, 33.37MiB
136 mp4 1280x720 720p 555k , avc1.4d401f, 30fps, video only, 18.46MiB
399 mp4 1920x1080 1080p 767k , av01.0.08M.08, 30fps, video only, 58.66MiB
137 mp4 1920x1080 1080p 889k , avc1.640028, 30fps, video only, 34.04MiB
22 mp4 1280x720 720p 246k , avc1.64001F, mp4a.40.2@192k (44100Hz)
18 mp4 640x360 360p 305k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 47.01MiB (best)
there's best video on 1080p but the audio in 720p track.
When I manually run download script with these parameters:

Code: Select all

.\youtube-dl.exe -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4
resulting file will be with audio. However the file downloaded with FFFstrans has no audio track.
Is this a bug or I'm doing something wrong?

This is the video with the issue: https://www.youtube.com/watch?v=ZS_kXvOeQ5Y
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: youtube_dl config file is not fully processed

Post by admin »

Hi movalex,

Due to the fact that FFAStrans 1.0.0 will be out 15. February, we will not dig into this issue with the current version. In 1.0.0 the video seem to download just fine with audio. But if you send the config file and workflow we can take a look at it.

-steinar
movalex
Posts: 36
Joined: Thu Feb 06, 2020 2:23 pm

Re: youtube_dl config file is not fully processed

Post by movalex »

Sure!
Here's the workflow, youtube_dl .conf file and a link to a video that converted without audio
https://www.dropbox.com/sh/7buvsv90gxx6 ... Ta3Ga?dl=1
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: youtube_dl config file is not fully processed

Post by admin »

Hi movalex,

The youtube node need some predictable options in order to work. If the content of the config file interfere with those options it will be trouble. For example FFAStrans must know where the output files are so that they can be used as source for the next nodes, if any.
Remember that the youtube node is a convenience node and so you must adhere to the options in the node. If we would only execute youtube-dl with a user config and the url, FFAStrans has no idea where the output files are, their names and what to do with them. If you want full youtube-dl freedom with your config file you might as well just use the generic command executor node.

So in short, with the current version of the youtube node, don't use options that will change the fundamental behavior of the node.
The following options are "hardcoded" in the node:

--ffmpeg-location "<ffastrans ffmpeg location>"
-f <some audio/video option>/best
-a "<url file>"
-o "%s_work_dir%\yt\%(id)s.%(ext)s"

Hope this clarifies.

-steinar
movalex
Posts: 36
Joined: Thu Feb 06, 2020 2:23 pm

Re: youtube_dl config file is not fully processed

Post by movalex »

Thanks, that's clear!
However, I thought about changing default node behavior so if the config file is specified, some of the 'hardcoded' values will not work.
Since `/best` processing option is not always the best choice, in case the conf field is not empty, ffastrans will assume that the person who did that, knows what he is doing and just reads -f parameters from configuration file instead.
Does it make sense?
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: youtube_dl config file is not fully processed

Post by admin »

Well, sort of but parsing a user written config file is not a fool proof way of doing things. In my opinion the config file should be left alone but we might need to add an option to omit some of the hard coded stuff. However, FFAStrans will still need to know where the output file(s) go and their names and I would like to avoid trying to parse that also from the config file.

-steinar
movalex
Posts: 36
Joined: Thu Feb 06, 2020 2:23 pm

Re: youtube_dl config file is not fully processed

Post by movalex »

Since this very issue is based on wrong -f assumption, probably we could either
limit config parsing by reading only format part and some important flags, like `--merge-output-format mp4`
or parse entire config except the parts that are vital for FFAStrans, like mentioned output paths. Whichever is easier to do.
Post Reply