Streaming interruption issue - ffmpeg

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?

Related

FFMPEG udp stream to VLC

i've been trying to create a transport stream using FFMPEG, when i tried it in VLC it was working immediately, however when i stream from FFMPEG to VLC i can't get it to work, here's my string:
ffmpeg -re -i http://ip-of-shoutcast-stream:port?listen -c:a aac -b:a 128k -ar 44100 -ac 2 -vn -f mpegts udp://ip-of-destination-pc:1234?pkt_size=1316
In VLC i use the same network source i used when VLC was streaming in the main PC:
udp://ip-of-main-pc:1234
But it doesn't play or show any errors, the orange bar only goes back and forth endlessly.
What am i doing wrong in the FFMPEG and/or VLC side? It has to be FFMPEG since it's getting moved to a server.

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.

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).

Videos converted using FFMPEG do not have video duration information

I am using FFMPEG to convert uploaded videos to .flv, after conversion the flv video doesn't have information about it's duration. So the user cannot rewind/forward, replay or see a specific part of it. The code is as follows:
"ffmpeg -i $srcfile_path -s 320x240 -ar 44100 -b 2048k -r 12 $desfilepath";
Please help. Thanks in advance.
I ran the following command and it worked.
"ffmpeg -i $srcfile_path -f flv - | flvtool2 -U stdin $desfilepath"
This requires flvtool installed on your system. I am using an FFMPEG and FLVTOOL2 enabled server, so it worked.
That's very strange, I have been using ffmpeg to convert videos from one format to another without any issues. See example below:
ffmpeg -i input.avi -b:a 192K -b:v 2400 -s hd720 -c:v mpeg2video output.mpg
I am sure you know the syntax.

FMS FLV to mp3/aac/wav

How can I decode a FLV's audio if it's recorded from a live stream using Flash Media Server and uses NellyMoser codec?
I'm writing a script that process several FLVs, using FFmpeg, so I need a command line solution.
Any ideas?
This should work for you, since NellyMoser is supported by FFmpeg.
1. Using mp3
ffmpeg -i yourinput.flv -vn -acodec libmp3lame output.flv
2. Using AAC (switch aac with libfaac depending on which you have loaded)
ffmpeg -i yourinput.flv -vn -acodec libfaac output.mp4
I'm assuming of course you dont care about video.

Resources