mStreamLink >> is my YouTube event streaming url (for example: rtmp://a.rtmp.youtube.com/live2/myeventstreamingid)
mRecorder = new FFmpegFrameRecorder(mStreamLink, mImageWidth, mImageHeight, 1);
mRecorder.setFormat("flv");
//mRecorder.setFormat("mp4");
//MP4 option>>>>>> Never works for the YouTube RTMP (saving local mp4 files are OK), //actually error when recorder.record(frame)
mRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
mRecorder.setVideoOption("preset", "ultrafast");
mRecorder.setSampleRate(mSampleAudioRateInHz);
mRecorder.setFrameRate(15); //(mFrameRate);
mRecorder.setGopSize(60); // GOP_LENGTH_IN_FRAMES: framerate(15) * 4 = 30
Anyone and/or any help will be very appreciated....Thanks.
OK, with many trial and error, I got finally could send see the YouTube live streaming from my android devices. The problem was not from ffmpeg, but from my YouTube live streaming apu code; I forgot to send streaming status (live) update right after sending video streaming which will set my streaming I'd to ready for users. As my network speed isn't fast enough, I send video size to 320x240 with pretty low quality. And then, it started to show in preview for about 10 seconds, then the android streaming is getting slow down which is not good enough for live view; lagging and buffering on the preview... My next problem to solve, but could not get improved yet; not sure where to start to solve slow ffmpeg sending performance...
My another issue is that, the rtmp port is blocking time to time when I use mobile data streaming; I checked the host name and ip address of YouTube rtmp address, and find that it sometimes gets the ipv6 address by mobile DNS server which could not resolve the YouTube rtmp by ffmpeg; it's my own analysis but could be wrong. Any thoughts about it???? I am getting tired by unknown answers with this project; but I will try to get solved .... Trying trying..... Ha ha ha.
--
---
You received this message because you are subscribed to a topic in the Google Groups "javacv" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/javacv/1t0KGmjVfVw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to javacv+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to jav...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to javacv+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/javacv/2ef1c82b-9f64-4d90-be83-fe63b8f40079%40googlegroups.com.