Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube-dl sends spurious input to invoked ffmpeg #8139
Comments
|
Post the exact snippet you pasting. |
If you run 'while read aurl ; do youtube-dl "${aurl}"; done < path_to_batch_file' (batch_file contains one url per line that uses the hls downloader) each call to youtube-dl consumed some characters and 'read' would assing to 'aurl' a non valid url
(This is the same problem that was fixed for the ffmpeg postprocessors in cffcbc0)
|
Without more info I think that 3f17c35 should fix your issue. |
|
I think commit 3f17c35 actually caused a regression: ffmpeg should be allowed to receive input from the user! For example, when recording a live stream in mp4 format, if the user wants to gracefully stop the recording, ffmpeg supports this by pressing "q" in the terminal window, and the mp4 file will be regularly closed and saved. After 3f17c35 this is no longer possible, and the only way the user can stop the recording is pressing Ctrl-C (or closing the terminal), which results in a corrupted mp4 file! Indeed the original poster's way of "pasting a series of commands" seems wrong to me; shell commands should be separated by a ";" character, in order to be executed serially. Separating them with spaces actually causes the problem he reported, but this is a shell syntax error, not a bug in youtube-dl. So please revert commit 3f17c35 |
|
@Vrihub you have a valid point, but the problem is that in commands like Please open a new issue so that we don't forget it. |
|
|
|
For that simple case yes, but if you want to gradually feed youtube-dl with urls through a pipe you can't use it ( |
Then I'd suggest that you add a new option to youtube-dl for disabling ffmpeg's stdin, to be used in this particular scenario (which I find rather uncommon, BTW, but this is just an opinion). Maybe For the most common scenario, in which youtube-dl is invoked interactively to download from one source, I think youtube-dl's default behaviour should be to allow ffmpeg's behave as it is supposed to (=be able to read from stdin). |
This was noticed when I pasted in a Debian console a series of:
While the first command was executed, the others were sent as input for
ffmpeg, which spammed the console with countless:These errors can be prevented if
ffmpeg's invocation includes a</dev/null.A workaround is to add
</dev/nullto eachyoutube-dlcall.