mirror of
https://github.com/soimort/you-get.git
synced 2025-03-14 11:54:01 +03:00

Prevent FFmpeg from consuming stdin and interpreting the character stream as a stream of interactive commands, specifically: ? show this help + increase verbosity - decrease verbosity c Send command to first matching filter supporting it C Send/Queue command to all matching filters D cycle through available debug modes h dump packets/hex press to cycle through the 3 states q quit s Show QP histogram This prevents misclicking a key or key sequence (e.g., h) produces a large amount of debugging output which may confuse the unseasoned user. It is also useful in a batch environment where an unsuspecting user may not realize you-get could consume stdin through FFmpeg, e.g. while read url; do you-get $url; done <urllist (Related: BashFAQ/089.) Note that interactive commands are enabled in debug mode (which also doesn't suppress FFmpeg's default logging). --- A note on implementation: An alternative would be FFmpeg's -nostdin option, which explicitly disables interaction, but adding such an option to existing code would be even more destructive than the stdin=DEVNULL approach taken here. --- This commit also happens to fix a dual-call bug in ffmpeg_concat_mp4_to_mpg.