-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Publish video stream to RTMP server #136
Comments
I hava change the ffmpeg_link to a rtmp url,and success...but when i stop and start,app breakdowned |
If it works on the command line with |
@saudet What do you mean by culprit? I checked the output of ffmpeg command line and did not see it. Anyway, this is the command I use in my terminal
Wish this would help. |
@cranehovers I only have one url for testing and I'm not sure what will happen if several people push to the same url at the same time. |
So it looks like your server needs H264 and AAC, and everything should work if you add these two lines before recorder.setFormat("flv");
recorder.setVideoCodec(AV_CODEC_ID_H264);
recorder.setAudioCodec(AV_CODEC_ID_AAC); |
while add"recorder.setVideoCodec(AV_CODEC_ID_H264); " before recorder.start(),recorder.start() will breakout. |
@saudet Tried that, still did not work. The url is "rtmp://pub.z1.glb.pili.qiniup.com/zhibodang/553e0ee9d409d2292f000038?key=5b4b103461a67053". |
That may be the transcoding fails,I tried that,The transcoding performance is very low.
|
Could you check the error message returned by FFmpeg on the console? You'd have to do it outside Android... |
It maybe a little late, but for anyone who sees this, I found that I have to change the value of |
@saudet It seems in the terminal, it works quite fine. There is no error message. |
Good to know it's working now. Thanks for letting us know what the problem was! |
FYI, if the |
Hi Samuel. I'm using your library and
RecordActivity
on Android and it works perfectly for recording video to local mp4 file. But I could not get it work for publishing the video stream to RTMP server. Is there anything else I should do except for changing the ffmpeg_link to a rtmp url?I tried some other examples like this one and this one, and some others, but all of them are outdated since the upgrading of the JavaCV. Would you give me some tips?
I think the url I used is fine since I could publish video stream with the url through ffmpeg command line.
The text was updated successfully, but these errors were encountered: