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

FilmOn Social TV: Adding support for live video #225

Merged
merged 1 commit into from Nov 17, 2013

Conversation

Projects
None yet
2 participants
@john-peterson
Contributor

john-peterson commented Nov 17, 2013

FilmOn Social TV: Adding support for live video

Problem

This command

livestreamer filmon.us/alkidavid

return

error: No plugin can handle URL: filmon.us/alkidavid

Solution

Adding support for http://www.filmon.us/channels

Exception

Non-existing channel name

The URL http://filmon.us/no_channel return the same page as http://filmon.us/alkidavid rather than a 404

This command

livestreamer filmon.us/no_channel

return

error: No streams found on this URL: filmon.us/no_channel

by reading the channel name in this meta property

<meta property="og:url" content="http://www.filmon.us/alkidavid" />

because

  • it's less confusing for the user that a non-existing channel return an error rather than the default channel "alkidavid"

Live

RTMP and SWF URL

Default URL

The values

RTMP_URL = "rtmp://204.107.26.73/battlecam"
SWF_URL = "http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf"

are in this packet

3167    6.144329000 192.168.5.130   204.107.26.73   RTMP    2009    Handshake C2 | connect('battlecam/')

The value

playpath = "mp4:bc_" + room_id

is in this packet

3533    7.052663000 192.168.5.130   204.107.26.73   RTMP    101 play('mp4:bc_3195397')

These packets are dentified with the Wireshark display filter

tcp.port == 1935

Alternative URL

There's no known alternative RTMP or SWF URL or a known API page that return the RTMP or SWF URL

The API page http://www.filmon.us/ajax accept these "action" requests

{"has_webcam":"0","room_id":"3195397","id":1,"controller":"broadcast","action":"userWebcamAvailabilityStatusUpdate"}
{"last_msg_id":0,"online_users":0,"room_id":"3195397","divId":1,"id":2,"controller":"broadcast","action":"getNewMessages"}

identified with the Wireshark display filter

http

but there's not a known request that return a RTMP or SWF URL

Quality

The channel quality is called "default" because

  • there are no known alternative channel qualities

Plugin name

The plugin name for the filmon.us streaming service should be

filmon.py (Filmon) rather than filmon_us.py (Filmon_us) because

  • filmon.us share server or code with filmon.com

filmon_us.py (Filmon_us) rather than battlecam.py (Battlecam) because

  • it's called FilmOn Social TV since 2011. In a link at FilmOn that return a page with the title FilmOn rather than Battlecam
  • FilmOn Social TV is a newer name for the service than Battlecam

battlecam.py (Battlecam) because

  • it was called Battlecam when created in 2010
@chrippa

This comment has been minimized.

Show comment
Hide comment
@chrippa

chrippa Nov 17, 2013

Owner

It seems like channels that are in "replay" mode return a stream that does not return any data. Would it be possible to either support the "replay" video stream or simply return no streams on such channels?

Owner

chrippa commented Nov 17, 2013

It seems like channels that are in "replay" mode return a stream that does not return any data. Would it be possible to either support the "replay" video stream or simply return no streams on such channels?

chrippa added a commit that referenced this pull request Nov 17, 2013

Merge pull request #225 from john-peterson/filmon
Adding FilmOn Social TV channel support

@chrippa chrippa merged commit 27a3ff9 into chrippa:develop Nov 17, 2013

1 check passed

default The Travis CI build passed
Details
@john-peterson

This comment has been minimized.

Show comment
Hide comment
@john-peterson

john-peterson Dec 12, 2013

Contributor

FilmOn Social TV: Identify replay mode

Problem

Would it be possible to either support the "replay" video stream or simply return no streams on such channels?

This message describe that trying to play a channel that's in replay mode

python -c "import livestreamer_cli.main; livestreamer_cli.main.main()" filmon.us/evilfilthylove worst
[cli][info] Opening stream: default
[cli][error] Failed to read data from stream: Read timeout

should return an error immediately rather than stall until a timeout

This problem can't be solved easily because there's not information in a replay channel page

curl http://www.filmon.us/pricelessone_p1 > pricelessone_p1_replay.html

that identify the channel as being non-live

Replay mode

That a channel is in replay mode mean

  • it's not live
  • it play a playlist of history videos and site-wide videos that promote the site

It's not known if replay videos are played through

It's probable that it's the latter rather than the previous because

  • the RTMP streams shown in Wireshark can't be played in rtmpdump

RTMP and SWF URL

