{"action":"created","issue":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/3260","repository_url":"https://api.github.com/repos/mpv-player/mpv","labels_url":"https://api.github.com/repos/mpv-player/mpv/issues/3260/labels{/name}","comments_url":"https://api.github.com/repos/mpv-player/mpv/issues/3260/comments","events_url":"https://api.github.com/repos/mpv-player/mpv/issues/3260/events","html_url":"https://github.com/mpv-player/mpv/issues/3260","id":160793614,"number":3260,"title":"ytdl-hook does not load stream that raw youtube-dl can","user":{"login":"woodruffw","id":3059210,"avatar_url":"https://avatars.githubusercontent.com/u/3059210?v=3","gravatar_id":"","url":"https://api.github.com/users/woodruffw","html_url":"https://github.com/woodruffw","followers_url":"https://api.github.com/users/woodruffw/followers","following_url":"https://api.github.com/users/woodruffw/following{/other_user}","gists_url":"https://api.github.com/users/woodruffw/gists{/gist_id}","starred_url":"https://api.github.com/users/woodruffw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woodruffw/subscriptions","organizations_url":"https://api.github.com/users/woodruffw/orgs","repos_url":"https://api.github.com/users/woodruffw/repos","events_url":"https://api.github.com/users/woodruffw/events{/privacy}","received_events_url":"https://api.github.com/users/woodruffw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-17T01:11:32Z","updated_at":"2016-06-17T01:31:48Z","closed_at":null,"body":"I'm trying to stream a (flash) audio resource into `mpv` using `ytdl-hook`, but I'm encountering a \"Failed to recognize file format\" error.\r\n\r\nThe verbose log:\r\n\r\n```\r\n[cplayer] Command line options: '-v' 'http://www.thisamericanlife.org/play_full.php?play=1'\r\n[cplayer] mpv git-449b948 (C) 2000-2016 mpv/MPlayer/mplayer2 projects\r\n[cplayer]  built on Thu May 19 11:12:22 UTC 2016\r\n[cplayer] ffmpeg library versions:\r\n[cplayer]    libavutil       55.24.100\r\n[cplayer]    libavcodec      57.40.100\r\n[cplayer]    libavformat     57.36.100\r\n[cplayer]    libswscale      4.1.100\r\n[cplayer]    libavfilter     6.45.100\r\n[cplayer]    libswresample   2.0.101\r\n[cplayer] ffmpeg version: N-79883-g38eeb85\r\n[cplayer] \r\n[cplayer] Configuration: ./waf configure --enable-pdf-build --prefix=/usr --confdir=/etc/mpv\r\n[cplayer] List of enabled features: alsa any-gl asm atomic-builtins atomics audio-input av-avpacket-int64-duration av-new-pixdesc av-pix-fmt-mmal av-subtitle-nopict av-version-info avcodec-chroma-pos-api avcodec-has-codecpar avcodec-new-codec-api avcodec-profile-name avframe-metadata avframe-skip-samples avutil-has-hwcontext build-date cdda cplayer debug-build dlopen drm dvbin dvdnav dvdread encoding fchmod gl gl-x11 glibc-thread-name glob iconv jack jpeg lcms2 libass libass-osd libav libavdevice libavfilter libbluray libdl libguess libm librt libsmbclient libswresample libv4l2 linux-fstatfs lua nanosleep optimize oss-audio oss-audio-native posix posix-or-mingw posix-spawn pthreads pulse resampler rubberband shm sse4-intrinsics standard-gl subprocess termios tv tv-v4l2 uchardet vaapi vaapi-glx vaapi-hwaccel vaapi-x11 vdpau vdpau-gl-x11 vdpau-hwaccel videodev vt.h x11 xext xinerama xrandr xss xv zlib\r\n[global] config path: '' -> '/home/william/.mpv'\r\n[global] config path: 'mpv.conf' -/-> '/home/william/.mpv/mpv.conf'\r\n[global] config path: 'config' -> '/home/william/.mpv/config'\r\n[global] config path: 'mpv.conf' -/-> '/etc/mpv/mpv.conf'\r\n[global] config path: 'config' -/-> '/etc/mpv/config'\r\n[cplayer] Reading config file /home/william/.mpv/config\r\n[cplayer] Setting option 'no-border' = '' (flags = 4)\r\n[cplayer] Setting option 'force-window' = '' (flags = 4)\r\n[cplayer] Setting option 'osc' = 'yes' (flags = 4)\r\n[cplayer] Setting option 'screenshot-format' = 'png' (flags = 4)\r\n[cplayer] Setting option 'screenshot-template' = '~/Dropbox/screenshots/%F - %p' (flags = 4)\r\n[cplayer] Setting option 'cache-default' = '50000' (flags = 4)\r\n[cplayer] Setting option 'alang' = 'jpn' (flags = 4)\r\n[cplayer] Setting option 'slang' = 'enm,eng' (flags = 4)\r\n[cplayer] Setting option 'heartbeat-cmd' = 'xscreensaver-command -deactivate >&- 2>&- &' (flags = 4)\r\n[cplayer] Setting option 'autofit-larger' = '50%x50%' (flags = 4)\r\n[cplayer] Setting option 'user-agent' = 'Mozilla/5.0 (X11; Linux; Linux; rv:0.0) Gecko/0 Firefox/0' (flags = 4)\r\n[cplayer] Setting option 'ytdl-format' = 'bestvideo+bestaudio' (flags = 4)\r\n[cplayer] Setting option 'force-seekable' = '' (flags = 4)\r\n[cplayer] Setting option 'input-cursor' = 'yes' (flags = 4)\r\n[cplayer] Setting option 'v' = '' (flags = 8)\r\n[global] config path: 'input.conf' -/-> '/home/william/.mpv/input.conf'\r\n[global] config path: 'input.conf' -/-> '/etc/mpv/input.conf'\r\n[input] Falling back on default (hardcoded) input config\r\n[osc] Loading script @osc.lua...\r\n[global] config path: 'scripts' -> '/home/william/.mpv/scripts'\r\n[global] config path: 'scripts' -/-> '/etc/mpv/scripts'\r\n[osc] loading mp.defaults\r\n[osc] loading @osc.lua\r\n[global] config path: 'lua-settings/osc.conf' -> '/home/william/.mpv/lua-settings/osc.conf'\r\n[cplayer] Run command: define-section, flags=0, args=[showhide, mouse_move script-binding osc/__keybinding1\r\n[cplayer] mouse_leave script-binding osc/__keybinding2\r\n[cplayer] , force]\r\n[cplayer] Run command: enable-section, flags=0, args=[showhide, allow-hide-cursor+allow-vo-dragging]\r\n[cplayer] Run command: define-section, flags=0, args=[input, mouse_btn0 script-binding osc/__keybinding3\r\n[cplayer] shift+mouse_btn0 script-binding osc/__keybinding4\r\n[cplayer] mouse_btn2 script-binding osc/__keybinding5\r\n[cplayer] mouse_btn0_dbl ignore\r\n[cplayer] shift+mouse_btn0_dbl ignore\r\n[cplayer] mouse_btn2_dbl ignore\r\n[cplayer] , force]\r\n[cplayer] Run command: enable-section, flags=0, args=[input, ]\r\n[cplayer] Run command: define-section, flags=0, args=[input_osc, del script-binding osc/__keybinding6\r\n[cplayer] , default]\r\n[cplayer] Run command: enable-section, flags=0, args=[input_osc, allow-hide-cursor+allow-vo-dragging]\r\n[cplayer] Run command: define-section, flags=0, args=[input_forced_osc, , force]\r\n[cplayer] Run command: enable-section, flags=0, args=[input_forced_osc, allow-hide-cursor+allow-vo-dragging]\r\n[cplayer] Done loading @osc.lua.\r\n[ytdl_hook] Loading script @ytdl_hook.lua...\r\n[global] config path: 'scripts' -> '/home/william/.mpv/scripts'\r\n[global] config path: 'scripts' -/-> '/etc/mpv/scripts'\r\n[ytdl_hook] loading mp.defaults\r\n[cplayer] Run command: disable-section, flags=0, args=[input]\r\n[global] config path: 'fonts' -/-> '/home/william/.mpv/fonts'\r\n[global] config path: 'fonts' -/-> '/etc/mpv/fonts'\r\n[osd/libass] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.27 (COMPLEX)\r\n[global] config path: 'subfont.ttf' -/-> '/home/william/.mpv/subfont.ttf'\r\n[global] config path: 'subfont.ttf' -/-> '/etc/mpv/subfont.ttf'\r\n[global] config path: 'fonts.conf' -/-> '/home/william/.mpv/fonts.conf'\r\n[global] config path: 'fonts.conf' -/-> '/etc/mpv/fonts.conf'\r\n[osd/libass] Setting up fonts...\r\n[ytdl_hook] loading @ytdl_hook.lua\r\n[cplayer] Run command: hook-add, flags=0, args=[on_load, 1, 10]\r\n[cplayer] Done loading @ytdl_hook.lua.\r\n[global] config path: 'scripts' -> '/home/william/.mpv/scripts'\r\n[global] config path: 'scripts' -/-> '/etc/mpv/scripts'\r\n[stats] Loading script /home/william/.mpv/scripts/stats.lua...\r\n[global] config path: 'scripts' -> '/home/william/.mpv/scripts'\r\n[global] config path: 'scripts' -/-> '/etc/mpv/scripts'\r\n[stats] loading mp.defaults\r\n[global] user path: '/home/william/.mpv/scripts/stats.lua' -> '/home/william/.mpv/scripts/stats.lua'\r\n[stats] loading file /home/william/.mpv/scripts/stats.lua\r\n[global] config path: 'lua-settings/stats.conf' -/-> '/home/william/.mpv/lua-settings/stats.conf'\r\n[global] config path: 'lua-settings/stats.conf' -/-> '/etc/mpv/lua-settings/stats.conf'\r\n[stats] lua-settings/stats.conf not found. \r\n[cplayer] Run command: define-section, flags=0, args=[input_stats, i script-binding stats/stats\r\n[cplayer] , default]\r\n[cplayer] Run command: enable-section, flags=0, args=[input_stats, allow-hide-cursor+allow-vo-dragging]\r\n[cplayer] Run command: define-section, flags=0, args=[input_forced_stats, , force]\r\n[cplayer] Run command: enable-section, flags=0, args=[input_forced_stats, allow-hide-cursor+allow-vo-dragging]\r\n[cplayer] Done loading /home/william/.mpv/scripts/stats.lua.\r\n[autocrop] Loading script /home/william/.mpv/scripts/autocrop.lua...\r\n[global] config path: 'scripts' -> '/home/william/.mpv/scripts'\r\n[global] config path: 'scripts' -/-> '/etc/mpv/scripts'\r\n[autocrop] loading mp.defaults\r\n[global] user path: '/home/william/.mpv/scripts/autocrop.lua' -> '/home/william/.mpv/scripts/autocrop.lua'\r\n[autocrop] loading file /home/william/.mpv/scripts/autocrop.lua\r\n[cplayer] Run command: define-section, flags=0, args=[input_autocrop, C script-binding autocrop/auto_crop\r\n[cplayer] , default]\r\n[cplayer] Run command: enable-section, flags=0, args=[input_autocrop, allow-hide-cursor+allow-vo-dragging]\r\n[cplayer] Run command: define-section, flags=0, args=[input_forced_autocrop, , force]\r\n[cplayer] Run command: enable-section, flags=0, args=[input_forced_autocrop, allow-hide-cursor+allow-vo-dragging]\r\n[cplayer] Done loading /home/william/.mpv/scripts/autocrop.lua.\r\n[autoload] Loading script /home/william/.mpv/scripts/autoload.lua...\r\n[global] config path: 'scripts' -> '/home/william/.mpv/scripts'\r\n[global] config path: 'scripts' -/-> '/etc/mpv/scripts'\r\n[autoload] loading mp.defaults\r\n[global] user path: '/home/william/.mpv/scripts/autoload.lua' -> '/home/william/.mpv/scripts/autoload.lua'\r\n[autoload] loading file /home/william/.mpv/scripts/autoload.lua\r\n[cplayer] Done loading /home/william/.mpv/scripts/autoload.lua.\r\n[global] config path: 'watch_later' -> '/home/william/.mpv/watch_later'\r\n[cplayer] Playing: http://www.thisamericanlife.org/play_full.php?play=1\r\n[cplayer] Running hook: ytdl_hook/on_load\r\n[global] config path: 'youtube-dl' -/-> '/home/william/.mpv/youtube-dl'\r\n[global] config path: 'youtube-dl' -/-> '/etc/mpv/youtube-dl'\r\n[osd/libass] Using font provider fontconfig\r\n[osd/libass] Done.\r\n[ytdl_hook] ERROR: requested format not available\r\n[ytdl_hook] youtube-dl failed, trying to play URL directly ... \r\n[cplayer] Run command: hook-ack, flags=0, args=[on_load]\r\n[ffmpeg] Opening http://www.thisamericanlife.org/play_full.php?play=1\r\n[ffmpeg] Could not set AVOption tls_verify='0'\r\n[ffmpeg] Mime-type: 'text/html; charset=utf-8'\r\n[ffmpeg] Stream opened successfully.\r\n[cache] Cache size set to 75032 KiB (75000 KiB backbuffer)\r\n[demux] Trying demuxers for level=normal.\r\n[cache] EOF reached.\r\n[lavf] No format found, try lowering probescore or forcing the format.\r\n[demux] Trying demuxers for level=unsafe.\r\n[lavf] No format found, try lowering probescore or forcing the format.\r\n[cache] Terminating cache...\r\n[cache] Cache exiting...\r\n[cplayer] finished playback, unrecognized file format (reason 4)\r\n[cplayer] Failed to recognize file format.\r\n[cplayer] \r\n[cplayer] \r\n[cplayer] Exiting... (Errors when loading file)\r\n[ytdl_hook] Exiting...\r\n[autoload] Exiting...\r\n[stats] Exiting...\r\n[autocrop] Exiting...\r\n[osc] Exiting...\r\n```\r\n\r\nMeanwhile, plain old `youtube-dl` can stream the resource fine:\r\n\r\n` $ youtube-dl -v http://www.thisamericanlife.org/play_full.php?play=1` yields:\r\n\r\n\r\n```\r\n[debug] System config: []\r\n[debug] User config: []\r\n[debug] Command-line args: [u'-v', u'http://www.thisamericanlife.org/play_full.php?play=1']\r\n[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8\r\n[debug] youtube-dl version 2016.06.03\r\n[debug] Python version 2.7.6 - Linux-3.16.0-73-generic-x86_64-with-Ubuntu-14.04-trusty\r\n[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, ffmpeg N-80026-g936751b, ffprobe N-80026-g936751b, rtmpdump 2.4\r\n[debug] Proxy map: {}\r\n[ThisAmericanLife] 1: Downloading webpage\r\nWARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.\r\n[debug] Invoking downloader on u'http://stream.thisamericanlife.org/1/stream/1_64k.m3u8'\r\n[hlsnative] Downloading m3u8 manifest\r\n[hlsnative] Total fragments: 376\r\n[download] Destination: 1 - New Beginnings-1.m4a\r\n[download]   0.0% of ~32.97MiB at Unknown speed ETA 19:21\r\n...\r\n[download] 100% of 32.94MiB in 00:22\r\n[ffmpeg] Fixing malformated aac bitstream in \"1 - New Beginnings-1.m4a\"\r\nWARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.\r\n[debug] ffmpeg command line: avconv -y -i 'file:1 - New Beginnings-1.m4a' -c copy -f mp4 -bsf:a aac_adtstoasc 'file:1 - New Beginnings-1.temp.m4a'\r\n```\r\n\r\nI can get it to work by playing the m3u8 resource URL extracted by `youtube-dl` directly in `mpv` (it still fails with `ytdl-hook`, works with the generic extractor), but this probably isn't the correct behavior.\r\n"},"comment":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/comments/226659119","html_url":"https://github.com/mpv-player/mpv/issues/3260#issuecomment-226659119","issue_url":"https://api.github.com/repos/mpv-player/mpv/issues/3260","id":226659119,"user":{"login":"wiiaboo","id":111605,"avatar_url":"https://avatars.githubusercontent.com/u/111605?v=3","gravatar_id":"","url":"https://api.github.com/users/wiiaboo","html_url":"https://github.com/wiiaboo","followers_url":"https://api.github.com/users/wiiaboo/followers","following_url":"https://api.github.com/users/wiiaboo/following{/other_user}","gists_url":"https://api.github.com/users/wiiaboo/gists{/gist_id}","starred_url":"https://api.github.com/users/wiiaboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiiaboo/subscriptions","organizations_url":"https://api.github.com/users/wiiaboo/orgs","repos_url":"https://api.github.com/users/wiiaboo/repos","events_url":"https://api.github.com/users/wiiaboo/events{/privacy}","received_events_url":"https://api.github.com/users/wiiaboo/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T01:31:48Z","updated_at":"2016-06-17T01:31:48Z","body":"Try setting ytdl-format to `bestvideo+bestaudio/best` instead of only `bestvideo+bestaudio`."}}
{"actor":{"display_login":"wiiaboo"}}