aldofle / media-translate

Automatically exported from code.google.com/p/media-translate
0 stars 0 forks source link

RTMPT поток #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Подскажите пожалуйста, могу ли я 
проигрывать на плеере ссылки вида
rtmpt://109.68.40.66/sport-redir/sport2.flv

Я вставил следующий код в etc-playlists-tv-ras_list.rss  :

<item>
    <title>Sport2</title>
    <ext>flv</ext>
    <protocol>rtmpt</protocol>
    <location>rtmpt://109.68.40.66/sport-redir/sport2.flv</location>
    <stream_url>rtmpt://109.68.40.66/sport-redir/sport2.flv</stream_url>
    <stream_class>video</stream_class>
    <stream_server>_empty_</stream_server>
    <stream_type>video/x-flv</stream_type>
    <stream_protocol>rtmpt</stream_protocol>
  </item>

Пишет - "Не может воспроизвести этот файл".

translate.conf :

BASEPATH=/usr/local/etc/translate
export AWKPATH=$BASEPATH/lib:.

WGET=/usr/bin/wget

STARTPOINT=$BASEPATH/etc/index.m3u
XSPFSCAN=$BASEPATH/etc/xspf.scan

MAINMENU=$BASEPATH/etc/menu/main.xspf
CACHEPATH=/tmp/cached

YOUTUBE_HD=yes
VIMEO_HD=yes
IVI_HD=yes
TVIGLE_HD=yes

NET_BANDWIDTH=

UDPXY_URL=http://127.0.0.1:8080/

TRANSLATE_CGI=http://127.0.0.1/cgi-bin/translate?
LOCALE=ru

CURL=/usr/local/etc/translate/bin/curl
MSDL=/usr/local/etc/translate/bin/msdl
XSLTPROC=/usr/local/etc/translate/bin/xsltproc

RTMPDUMP=/usr/local/etc/translate/bin/rtmpdump

Спасибо!

Original issue reported on code.google.com by 2045...@gmail.com on 1 May 2011 at 10:25

GoogleCodeExporter commented 9 years ago
так не получится. rtmpdump установите на комп и 
посмотрите что происходит.

rtmpdump -r rtmpt://109.68.40.66/sport-redir/sport2.flv -o /dev/null -V
...
... redirect, STRING:   rtmpt://109.68.40.67:1935/sport
...
rtmpdump -r rtmpt://109.68.40.66/sport-redir/sport2.flv.flv -o /dev/null -t 
rtmpt://109.68.40.67:1935/sport -a sport -V

Original comment by nnb1...@gmail.com on 1 May 2011 at 12:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Выполнил:

/usr/local/etc/translate/bin/rtmpdump -r 
rtmpt://109.68.40.66/sport-redir/sport2.flv.flv -o /dev/null -t 
rtmpt://109.68.40.67:1935/sport -a sport -V
RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Protocol : RTMPT
DEBUG: Hostname : 109.68.40.66
DEBUG: Port     : 80
DEBUG: Playpath : sport2.flv
DEBUG: tcUrl    : rtmpt://109.68.40.67:1935/sport
DEBUG: app      : sport
DEBUG: live     : no
DEBUG: timeout  : 30 sec
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
ERROR: RTMP_Connect1, handshake failed.
DEBUG: Closing connection.

Чтобы это значило?

Original comment by 2045...@gmail.com on 1 May 2011 at 12:40

GoogleCodeExporter commented 9 years ago
совсем забыл что у rtmpdump и flvstreamer поведение 
разное.
flvstreamer попробуйте.

Original comment by nnb1...@gmail.com on 1 May 2011 at 4:45

GoogleCodeExporter commented 9 years ago
Попробовал. Вот что выдает:

#/usr/local/etc/translate/bin/flvstreamer -r 
rtmpt://109.68.40.66/sport-redir/sport2.flv.flv -o /dev/null -t 
rtmpt://109.68.40.67:1935/sport -a sport -V
FLVStreamer v2.1c1
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Protocol : RTMPT
DEBUG: Hostname : 109.68.40.66
DEBUG: Port     : 1935
DEBUG: Playpath : sport2.flv
DEBUG: tcUrl    : rtmpt://109.68.40.67:1935/sport
DEBUG: swfUrl   : (null)
DEBUG: pageUrl  : (null)
DEBUG: app      : sport
DEBUG: auth     : (null)
DEBUG: subscribepath : (null)
DEBUG: flashVer : LNX 10,0,22,87
DEBUG: live     : no
DEBUG: timeout  : 120 sec
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Type Answer   : 03
DEBUG: HandShake: Server Uptime : 96850052
DEBUG: HandShake: FMS Version   : 3.0.1.1
DEBUG: RTMP_Connect1, handshaked
DEBUG: Invoking connect
INFO: Connected...

