-
Notifications
You must be signed in to change notification settings - Fork 211
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
How to stream with Wowza #30
Comments
We're not planning on adding the RTMP support that wowza requires. However FFmpeg does support this output format and without too much modification you could modify Kickflip to support it. This would involve modifying FFmpegMuxer.java and re-compiling FFmpeg with rtmp support. |
Could you please throw some light on how to achieve this
|
We actually had experimental RTMP support up and going. Here's the last commit before it was removed. You essentially just create your
|
You no longer need librtmp, it's built into the latest versions of FFmpeg. On Wed, Jun 3, 2015 at 12:49 PM, David Brodsky [email protected]
|
Thanks so much for the information. I am also kind of curious as to why that support for RTMP was removed. It sounds and looks good to have RTMP support for KickFlip |
I have successfully tested RTMP using KickFlip's modified SDK to our server(ngins rtmp module) and the latency can be easily reduced to 2 secs. Though the major issues I had in re-adding the RTMP support was actually finding ffmpeg with rtmp. I found that the files in this commit - https://github.com/Kickflip/kickflip-android-sdk/tree/962aa39367d147bae54ccd094e03888833d00a95/sdk/src/main/jniLibs/armeabi worked. Anything after that did not work for rtmp streaming. I am a windows guy and have no knowledge in Linux. Can anyone help in getting the static builds for latest ffmpeg with rtmp for android. I wish Kickflip had not removed the support :( I wish Kickflip re-adds FFMpeg with rtmp support for both ARM and X86 |
@gouravd Hi! Could you please provide some details on how you made the SDK stream via RTMP to your own server? What was the exact commit you got to work and what native libs you had used for that? On what device was it tested (API version)? I am struggling with the exact same problem and can't get around it :/ |
@asamoylenko Hi. here are some things I remember that I did
Let me know at which point you are stuck and may be we can work something out. |
@gouravd Thank you so much! Everything worked 👍 Still have some issues on different devices, but finally we were able to move from the dead point, yay!! |
@OnlyInAmerica Hey, David! Is there any chance I could see the sources of pro.dbro.FFMpegWrapper.c? I am experiencing different issues with device compatibility and just wanted to take a look at those, maybe it would clear things out a little... |
Even I would love to see it! |
With pleasure! FFmpegWrapper.c :) |
@OnlyInAmerica would you mind sharing the FFMpegWrapper for the pro.dbro one as well? |
that repository is exactly what's used in Kickflip. I may have renamed the package when I imported to Kickflip for whatever odd reason but I assure you it's identical |
But I remeber if I use the openwatch file, then I get error something like FFMpegWrapper() is not recognized. |
@OnlyInAmerica @gouravd I see that FFmpegwrapper.c present in https://github.com/OpenWatch/FFmpegWrapper-Android/blob/master/FFmpegWrapper/jni/FFmpegWrapper.c differs from pro.dbro.FFMpegWrapper.c If you have them.. can you provide them. Im looking at rtmp support! |
@gouravd You just need to make sure the absolute namespace of For example, if you have
vs the following if you had
@marudhupandiyang The FFmpegWrapper API hasn't changed since the first Kickflip release IIRC, so you should just use the most recent version of FFmpegWrapper. |
@OnlyInAmerica I figured the thing with method names, although was still thinking the I was able to solve the compatibility issues and can stream to our Wowza server from different devices and play that stream with Linux |
Greetings @OnlyInAmerica, I have rtmp streaming working with the pre-compiled .so files found in kickflip-sdk prior to removing rtmp support, but when I compiled the FFmpegWrapper.c, replaced the method signatures as you mentioned, it didn't work. I then noticed in your code that the outputFormatName is hard coded to "hls", so I changed this to "flv" and got the following error:
I was wondering if you could shed some light on what further modifications may be necessary to stream rtmp (or if you still have the jni code from when rtmp streaming worked). Would it have to do with the following line of code?
|
@rkrishnan2012 I have the similar problem io.kickflip.sample E/FFmpegWrapper: av_interleaved_write_frame video: 1 pkt: 1 size: 4973 error: Invalid data found when processing input,I didn't change the format name from hls to flv |
Yes I got it working. What data are you feeding it? |
I just use the original ffmpegmuxer.java:
|
Nope, however you need to recompile ffmpeg to support rtmp and flv support. Also, in the ffmpegwrapper.c file, you can enable logging to see further details on why thing aren't working. Also, set the output format to be "flv". Logging:
Recompiling with rtmp:
Add that ^^ to the configure flags and run the .sh file in the link above to compile for android. |
Thanks! But the ffmpeg libs downloaded from the following do not support rtmp support? |
Im not certain, I ended up compiling my ffmpeg to be as small as possible with only the necessary packages, so not sure about how he compiled the one in that folder. Also, I use the latest version of ffmpeg. |
I was tinkering with rtmp support today and find out that ffmpegwrapper is not correctly initializing ffmpeg:
|
I found the same problems with you, I did not get it through until now. Did you make it work by modifying ffmpegwrapper.c? If so, could you like to send me a correct ffmpegwrapper.c ? Thanks. |
Sorry for so long. |
Will try your wrapper, thanks for sharing, appreciate it! |
I tried replacing static libraries with old revision / compiling latest ffmpeg and ffmpeg wrapper but in both ways, I got this error: I/art: Clamp target GC heap from 527MB to 512MB
E/AndroidRuntime: FATAL EXCEPTION: CameraEncoder
Process: io.kickflip.sample, PID: 22560
java.lang.OutOfMemoryError: Failed to allocate a 626707 byte allocation with 216077 free bytes and 211KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at java.nio.MemoryBlock.allocate(MemoryBlock.java:131)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:73)
at io.kickflip.sdk.av.FFmpegMuxer.writeSampleData(FFmpegMuxer.java:175)
at io.kickflip.sdk.av.AndroidEncoder.drainEncoder(AndroidEncoder.java:130)
at io.kickflip.sdk.av.CameraEncoder.handleFrameAvailable(CameraEncoder.java:493)
at io.kickflip.sdk.av.CameraEncoder.access$100(CameraEncoder.java:31)
at io.kickflip.sdk.av.CameraEncoder$EncoderHandler.handleMessage(CameraEncoder.java:910)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at io.kickflip.sdk.av.CameraEncoder.run(CameraEncoder.java:673)
at java.lang.Thread.run(Thread.java:818) when allocate synchronized (mMuxerInputQueue) {
muxerInput = mMuxerInputQueue.get(trackIndex).isEmpty() ?
ByteBuffer.allocateDirect(encodedData.capacity()) : mMuxerInputQueue.get(trackIndex).remove();
} Any idea? |
I have the same problem with flash players, what exactly is this "metadata"? Did anyone manage to achieve proper rtmp streaming with kickflip? Also after around 10 minuts the streamign crashes completely, is this happening to anyone else? |
Hi everyone.
I'm studying this sdk to use with Wowza stream service. Anyone can help me?
skype: [email protected]
gmail: [email protected]
The text was updated successfully, but these errors were encountered: