-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Perfect FFMPEG configuration to publish on RTMP Nginx #758
Comments
try this
Replace /opt/ffmpeg/bin/ffmpeg with the actual absolute path to your ffmpeg executable. |
Hi sceptic, thanks for your hint. I configured it like that:
I just hide my real domain for security reason. Now, if i download the result flv file from /tmp/av, i can correctly play it (i also fixed audio problem from my Android client) with no freezeing, UNLESS i try to move the VLC cursor and change video position! Instead, if i open the RTMP stream directly, VLC buffer bar seems to continuously try to buffer something, but never play it. My bandwith sould be good enough to publish and play from the same connection, (20 Mbit, 8 Mbit down/up), but nothing. Could it be a keyframe problem? Does VLC search for keyframes to start the stream? Maybe i still have problems on input stream? |
Well from what i have tested so far, vlc screws everything up when it comes to speed. My streams play really really slow in vlc and some times i see flickering, but my steam runs perfectly on browser. Try setting up a viewer page with jwplayer, or flash.swf from the test folder , so you will have a more "real life world" testing environment. |
Neither with JW player online, the same problem, infinite buffering loop. :-( |
Update, in vod the stream works, i added this:
and i can correctly stream from VLC the file previously published with my android. So, the last piece is the live connection, any hints? :-( |
What version of vlc are you trying to play rtmp stream? On Wednesday, 3 February 2016, Antonio notifications@github.com wrote:
|
Version 2.2.1 Terry Pratchett (Weatherwax) (Intel 64bit). Neither JW player online worked, anyway |
Windows O/S? On Wednesday, 3 February 2016, Antonio notifications@github.com wrote:
|
OSX Yosemite 10.10 |
Ok I know in Windows VLC 2.1.5 32bit on x64 system plays rtmp fine but On Wednesday, 3 February 2016, Antonio notifications@github.com wrote:
|
Previous versions are even worst, VLC returns an error when i try to stream the recorder video. This is the log:
|
I think it's a case of trial and error with all versions. I find versions On Wednesday, 3 February 2016, Antonio notifications@github.com wrote:
|
I don't think it's a VLC problem, because either VLC and JW player act the same. Also because i don't know if once the packets go out from the server, there is any difference between a VOD against a LIVE (except latency maybe). I'm pretty sure the problem should be on the publish part, from my android app or in the server, keeping in mind that i can actually watch the flv already published from the /tmp/av directory |
Ok, i didn't know i need Now it works. Thanks everybody |
hey i want to send live video stream to rtmp server from android coding and display the live strem by calling rtmp url so ... please tell me how to write my config file for nginx please................. |
@surabhi1694
|
Hi everybody,
and thanks arut for your wonderful library.
I correctly configured RTMP Nginx, with this configuration file:
Now i m using this FFMpeg library for Android https://github.com/bytedeco/javacpp to publish the content from my android camera to my rtmp server.
recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);
I correctly start the streaming to my :1935/mytv/ok channel, and the rtmp correctly writes the stream in the /tmp/av direcotry.
I download the .flv file (after ~2 minutes of recording) and i play it with VLC.
BUT, the video stream, after ~15 seconds, brokes.
For "brokes" i mean the video freezes.
Generally, the audio is in slow motion.
So, my question is, do you have a ffmpeg command line configuration that works very good with RTMP Nginx? The lower the resolution, the better (i want to test it with very low bandwith stress)
Thanks
The text was updated successfully, but these errors were encountered: