@arzafran Let me quote konklone's comment, immediately above yours, in full:
> Please read the above thread in full - there are a number of solutions discussed. All of them are incomplete in some significant way (thus this ticket), but a work around might be acceptable for your case.
>
> To anyone stumbling on this thread - there are many people subscribed, so please do not comment here unless you have something new to add that is not already discussed above in this long, detailed (and I hope helpful!) discussion thread.
You pointed to a solution that's been discussed since as early as 2014, and has been mature for at least the greater part of a year. And you did so with smugness. Your comment didn't add to the discussion, and was kind of an insult to people's intelligence too.
Also, asking about downvotes is sometimes worse than being downvoted.
(Please, don't reply to this.)
Here is the dual-call bug I was talking about. I didn't read surrounding code but it's safe to assume that `subprocess.call(params)` shouldn't be called twice in immediate succession.
[ffmpeg] call ffmpeg with stdin redirected to the null device
=============================================================
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 is mostly useful in a batch environment where an unsuspecting user
may not realize you-get could consume stdin through FFmpeg, e.g.
```sh
while read url; do you-get "$url"; done <urllist
```
(Related: BashFAQ/089.)
Yeah, apparently the above could easily be replaced with `xargs you-get <urllist` which is more elegant and doesn't suffer from the stdin consumption problem, but the above is a pretty honest and straightforward command line which could been seen in the real world.
In addition, even if we ignore the contrived command line, a user probably won't be thrilled if he accidentally smashes the "h" key and all of a sudden megabytes worth of dumps pour in on stderr.
---
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`.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/soimort/you-get/1665)
<!-- Reviewable:end -->