Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always get suspended when run youtube-dl in background #10706

Closed
cxbig opened this issue Sep 19, 2016 · 7 comments
Closed

Always get suspended when run youtube-dl in background #10706

cxbig opened this issue Sep 19, 2016 · 7 comments
Labels
bug

Comments

@cxbig
Copy link

@cxbig cxbig commented Sep 19, 2016

I found that I have no way to run youtube-dl in background.
I tried all possible options to make it running in silence. But I still get 'suspended' job:

% stty -tostop && youtube-dl -q -i --no-warnings -o '%(id)s.%(ext)s'  $video_url >/dev/null 2>&1 &
[1] 53435
%
[1]  + 53435 suspended (tty output)  youtube-dl -q -i --no-warnings -o '%(id)s.%(ext)s'  > /dev/null 2>&1

Local env

[debug] youtube-dl version 2016.08.10
[debug] Python version 2.7.12 - Darwin-15.6.0-x86_64-i386-64bit
@jdunn0
Copy link

@jdunn0 jdunn0 commented Sep 20, 2016

How are you launching youtube-dl? From a shell or inside a shell script?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 20, 2016

A workaround:

  • Create ~/ffmpeg_wrapper.sh with the following contents:
#!/bin/bash
ffmpeg -d $*
  • chmod +x ~/ffmpeg_wrapper.sh
  • youtube-dl -o '%(id)s.%(ext)s' --ffmpeg-location ~/ffmpeg_wrapper.sh $video_url

See https://github.com/FFmpeg/FFmpeg/blob/ae1dd0c/ffmpeg.c#L384 for what's broken and why -d works.

UPDATE: Fix commands in the workaround.

@yan12125 yan12125 added the bug label Sep 20, 2016
@cxbig
Copy link
Author

@cxbig cxbig commented Sep 20, 2016

@jdunn0 I tried both command line and script. Same behavior.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 20, 2016

Oops, there's something wrong in my previous post. I've updated it. Could you try again?

@cxbig
Copy link
Author

@cxbig cxbig commented Sep 20, 2016

@yan12125 Thanks, your solution is working well.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 20, 2016

Thanks for your feedback. I'll check whether including -d in youtube-dl is OK or not.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 22, 2016

Thanks to @johnhawkinson (#10996), this will be fixed in the next version.

@yan12125 yan12125 closed this Oct 22, 2016
@n00b12345 n00b12345 mentioned this issue Mar 16, 2018
5 of 9 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.