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

Hitbox streams cannot be played #9348

Closed
gcat432 opened this issue Apr 29, 2016 · 8 comments
Closed

Hitbox streams cannot be played #9348

gcat432 opened this issue Apr 29, 2016 · 8 comments
Labels

Comments

@gcat432
Copy link

@gcat432 gcat432 commented Apr 29, 2016

Hitbox streams (at least) still cannot be played since the fix of issue #8217.

The error is the following:

$ mpv http://www.hitbox.tv/musify
Playing: http://www.hitbox.tv/musify
[ffmpeg] RTMP_ReadPacket, failed to read RTMP packet header
Failed to open rtmp://edge.live.hitbox.tv/live/musify.

The work around mpv $(youtube-dl -g "http://www.hitbox.tv/musify") produces the exact same output.

Here's the full output:

$ youtube-dl -v http://www.hitbox.tv/musify
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.hitbox.tv/musify']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.24
[debug] Python version 2.7.11 - Linux-4.5.2_1-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 2.8.6, ffprobe 2.8.6, rtmpdump 2.4
[debug] Proxy map: {}
[hitbox:live] musify: Downloading JSON metadata
[hitbox:live] musify: Downloading metadata JSON
[debug] Invoking downloader on u'rtmp://edge.live.hitbox.tv/live/musify'
[download] Destination: Musify - 24_7 Music and Gaming Stream Friendly 2016-04-29 12_58-musify.mp4
[debug] rtmpdump command line: rtmpdump --verbose -r rtmp://edge.live.hitbox.tv/live/musify -o 'Musify - 24_7 Music and Gaming Stream Friendly 2016-04-29 12_58-musify.mp4.part' --swfVfy http://www.hitbox.tv/static/player/flowplayer/flowplayer.commercial-3.2.16.swf --pageUrl http://www.hitbox.tv/musify --live
[rtmpdump] RTMPDump v2.4
[rtmpdump] (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
[rtmpdump] DEBUG: Parsing...
[rtmpdump] DEBUG: Parsed protocol: 0
[rtmpdump] DEBUG: Parsed host    : edge.live.hitbox.tv
[rtmpdump] DEBUG: Parsed app     : live
[rtmpdump] DEBUG: Protocol : RTMP
[rtmpdump] DEBUG: Hostname : edge.live.hitbox.tv
[rtmpdump] DEBUG: Port     : 1935
[rtmpdump] DEBUG: Playpath : musify
[rtmpdump] DEBUG: tcUrl    : rtmp://edge.live.hitbox.tv:1935/live
[rtmpdump] DEBUG: swfUrl   : http://www.hitbox.tv/static/player/flowplayer/flowplayer.commercial-3.2.16.swf
[rtmpdump] DEBUG: pageUrl  : http://www.hitbox.tv/musify
[rtmpdump] DEBUG: app      : live
[rtmpdump] DEBUG: live     : yes
[rtmpdump] DEBUG: timeout  : 30 sec
[rtmpdump] DEBUG: SWFSHA256:
[rtmpdump] DEBUG: 75 20 ee cf 7b 4f 33 46 25 47 28 ab 53 ad 99 c4
[rtmpdump] DEBUG: bd 80 0e 34 c7 8c cf 47 55 31 70 a0 98 6b 88 a3
[rtmpdump] DEBUG: SWFSize  : 259809
[rtmpdump] DEBUG: Setting buffer time to: 36000000ms
[rtmpdump] Connecting ...
[rtmpdump] DEBUG: RTMP_Connect1, ... connected, handshaking
[rtmpdump] DEBUG: HandShake: Client type: 03
[rtmpdump] DEBUG: HandShake: Client digest offset: 430
[rtmpdump] DEBUG: HandShake: Initial client digest: 
[rtmpdump] DEBUG: eb 98 a0 33 c7 1c ac 9c d4 90 5d ad b9 1f e8 59
[rtmpdump] DEBUG: 65 2d 5d b7 71 5d b2 a1 6c bf 69 be f7 e8 99 f5
[rtmpdump] DEBUG: HandShake: Type Answer   : 03
[rtmpdump] DEBUG: HandShake: Server Uptime : 1638655804
[rtmpdump] DEBUG: HandShake: FMS Version   : 13.14.10.13
[rtmpdump] DEBUG: HandShake: Calculated digest key from secure key and server digest: 
[rtmpdump] DEBUG: 70 50 86 76 4d d6 2e 74 15 e6 1e 61 81 84 8d 0c
[rtmpdump] DEBUG: 25 03 ac dc 3d bb 19 12 8d c8 20 c5 48 ac 77 10
[rtmpdump] DEBUG: HandShake: Client signature calculated:
[rtmpdump] DEBUG: 68 01 c8 82 b1 9f 1e 1c c4 5e 06 39 6c 2d 87 91
[rtmpdump] DEBUG: a6 82 20 4b ec 7e c3 77 54 ca c7 93 8d fa 1f 18
[rtmpdump] DEBUG: HandShake: Server sent signature:
[rtmpdump] DEBUG: 85 13 52 eb 0f fc 4e 57 35 9b 92 e7 bb 7d c1 4d
[rtmpdump] DEBUG: 71 31 5c 58 ba 21 92 a4 ee 20 60 ce 92 70 85 de
[rtmpdump] DEBUG: HandShake: Digest key: 
[rtmpdump] DEBUG: 69 99 d1 79 7a 50 8b 40 bb 90 18 b0 9b 38 95 c7
[rtmpdump] DEBUG: 90 b9 73 0c d3 19 cc e2 e9 ea 18 e8 15 17 7a 98
[rtmpdump] DEBUG: HandShake: Signature calculated:
[rtmpdump] DEBUG: 85 13 52 eb 0f fc 4e 57 35 9b 92 e7 bb 7d c1 4d
[rtmpdump] DEBUG: 71 31 5c 58 ba 21 92 a4 ee 20 60 ce 92 70 85 de
[rtmpdump] DEBUG: HandShake: Genuine Adobe Flash Media Server
[rtmpdump] DEBUG: HandShake: Handshaking finished....
[rtmpdump] DEBUG: RTMP_Connect1, handshaked
[rtmpdump] DEBUG: Invoking connect
[rtmpdump] INFO: Connected...
[rtmpdump] DEBUG: HandleServerBW: server BW = 5000000
[rtmpdump] DEBUG: HandleClientBW: client BW = 5000000 2
[rtmpdump] DEBUG: HandleChangeChunkSize, received: chunk size change to 16384
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 190 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:             fmsVer, STRING:  FMS/3,0,1,123>
[rtmpdump] DEBUG: Property: <Name:       capabilities, NUMBER:  31.00>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:              level, STRING:  status>
[rtmpdump] DEBUG: Property: <Name:               code, STRING:  NetConnection.Connect.Success>
[rtmpdump] DEBUG: Property: <Name:        description, STRING:  Connection succeeded.>
[rtmpdump] DEBUG: Property: <Name:     objectEncoding, NUMBER:  0.00>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_result>
[rtmpdump] DEBUG: HandleInvoke, received result for method call <connect>
[rtmpdump] DEBUG: sending ctrl. type: 0x0003
[rtmpdump] DEBUG: Invoking createStream
[rtmpdump] DEBUG: FCSubscribe: musify
[rtmpdump] DEBUG: Invoking FCSubscribe
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 29 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <_result>
[rtmpdump] DEBUG: HandleInvoke, received result for method call <createStream>
[rtmpdump] DEBUG: SendPlay, seekTime=0, stopTime=0, sending play: musify
[rtmpdump] DEBUG: Invoking play
[rtmpdump] DEBUG: sending ctrl. type: 0x0003
[rtmpdump] DEBUG: RTMP_ClientPacket, received: invoke 96 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: NULL
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: Property: <Name:              level, STRING:  status>
[rtmpdump] DEBUG: Property: <Name:               code, STRING:  NetStream.Play.Start>
[rtmpdump] DEBUG: Property: <Name:        description, STRING:  Start live>
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: HandleInvoke, server invoking <onStatus>
[rtmpdump] DEBUG: HandleInvoke, onStatus: NetStream.Play.Start
[rtmpdump] Starting Live Stream
[rtmpdump] DEBUG: RTMP_ClientPacket, received: notify 24 bytes
[rtmpdump] DEBUG: (object begin)
[rtmpdump] DEBUG: (object end)
[rtmpdump] DEBUG: RTMPSockBuf_Fill, recv returned -1. GetSockError(): 11 (Resource temporarily unavailable)
[rtmpdump] ERROR: RTMP_ReadPacket, failed to read RTMP packet header
[download] 0.00B at Unknown speed (00:32)
[rtmpdump] DEBUG: RTMP_Read returned: 0
[rtmpdump] Download may be incomplete (downloaded about 0.00%), try resuming
[rtmpdump] DEBUG: Closing connection.
[rtmpdump] DEBUG: Invoking deleteStream


ERROR: rtmpdump exited with code 2
  File "/usr/bin/youtube-dl", line 6, in <module>
    youtube_dl.main()
  File "/usr/lib/python2.7/site-packages/youtube_dl/__init__.py", line 419, in main
    _real_main(argv)
  File "/usr/lib/python2.7/site-packages/youtube_dl/__init__.py", line 409, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1732, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 684, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 729, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1378, in process_video_result
    self.process_info(new_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1640, in process_info
    success = dl(filename, info_dict)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1582, in dl
    return fd.download(name, info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/downloader/common.py", line 350, in download
    return self.real_download(filename, info_dict)
  File "/usr/lib/python2.7/site-packages/youtube_dl/downloader/rtmp.py", line 202, in real_download
    self.report_error('rtmpdump exited with code %d' % retval)
  File "/usr/lib/python2.7/site-packages/youtube_dl/downloader/common.py", line 161, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 547, in report_error
    self.trouble(error_message, tb)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 509, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

If I try other formats:

$ youtube-dl --list-formats http://www.hitbox.tv/musify
[hitbox:live] musify: Downloading JSON metadata
[hitbox:live] musify: Downloading metadata JSON
[info] Available formats for musify:
format code  extension  resolution note
0            mp4        unknown    360p  500k 
1            mp4        unknown    360p  500k 
2            mp4        unknown    360p  500k 
3            mp4        unknown    hitbox.tv  500k 
4            mp4        unknown    480p 1000k 
5            mp4        unknown    480p 1000k 
6            mp4        unknown    480p 1000k 
7            mp4        unknown    hitbox.tv 1000k 
8            mp4        unknown    720p 3500k 
9            mp4        unknown    720p 3500k 
10           mp4        unknown    720p 3500k 
11           mp4        unknown    hitbox.tv 3500k  (best)
$ mpv $(youtube-dl -g -f 8 "http://www.hitbox.tv/musify")
Playing: http://edge.hls.gcdn.co/hls/musify/index.m3u8?st=iVxshl67fA-cz544bmpieg;ci=cgxPmD2Pb_3HY_NCGplz5g
[ytdl_hook] ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[ytdl_hook] youtube-dl failed, trying to play URL directly ... 
[ffmpeg] http: HTTP error 404 Not Found
Failed to open http://edge.hls.gcdn.co/hls/musify/index.m3u8?st=iVxshl67fA-cz544bmpieg;ci=cgxPmD2Pb_3HY_NCGplz5g.

Linux Void x64 Cinnamon - Kernel version 4.5.2

@yan12125 yan12125 added bug and removed bug labels Apr 29, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 29, 2016

This is a user's page. You need to give concrete video URLs. For example http://www.hitbox.tv/video/835352.

@yan12125 yan12125 closed this Apr 29, 2016
@gcat432
Copy link
Author

@gcat432 gcat432 commented Apr 29, 2016

@yan12125 I'm sorry I chose the wrong example. The output is the same with a 24/7 live feed.
http://www.hitbox.tv/csgobattle

$ youtube-dl --list-formats http://www.hitbox.tv/csgobattle
[hitbox:live] csgobattle: Downloading JSON metadata
[hitbox:live] csgobattle: Downloading metadata JSON
[info] Available formats for csgobattle:
format code  extension  resolution note
0            mp4        unknown    Source 3500k 
1            mp4        unknown    Source 3500k 
2            mp4        unknown    hitbox.tv 3500k  (best)

Format code 1 works:

$ mpv $(youtube-dl -g -f 1 "http://www.hitbox.tv/csgobattle")
Playing: http://edge.hls.hitbox.tv/hls/ll/csgobattle/index.m3u8?st=QAEbxX5vhax0POn4BIKgqw;ci=cgxPmD2Pb_3HY_NCGplz5g
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (aac)
AO: [pulse] 48000Hz stereo 2ch float
VO: [opengl] 1280x720 yuv420p
AV: 00:00:02 A-V:  0.000 Cache:  0s+0KB

Format code 2 doesn't work:

$ mpv $(youtube-dl -g -f 2 "http://www.hitbox.tv/csgobattle")
Playing: rtmp://edge.live.hitbox.tv/live/csgobattle
[ffmpeg] RTMP_ReadPacket, failed to read RTMP packet header
Failed to open rtmp://edge.live.hitbox.tv/live/csgobattle.
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 29, 2016

I didn't see any live stream on http://www.hitbox.tv/musify in Firefox. Can you post a screenshot?

@gcat432
Copy link
Author

@gcat432 gcat432 commented Apr 29, 2016

@yan12125 Yes, sorry, see my edited comment above.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 29, 2016

RTMP direct links usually fails. Please install rtmpdump and use the following command:

youtube-dl -v -f 2 "http://www.hitbox.tv/csgobattle"

And then you can watch it with mpv:

$ mpv CSGOBattle.com\ -\ Bet\ on\ LIVE\ 1v1\ Bot\ matches\ 2016-04-29\ 19_39-csgobattle.mp4.part 
Playing: CSGOBattle.com - Bet on LIVE 1v1 Bot matches 2016-04-29 19_39-csgobattle.mp4.part
 (+) Video --vid=1 (h264)
 (+) Audio --aid=1 (aac)
libEGL warning: DRI2: failed to authenticate
[vo/opengl] Suspected software renderer or indirect context.
[vo/opengl] Suspected software renderer or indirect context.
AO: [pulse] 48000Hz stereo 2ch float
VO: [vdpau] 1280x720 yuv420p
AV: 00:00:02 (15%) A-V:  0.000
@gcat432
Copy link
Author

@gcat432 gcat432 commented Apr 29, 2016

@ryandesign rtmpdump is installed, see the debug log:

[debug] exe versions: ffmpeg 2.8.6, ffprobe 2.8.6, rtmpdump 2.4

And anyway from my packages manager's list of installed packages:

ii rtmpdump-2.4_12 Toolkit for RTMP streams

I know about this command because I wrote it in the my comment. The fact is that should work directly I think, like any other youtube-dl supported service with the mpv direct command.

mpv https://www.twitch.tv/esl_csgo
mpv https://gaming.youtube.com/watch?v=xrgHvhx0Eq8

This is clearly a regression since december 2015.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 29, 2016

If you're using the command mpv http://www.hitbox.tv/csgobattle to play the video directly, go to https://github.com/mpv-player/mpv and report that RTMP support is not complete in ytdl_hook.

@gcat432
Copy link
Author

@gcat432 gcat432 commented Apr 29, 2016

@yan12125 Alright, I thought that was a problem from youtube-dl. I will do, thank you!

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
2 participants
You can’t perform that action at this time.