FFMPEG RTMP streaming to WOWZA server with credentials - ffmpeg

I would like to stream my webcam using FFMPEG (on Windows) to a Wowza server.
The Wowza server has several applications defined.
Each has its own credentials (user name and password).
I'm using the following command line:
ffmpeg -f dshow -i video="Integrated Webcam" -s 512x288 -vcodec libx264 -b:v 1024k -pix_fmt yuv420p -f flv rtmp://<wowza server address>:1935/appname/streamname
Yet the Wowza server fails to get the stream.
What am I missing here?
Should I add the credentials to Wowza's applications? If so, what is the URL format that will allow me to do so?
Thanks.

Replace the url with this
rtmp://username:password#:1935/appname/streamname

Related

Stream RTSP from ONVIF general camera to Youtube

I have a wifi camera that uses RTSP/ONVIF protocol and after reading FFMPEG docs and some threads at Google I am trying to broadcast the stream to Youtube. So I started a broadcast at youtube and in my computer in ffmpeg I executed this command:
ffmpeg -f lavfi -i anullsrc -rtsp_transport udp -i rtsp://200.193.21.176:6002/onvif1 -tune zerolatency -vcodec libx264 -t 12:00:00 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://x.rtmp.youtube.com/live2/private_key
The command above looks like it's correct cause it ouputs constantly something like this:
The problem is that at YOUTUBE it still says I am offline. Why?
Try replace first part to: ffmpeg -re -i somefile.mp4, so you will to know, if here any problems with your camera or not.
ffmpeg and VLC very similar and even uses same code for codecs. But RTSP it handles differently. But try just ffmpeg -i rtsp://200.193.21.176:6002/onvif1 and nothing more as source.

Wowza RTMP to RTSP

We're using a Raspicam to stream live video to a client using Wowza Streaming Engine. We use FFMPEG to encode and send to Wowza and we can succesfully watch the RTMP stream using JWPlayer. This is the FFMPEG command used:
ffmpeg -t 0 -s 320x240 -f video4linux2 -i /dev/video0 -b:v 250k -tune zerolatency -preset ultrafast -f flv -r 15 rtmp://wowzaaddress:1935/live/live
To be able to watch the stream on mobile devices we want to use RTSP or HLS which Wowza provides links to, however when we use those links (provided on the Test Player) nothing happens and we can't even open them to test for example in VLC. We have already added the extra ports on our web server to see if that was the problem and still didn't work.
Does anybody know what the problem is or what could we be doing wrong?

Simple RTMP webcam script?

Okay I have a rtmp server is there a simple webcam script which I can use to broadcast a webcam to this server I have tried numerous scripts found online however these don't work. I have also asked questions on these scripts I have found online through this forum however haven't had any luck resolving the issues I had with them. Basically I'm after a script which allows a user to broadcast their webcam to an RTMP server. I can provide a rtmp address to test out the script if you can provide one.
Thankyou for any help
If you have FFMPEG installed on your computer...
Here is a quick Windows guide (VFW capture method) :
http://ffmpeg.gusari.org/viewtopic.php?f=25&t=13
If you get a list (first code) with device availble and then it also makes an MP4 test file (second code) then you are ready.
However they recommend using DShow instead of VFW:
see: https://trac.ffmpeg.org/wiki/DirectShow
If you run ffmpeg -list_devices true -f dshow -i dummy in the command prompt you will get a list of devices. One those listed should say "something camera". example output looks like: [dshow # 03ACF580] "Integrated Camera"
Test that "Integrated Camera" with this command:
ffmpeg -f dshow -i video="Integrated Camera" out.mp4
Use a command like this below to send to RTMP server (you must be logged in there too)
ffmpeg -f dshow -i video="Integrated Camera" -acodec aac -ac 2 -strict experimental -ab
160k -vcodec libx264 -preset slow -profile:v baseline -level 30
-maxrate 10000000 -bufsize 10000000 -b 1000k -f flv rtmp://yourRTMPServer/Type/yourStreamName
replace Type in the link with your stream type (eg: live or VOD or Play or whatever your full RTMP link is written. You did not say so I can only guess its one of these three types).

Wowza error :Failed to play myStream; stream not found.

i am using ffmpeg for encoding a video which will then be restreamed using wowza.i am new to streaming.first i started wowza using command
/etc/init.d/WowzaMediaServer start
after that i start streaming a MP4 file using rtsp protocol.i used the command
ffmpeg -re -i /usr/local/WowzaMediaServer/content/sample.mp4 -acodec libfdk_aac -vcodec libx264 -f rtsp -muxdelay 0.1 rtsp://myuser:mypassword#127.0.0.1:1935/live/myStream.sdp
video start streaming before all of these i changed admin.password and added a username as myuser and password as mypassword when i run above command its streaming but after that they say go to
WowzaMediaServer/examples/LiveVideoStreaming/FlashRTMPPlayer/Player.html
and fill server with rtmp://localhost:1935/live
and Stream field with myStream
when i click on connect its giving me status
"Failed to play myStream; stream not found."
i am following this article http://www.wowza.com/forums/content.php?354-How-to-set-up-live-streaming-using-an-RTSP-RTP-based-encoder
where i am wrong i dont know.i am unable to figure it out. from wowza support team i am not getting satisfactory answers .so someone work on wowza please help me!!why i am not able to connect my video stream to wowza.Please respond stuck badly.
So it appears there are some basic issues with the rtsp from ffmpeg and then no matches to the play request
You have
ffmpeg -re -i /usr/local/WowzaMediaServer/content/sample.mp4 -acodec libfdk_aac -vcodec libx264 -f rtsp -muxdelay 0.1 rtsp://myuser:mypassword#127.0.0.1:1935/live/myStream.sdp
You need to make sure your ffmpeg has libx264 and libfdk_aac plugins available. You should be able to determine this with just
ffmpeg
and it should print out the libraries available.
If you have all the libraries then you are publishing a stream called
myStream.sdp
You then have instructions that say
and fill server with rtmp://localhost:1935/live
and Stream field with myStream
So you should either change your ffmpeg command to
ffmpeg -re -i /usr/local/WowzaMediaServer/content/sample.mp4 -acodec libfdk_aac -vcodec libx264 -f rtsp -muxdelay 0.1 rtsp://myuser:mypassword#127.0.0.1:1935/live/myStream
Note no .sdp in the stream name any more or use a Stream field in the player of
myStream.sdp
When publishing a stream and then attempting to play it back they must match, otherwise you get back Stream Not Found.
One way to successfully do this is to specify only the port number (65000 in this example), making sure it isn't 1935 and server in your ffmpeg command then create a mystream.stream file in your content directory of your Wowza server with ONLY the following line:
udp://0.0.0:65000
Then, in Wowza/conf/startupstreams.xml, add the following:
<!-- Native RTP example (SDP file is myStream.sdp) -->
<StartupStream>
<Application>live/_definst_</Application>
<MediaCasterType>rtp</MediaCasterType>
<StreamName>mystream.stream</StreamName>
</StartupStream>
Restart wowza and ffmpeg and then re-try your url in with the stream name mystream.stream.

Streaming interruption issue

I am trying to send audio/video streams to justin.tv using the following command:
ffmpeg -i Engl_01.avi -re -acodec copy -ar 22050 -vcodec libx264 -f flv rtmp://live.justin.tv/app/live_.....
It works well for Linux but doesn't work under MS Windows 7: the site (justin.tv) shows me a movie with interruptions, why is this? Is there any option allowing ffmpeg to fix this problem for Windows?

Resources