Certain sites (known example: tudou.com) deny access to video URLs unless user
agent matches the one used when retrieving URLs from the API, effectively
rendering the URLs useless without the proper user agent. Therefore, exposing
the user agent in -u, --url output could come in handy at times.
This commit does not affect --json output.
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.
This is a follow-up to #999.
This commit adds the
<function_name>: <url>
debug message, which was previously only emitted by get_content and
post_content, to all high level utility functions with network requests
except url_size, url_save and url_save_chunked (in order not to ruin
progress bars).