{"action":"created","issue":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/955","repository_url":"https://api.github.com/repos/rg3/youtube-dl","labels_url":"https://api.github.com/repos/rg3/youtube-dl/issues/955/labels{/name}","comments_url":"https://api.github.com/repos/rg3/youtube-dl/issues/955/comments","events_url":"https://api.github.com/repos/rg3/youtube-dl/issues/955/events","html_url":"https://github.com/rg3/youtube-dl/issues/955","id":16109221,"number":955,"title":"Launching Youtube-dl as a background command","user":{"login":"vanilla38","id":1910852,"avatar_url":"https://avatars.githubusercontent.com/u/1910852?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla38","html_url":"https://github.com/vanilla38","followers_url":"https://api.github.com/users/vanilla38/followers","following_url":"https://api.github.com/users/vanilla38/following{/other_user}","gists_url":"https://api.github.com/users/vanilla38/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla38/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla38/subscriptions","organizations_url":"https://api.github.com/users/vanilla38/orgs","repos_url":"https://api.github.com/users/vanilla38/repos","events_url":"https://api.github.com/users/vanilla38/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla38/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2013-06-27T19:19:25Z","updated_at":"2016-04-14T07:03:05Z","closed_at":"2016-04-14T07:03:05Z","body":"Hi, I just noticed when i try to launch $ youtube-dl http://www.ZZzzzZZ.com &\r\nIt fails, program cant terminate.\r\n\r\nAny clue ? Thanks."},"comment":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/comments/209789656","html_url":"https://github.com/rg3/youtube-dl/issues/955#issuecomment-209789656","issue_url":"https://api.github.com/repos/rg3/youtube-dl/issues/955","id":209789656,"user":{"login":"yan12125","id":1937689,"avatar_url":"https://avatars.githubusercontent.com/u/1937689?v=3","gravatar_id":"","url":"https://api.github.com/users/yan12125","html_url":"https://github.com/yan12125","followers_url":"https://api.github.com/users/yan12125/followers","following_url":"https://api.github.com/users/yan12125/following{/other_user}","gists_url":"https://api.github.com/users/yan12125/gists{/gist_id}","starred_url":"https://api.github.com/users/yan12125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yan12125/subscriptions","organizations_url":"https://api.github.com/users/yan12125/orgs","repos_url":"https://api.github.com/users/yan12125/repos","events_url":"https://api.github.com/users/yan12125/events{/privacy}","received_events_url":"https://api.github.com/users/yan12125/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T07:03:05Z","updated_at":"2016-04-14T07:03:05Z","body":"The problematic lines lays in ffmpeg:\r\n```C\r\n        if (tcgetattr (0, &tty) == 0) {\r\n            oldtty = tty;\r\n            restore_tty = 1;\r\n\r\n            tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP\r\n                             |INLCR|IGNCR|ICRNL|IXON);\r\n            tty.c_oflag |= OPOST;\r\n            tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);\r\n            tty.c_cflag &= ~(CSIZE|PARENB);\r\n            tty.c_cflag |= CS8;\r\n            tty.c_cc[VMIN] = 1;\r\n            tty.c_cc[VTIME] = 0;\r\n\r\n            tcsetattr (0, TCSANOW, &tty);\r\n        }\r\n```\r\n(See: https://github.com/FFmpeg/FFmpeg/blob/6f69f7a8bf6a0d013985578df2ef42ee6b1c7994/ffmpeg.c#L371-L385)\r\nThe code segment above tries to ```ioctl()``` on STDOUT. Kernel then sends SIGTTOU to the calling process, youtube-dl. A workaround is avoiding ffmpeg/avconv calls by tricking youtube-dl that ffmpeg does not exist:\r\n```\r\n$ youtube-dl -v http://vimeo.com/79695097 --ffmpeg-location /path/not/exist &\r\n[1] 22603\r\n\r\n$ [debug] System config: []\r\n[debug] User config: []\r\n[debug] Command-line args: ['-v', 'http://vimeo.com/79695097', '--ffmpeg-location', '/path/not/exist']\r\n[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8\r\n[debug] youtube-dl version 2016.04.13\r\n[debug] Git HEAD: d1c4e4b\r\n[debug] Python version 3.5.1 - Linux-4.5.0-1-ARCH-x86_64-with-arch-Arch-Linux\r\nWARNING: ffmpeg-location /path/not/exist does not exist! Continuing without avconv/ffmpeg.\r\n[debug] exe versions: rtmpdump 2.4\r\n[debug] Proxy map: {}\r\n[vimeo] 79695097: Downloading webpage\r\n[vimeo] 79695097: Extracting information\r\n[vimeo] 79695097: Downloading webpage\r\n[vimeo] 79695097: Downloading JSON metadata\r\n[vimeo] 79695097: Checking Original video URL\r\n[vimeo] 79695097: Original video URL is invalid, skipping\r\n[vimeo] 79695097: Downloading m3u8 information\r\nWARNING: ffmpeg-location /path/not/exist does not exist! Continuing without avconv/ffmpeg.\r\n[debug] Invoking downloader on 'https://10-lvl3-pdl.vimeocdn.com/01/939/3/79695097/206208039.mp4?expires=1460620853&token=06d817e44ae6452e6b2f6'\r\n[download] Destination: IDIOTS-79695097.mp4\r\n[download] 100% of 67.08MiB in 00:19\r\n\r\n[1]  + 22603 done       youtube-dl -v http://vimeo.com/79695097 --ffmpeg-location /path/not/exist\r\n```\r\nThis is the case on Linux. Don't know the case in IRIX.\r\n\r\nI guess there's nothing youtube-dl can do unless we have a patched ffmpeg or a patched Linux kernel, so closing this ticket here. Feel free to propose your solution and I or others will reopen this ticket."}}