Opened 12 years ago

Closed 12 years ago

#797 closed defect (duplicate)

rtmp live streaming (input) to ffmpeg indefintely loops waiting on input

Reported by: quandt Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When you try to take input from a live rtmp source, ffmpeg and ffplay either don't connect or take an extraordinary amount of time to begin processing data (1-10 minutes, or never).

command line example is:
ffplay -i "rtmp://localhost/oflaDemo/mywebcam live=1"

This has been tested against red5 flv server, R4305 It has also been previously reported as a feature request (erroneously reported, and erroneously close ) in ticket

https://ffmpeg.org/trac/ffmpeg/ticket/138

I have also added several notes and reopened that ticket as well towards this problem. Additionally I can make available a RED5 server in a public DNS to test against to see the problem easily, please email me at brian dot quandt @ gmail dot com

Other notes,
1) rtmp streaming of non-live content, ie
ffplay "rtmp://localhost/oflaDemo/avatar.flv" work just great!

2) there is a minor bug in librtmp in sending FCPublish requests to the RED5 server, RED5 apparantly does not support this method, but it does not prevent live connections from working, ie rtmpdump -v -r "rtmp://localhost/oflaDemo/mywebcam" -o sav.flv does create a file without any delay

3) this rtmpdump method works

  1. rtmpdump -v -r rtmp://localhost/oflaDemo/mywebcam -o sav.flv
  2. control C (a) and then "cat sav.flv | ffplay -i - "

4) this rtmpdump method does not work (ie piped directly)

rtmpdump -v -r rtmp://localhost/oflaDemo/mywebcam | ffplay -i -

Or at least (4) most of the time does not work, occassionally after many minutes it does start to work.

Attachments (1)

typescript.txt (8.5 KB ) - added by quandt 12 years ago.
log of ffmpeg live RED5 input

Download all attachments as: .zip

Change History (4)

comment:1 by Carl Eugen Hoyos, 12 years ago

Priority: importantnormal

Do you think this is a regression?

Command line and complete, uncut console output missing.

Please provide a link to test.

by quandt, 12 years ago

Attachment: typescript.txt added

log of ffmpeg live RED5 input

comment:2 by quandt, 12 years ago

Full details are copied in reopened "feature" bug report

https://ffmpeg.org/trac/ffmpeg/ticket/138

But I'm including the text here as well per your note.

I don't necessarily think it is a regression because things seem to work fine against other streaming servers and I suspect noone ever tested against live content from RED5. But of course have tested stored content from it, and other servers.

so command line is
ffmpeg -i "rtmp://localhost/oflaDemo/mywebcam live=1" out.flv or
rtmpdump -v -r rtmp://localhost/oflaDemo/mywebcam" | ffmpeg -i - out.flv

Again, I do have a public server up and running right this instant to test against, just have to ask me to start it up ( brian dot quandt @ gmail dot com ) . Steps to reproduce are:

1) browse to red5 server
http://red5servip:5080/demos/publisher.html

2) connect to rtmp server (change localhost to red5servip)
3) click on video tab, select your webcam, accept flash security prompt
4) click on publish button to make stream available to others (name it something you remember like webcam)
5) go to a terminal window and try

5a) rtmpdump -v -r rtmp://red5servip/oflaDemo/webcam -o out.flv (this works)
5b) ffplay -i "rtmp://red5servip/oflaDemo/webcam live=1" this hangs for a long time and maybe will start working after man minutes

comment:3 by Carl Eugen Hoyos, 12 years ago

Resolution: duplicate
Status: newclosed

Iiuc, this is a duplicate of ticket #138.

Note: See TracTickets for help on using tickets.