DEBUG: HandleServerBW: server BW = 2500000
DEBUG: HandleClientBW: client BW = 2500000 2
DEBUG: HandleCtrl, received ctrl. type: 0, len: 6
DEBUG: HandleCtrl, Stream Begin 0
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
DEBUG: RTMP_ClientPacket, received: invoke 259 bytes
DEBUG: (object begin)
DEBUG: (object begin)
DEBUG: Property: <Name:                    fmsVer, STRING:      FMS/3,5,4,210>
DEBUG: Property: <Name:              capabilities, NUMBER:      31.00>
DEBUG: Property: <Name:                      mode, NUMBER:      1.00>
DEBUG: (object end)
DEBUG: (object begin)
DEBUG: Property: <Name:                     level, STRING:      status>
DEBUG: Property: <Name:                      code, STRING:      
NetConnection.Connect.Success>
DEBUG: Property: <Name:               description, STRING:      Connection 
succeeded.>
DEBUG: Property: <Name:                      data, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name:                   version, STRING:      3,5,4,210>
DEBUG: (object end)
DEBUG: Property: <Name:                  clientid, NUMBER:      250477886.00>
DEBUG: Property: <Name:            objectEncoding, NUMBER:      0.00>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <connect>
DEBUG: sending ctrl. type: 0x0003
DEBUG: Invoking createStream
DEBUG: RTMP_ClientPacket, received: invoke 29 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <createStream>
DEBUG: SendPlay, seekTime=0.00, dLength=0, sending play: sport2.flv
DEBUG: Invoking play
DEBUG: sending ctrl. type: 0x0003
DEBUG: RTMP_ClientPacket, received: invoke 185 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name:                     level, STRING:      status>
DEBUG: Property: <Name:                      code, STRING:      
NetStream.Play.UnpublishNotify>
DEBUG: Property: <Name:               description, STRING:      
rtmp://94.27.13.114:1935/live/_definst_/sport2.flv is now unpublished.>
DEBUG: Property: <Name:                  clientid, NUMBER:      250477886.00>
DEBUG: (object end)
DEBUG: (object end)

DEBUG: HandleInvoke, server invoking <onStatus>
DEBUG: HandleInvoke, onStatus: NetStream.Play.UnpublishNotify
DEBUG: HandleCtrl, received ctrl. type: 6, len: 6
DEBUG: HandleCtrl, Ping 21203
DEBUG: sending ctrl. type: 0x0007
DEBUG: RTMP_ClientPacket, received: invoke 185 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name:                     level, STRING:      status>
DEBUG: Property: <Name:                      code, STRING:      
NetStream.Play.UnpublishNotify>
DEBUG: Property: <Name:               description, STRING:      
rtmp://94.27.13.114:1935/live/_definst_/sport2.flv is now unpublished.>
DEBUG: Property: <Name:                  clientid, NUMBER:      250477886.00>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <onStatus>
DEBUG: HandleInvoke, onStatus: NetStream.Play.UnpublishNotify

Original comment by 2045...@gmail.com on 1 May 2011 at 4:59

GoogleCodeExporter commented 9 years ago
Меня смутила строка: 
DEBUG: Property: <Name:               description, STRING:      
rtmp://94.27.13.114:1935/live/_definst_/sport2.flv is now unpublished.>

Установил Desktop Player, в настройках указал:

<playlist version="1" xmlns="http://xspf.org/ns/0/">
<tracklist>
<track><title>Sport2</title>
<location>sport2.flv</location><meta 
rel="streamer">rtmpt://109.68.40.66/sport-redir/</meta>
</track>
</playlist>

Ссылка работает без проблем.

Original comment by 2045...@gmail.com on 1 May 2011 at 5:03

GoogleCodeExporter commented 9 years ago
я надеюсь вы обратили внимание, на то что 
flvstreamer и rtmpdump по разному обрабатывают rtmpt.
но видимо, всеже как то не так, как надо. 

Original comment by nnb1...@gmail.com on 1 May 2011 at 7:15

GoogleCodeExporter commented 9 years ago
Разобрался. Получилось после того, как в 
плейлисте указал ссылку на rtmp поток с 
портом 1935. Получается, что программа 
(flvstreamer) не умеет переадресовывать 
автоматически на нужный поток с той ссылки, 
которая указана в html коде сайта (в нашем 
случае rtmpt://109.68.40.66/sport-redir/sport2.flv)?

Я прав?

Original comment by 2045...@gmail.com on 2 May 2011 at 9:38

GoogleCodeExporter commented 9 years ago
как реализована поддержка rtmpt в flvstreamer и 
rtmpdump я подробно не разбирался.
но и от того как сервер реализован тоже 
есть зависимость.

а так да, самое верное указать ссылку на 
поток с медиа, а не ссылку на ссылку.
кстати, какой url получился?

Original comment by nnb1...@gmail.com on 2 May 2011 at 10:20

GoogleCodeExporter commented 9 years ago
Получился rtmp://94.27.13.114:1935/live/_definst_/sport2.flv.

Original comment by 2045...@gmail.com on 2 May 2011 at 10:53