Would it be possible to either support the "replay" video stream …

No, because the RTMP streams shown in Wireshark can't be played in rtmpdump

A replay mode channel return this in Wireshark

3586    7.770991000 192.168.5.130   204.107.26.72   RTMP    2017    Handshake C2 | connect('battlecam/')
Property 'tcUrl' String 'rtmp://204.107.26.72/battlecam/'
Property 'swfUrl' String 'http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42'

4019    8.899760000 192.168.5.130   204.107.26.72   RTMP    101 play('mp4:bc_3275555')

4739    11.972321000    192.168.5.130   204.107.26.72   RTMP    2017    Handshake C2 | connect('battlecam/')
Property 'swfUrl' String 'http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42'
Property 'tcUrl' String 'rtmp://204.107.26.72/battlecam/'

2021    8.546018000 192.168.5.130   204.107.26.72   RTMP    2017    Handshake C2 | connect('battlecam/')
Property 'swfUrl' String 'http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42'
Property 'tcUrl' String 'rtmp://204.107.26.72/battlecam/'

4864    12.878280000    192.168.5.130   204.107.26.72   RTMP    98  play('bc_3275555o')
4866    12.878416000    192.168.5.130   204.107.26.72   RTMP    98  play('bc_3275555s')

but these streams can't be played with rtmpdump because the commands

swfUrl="http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42"
rtmpdump -r "rtmp://204.107.26.72/battlecam/bc_3275555o" -W "$swfUrl" -V -b 0 -o video.flv

don't return video

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
...
DEBUG: SendPlay, seekTime=0, stopTime=0, sending play: bc_3275555o
DEBUG: Invoking play
DEBUG: sending ctrl. type: 0x0003
Contributor

john-peterson commented Dec 12, 2013

FilmOn Social TV: Identify replay mode

Problem

Would it be possible to either support the "replay" video stream or simply return no streams on such channels?

This message describe that trying to play a channel that's in replay mode

python -c "import livestreamer_cli.main; livestreamer_cli.main.main()" filmon.us/evilfilthylove worst
[cli][info] Opening stream: default
[cli][error] Failed to read data from stream: Read timeout

should return an error immediately rather than stall until a timeout

This problem can't be solved easily because there's not information in a replay channel page

curl http://www.filmon.us/pricelessone_p1 > pricelessone_p1_replay.html

that identify the channel as being non-live

Replay mode

That a channel is in replay mode mean

  • it's not live
  • it play a playlist of history videos and site-wide videos that promote the site

It's not known if replay videos are played through

It's probable that it's the latter rather than the previous because

  • the RTMP streams shown in Wireshark can't be played in rtmpdump

RTMP and SWF URL

Would it be possible to either support the "replay" video stream …

No, because the RTMP streams shown in Wireshark can't be played in rtmpdump

A replay mode channel return this in Wireshark

3586    7.770991000 192.168.5.130   204.107.26.72   RTMP    2017    Handshake C2 | connect('battlecam/')
Property 'tcUrl' String 'rtmp://204.107.26.72/battlecam/'
Property 'swfUrl' String 'http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42'

4019    8.899760000 192.168.5.130   204.107.26.72   RTMP    101 play('mp4:bc_3275555')

4739    11.972321000    192.168.5.130   204.107.26.72   RTMP    2017    Handshake C2 | connect('battlecam/')
Property 'swfUrl' String 'http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42'
Property 'tcUrl' String 'rtmp://204.107.26.72/battlecam/'

2021    8.546018000 192.168.5.130   204.107.26.72   RTMP    2017    Handshake C2 | connect('battlecam/')
Property 'swfUrl' String 'http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42'
Property 'tcUrl' String 'rtmp://204.107.26.72/battlecam/'

4864    12.878280000    192.168.5.130   204.107.26.72   RTMP    98  play('bc_3275555o')
4866    12.878416000    192.168.5.130   204.107.26.72   RTMP    98  play('bc_3275555s')

but these streams can't be played with rtmpdump because the commands

swfUrl="http://www.filmon.us/application/themes/base/flash/broadcast/VideoChatECCDN_debug_withoutCenteredOwner.swf?v=42"
rtmpdump -r "rtmp://204.107.26.72/battlecam/bc_3275555o" -W "$swfUrl" -V -b 0 -o video.flv

don't return video

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
...
DEBUG: SendPlay, seekTime=0, stopTime=0, sending play: bc_3275555o
DEBUG: Invoking play
DEBUG: sending ctrl. type: 0x0003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment