Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Pls provide compiled & working FFMPEG+Lame JNI Libs #16

Open
ckarthikv opened this issue Nov 25, 2014 · 41 comments
Open

Pls provide compiled & working FFMPEG+Lame JNI Libs #16

ckarthikv opened this issue Nov 25, 2014 · 41 comments

Comments

@ckarthikv
Copy link

I've got the app to start, create live events, but in my Live Control Room on Youtube Live (on web), I'm not receiving any stream. It shows as "streaming" on the app, but no stream received on Youtube Live.

I built ffmpeg as per https://github.com/cine-io/android-ffmpeg-with-rtmp, used the NDK to build it, included the streaming libraries, but it just doesn't show the streams on Youtube Live.

Would really appreciate some help here.

@brunoric
Copy link

brunoric commented Dec 1, 2014

+1

1 similar comment
@rouyunpan
Copy link

+1

@Bobisback
Copy link

Ya this would be really nice. I do not understand why you would provide the source code for a app but not include any libraries it uses? Thats like giving you a brand new car with no engine, and then saying good luck with installing the engine.

@maximeloridan
Copy link

+1
Is there somebody that already succeeded to make it all work?

@garyjamessilva
Copy link

After a lot of effort I got it to work correctly streaming video to youtube ok, but I could not get any audio through youtube. I then had to stop trying & go on with other work. (It is confusing having reference to both AAC & MP3 audio in the library build.)

This functionality should be included in the Android OS so we can just call with a few lines of code to get the project working.

@brunoric
Copy link

brunoric commented Dec 9, 2014

@garyjamessilva can you please share your jni folder?

@garyjamessilva
Copy link

@brunoric

I've published the partly working my version of the project here -

https://www.dropbox.com/s/yshwhmlhg02zaqf/MainActivity.zip?dl=0

(It was too large to publish in github > 100MB)

  • As mentioned I could not get audio to live stream through youtube, only video.

I built the project in Eclipse (adt-bundle-linux-x86_64-20140702, android-ndk-r10c & Android API V4.4W2) under Ubuntu V14.04. (I'm not using Android Studio as yet).

I built the FFMPEG (Version 2.3 !!!) & related library components as per these instructions - http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu - but I crossed compiled for Android/ARM (not x86)

You will need to edit MainActivity.java & insert your own account key -
public static final String ACCOUNT_KEY = "YOUR OWN apps.googleusercontent.com KEY GOES HERE !!!";

The project has a external dependency on google-play-services_lib, build that as per -
http://developer.android.com/google/play-services/setup.html

You will also need to Export an unsigned APK and sign it manually as per -
http://developer.android.com/tools/publishing/app-signing.html

Other than that you need to complete the Google Developers Console configuration details for this project as per - https://github.com/youtube/yt-watchme

Finally I advise you to read ALL opened & closed issues for this project, they contain details about overcoming some errors.

If anybody works out how to get audio to live stream as well as video please let me know.

@maximeloridan
Copy link

Thank you for sharing your folder!

If someone succeeds to solve the audio problem too, it will be great, because I am not good enough to figure out how to solve it.
I wonder if someone (except the one who has created the project) has already succeeded to make it all work. Is it not possible for him to share his JNI folder too? I wonder why it is not the case (if someone has an idea?)

Thanks anyway!

@FouadWahabi
Copy link

Thanks you made my day. Plz if you succed to make the audio function don't forget us ;)

@pangguoming
Copy link

does anybody make audio function works ?

@pangguoming
Copy link

@garyjamessilva did you find a way to fix that audio function?

@garyjamessilva
Copy link

Unfortunately no
On 13/02/2015 1:58 pm, "pangguoming" notifications@github.com wrote:

@garyjamessilva https://github.com/garyjamessilva did you find a way to
fix that audio function?


Reply to this email directly or view it on GitHub
#16 (comment).

@danman81
Copy link

+1

@danman81
Copy link

Hey Guys.. so, I've re-built garyjamesilva's build in android studio after jumping through some hoops, and i'm running into the following error:

Error:Execution failed for task ':app:compileDebugNdk'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\android-ndk-r10d\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\Android.mk APP_PLATFORM=android-19 NDK_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj NDK_LIBS_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\lib APP_ABI=all
Error Code:
2
Output:
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In function 'Java_com_google_android_apps_watchme_Ffmpeg_init':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:104:3: warning: 'av_new_stream' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167) [-Wdeprecated-declarations]
video_stream = av_new_stream(fmt_context, 0);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:109:5: warning: 'av_new_stream' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167) [-Wdeprecated-declarations]
audio_stream = av_new_stream(fmt_context, 1);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeVideoFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:328:3: warning: 'avcodec_encode_video' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4444) [-Wdeprecated-declarations]
int compressed_length = avcodec_encode_video(video_codec_ctx, out, out_length, &source);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeAudioFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:375:5: warning: 'avcodec_encode_audio' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4381) [-Wdeprecated-declarations]
int compressed_length = avcodec_encode_audio(audio_codec_ctx, out, 128000, AudioBuffer_Get());
^
C:\Users\danman\AppData\Local\Temp\ccYfLvZc.s: Assembler messages:
C:\Users\danman\AppData\Local\Temp\ccYfLvZc.s:5770: Error: unexpected characters following instruction at operand 3 -- umull x14,x0,x12,x13' C:\Users\danman\AppData\Local\Temp\ccYfLvZc.s:5868: Error: unexpected characters following instruction at operand 3 --umull x15,x4,x13,x14'
make.exe: *** [C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/app/C_\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec\ac3dec_fixed.o] Error 1

the last warning is interesting -- why is avcodec.h using avcodec_encode_audio when it's deprecated? Has anyone else seen this?

@garyjamessilva
Copy link

Hi,

#8 has mention of these
warnings, as well as a possible work around for other errors (use ndk-build
outside of Android Studio).

For your error, I'd also suggest changing APP_ABI=all to something less so
that is not generating arm64-v8a code, unless that is the target you really
need ( Nexus 9 perhaps ? )

Regards

On Tue, Feb 17, 2015 at 10:56 AM, danman81 notifications@github.com wrote:

Hey Guys.. so, I've re-built garyjamesilva's build in android studio after
jumping through some hoops, and i'm running into the following error:

Error:Execution failed for task ':app:compileDebugNdk'.

com.android.ide.common.internal.LoggedErrorException: Failed to run
command:
C:\android-ndk-r10d\ndk-build.cmd NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\Android.mk
APP_PLATFORM=android-19
NDK_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj
NDK_LIBS_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\lib
APP_ABI=all
Error Code:
2
Output:
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In
function 'Java_com_google_android_apps_watchme_Ffmpeg_init':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:104:3:
warning: 'av_new_stream' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167)
[-Wdeprecated-declarations]
video_stream = av_new_stream(fmt_context, 0);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:109:5:
warning: 'av_new_stream' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167)
[-Wdeprecated-declarations]
audio_stream = av_new_stream(fmt_context, 1);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In
function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeVideoFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:328:3:
warning: 'avcodec_encode_video' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4444)
[-Wdeprecated-declarations]
int compressed_length = avcodec_encode_video(video_codec_ctx, out,
out_length, &source);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In
function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeAudioFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:375:5:
warning: 'avcodec_encode_audio' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4381)
[-Wdeprecated-declarations]
int compressed_length = avcodec_encode_audio(audio_codec_ctx, out, 128000,
AudioBuffer_Get());
^
C:\Users\danman\AppData\Local\Temp\ccYfLvZc.s: Assembler messages:
C:\Users\danman\AppData\Local\Temp\ccYfLvZc.s:5770: Error: unexpected
characters following instruction at operand 3 -- umull x14,x0,x12,x13'
C:\Users\danman\AppData\Local\Temp\ccYfLvZc.s:5868: Error: unexpected
characters following instruction at operand 3 --umull x15,x4,x13,x14'
make.exe: ***
[C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/app/C_\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec\ac3dec_fixed.o]
Error 1

the last warning is interesting -- why is avcodec.h using
avcodec_encode_audio when it's deprecated? Has anyone else seen this?


Reply to this email directly or view it on GitHub
#16 (comment).

@danman81
Copy link

hey garyjamesilva, thanks for your help! I've tried both of of your suggestions, but still same error message!

@danman81
Copy link

so it looks like my error was caused by the way my libraries were setup in Android.mk. Now, I'm getting the following error:

Error:Execution failed for task ':app:compileDebugNdk'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\android-ndk-r10c\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\Android.mk APP_PLATFORM=android-19 NDK_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj NDK_LIBS_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\lib APP_ABI=all
Error Code:
2
Output:
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In function 'AudioBuffer_Push':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:62:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < num_samples; i++) {
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:62:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In function 'Java_com_google_android_apps_watchme_Ffmpeg_init':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:104:3: warning: 'av_new_stream' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167) [-Wdeprecated-declarations]
video_stream = av_new_stream(fmt_context, 0);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:109:5: warning: 'av_new_stream' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167) [-Wdeprecated-declarations]
audio_stream = av_new_stream(fmt_context, 1);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeVideoFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:308:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < frame_size / 4; i++) {
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:328:3: warning: 'avcodec_encode_video' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4444) [-Wdeprecated-declarations]
int compressed_length = avcodec_encode_video(video_codec_ctx, out, out_length, &source);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeAudioFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:375:5: warning: 'avcodec_encode_audio' is deprecated (declared at C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4381) [-Wdeprecated-declarations]
int compressed_length = avcodec_encode_audio(audio_codec_ctx, out, 128000, AudioBuffer_Get());
^
make.exe: *** [C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/app/C_\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.o] Error 1

well, avcodec.h even says that avcodec_encode_audio2 should be used instead, and i wonder if that has anything to do with your audio problem? granted, i have some other errors so i'm fixing those first, but wanted to let you know about this, garyjamessilva!

@garyjamessilva
Copy link

Hi danman81,

Thanks for that, let us all know if you get any further using
avcodec_encode_audio2
instead of the deprecated avcodec_encode_audio calls.

Looking quickly the call parms are different so some additional work is
likely required...

int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx,
uint8_t *buf, int buf_size,
const short *samples);

int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr);

Regards garyjamessilva

On Wed, Feb 18, 2015 at 12:40 PM, danman81 notifications@github.com wrote:

so it looks like my error was caused by the way my libraries were setup in
Android.mk. Now, I'm getting the following error:

Error:Execution failed for task ':app:compileDebugNdk'.

com.android.ide.common.internal.LoggedErrorException: Failed to run
command:
C:\android-ndk-r10c\ndk-build.cmd NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\Android.mk
APP_PLATFORM=android-19
NDK_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj
NDK_LIBS_OUT=C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\lib
APP_ABI=all
Error Code:
2
Output:
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In
function 'AudioBuffer_Push':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:62:3:
error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < num_samples; i++) {
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:62:3:
note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile
your code
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In
function 'Java_com_google_android_apps_watchme_Ffmpeg_init':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:104:3:
warning: 'av_new_stream' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167)
[-Wdeprecated-declarations]
video_stream = av_new_stream(fmt_context, 0);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:109:5:
warning: 'av_new_stream' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavformat/avformat.h:2167)
[-Wdeprecated-declarations]
audio_stream = av_new_stream(fmt_context, 1);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In
function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeVideoFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:308:3:
error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < frame_size / 4; i++) {
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:328:3:
warning: 'avcodec_encode_video' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4444)
[-Wdeprecated-declarations]
int compressed_length = avcodec_encode_video(video_codec_ctx, out,
out_length, &source);
^
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c: In
function 'Java_com_google_android_apps_watchme_Ffmpeg_encodeAudioFrame':
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.c:375:5:
warning: 'avcodec_encode_audio' is deprecated (declared at
C:\AndroidStudioProjects\yt-watchme\app\src\main\jni\libavcodec/avcodec.h:4381)
[-Wdeprecated-declarations]
int compressed_length = avcodec_encode_audio(audio_codec_ctx, out, 128000,
AudioBuffer_Get());
^
make.exe: ***
[C:\AndroidStudioProjects\yt-watchme\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/app/C_\AndroidStudioProjects\yt-watchme\app\src\main\jni\ffmpeg-jni.o]
Error 1

well, avcodec.h even says that avcodec_encode_audio2 should be used
instead, and i wonder if that has anything to do with your audio problem?
granted, i have some other errors so i'm fixing those first, but wanted to
let you know about this, garyjamessilva!


Reply to this email directly or view it on GitHub
#16 (comment).

@danman81
Copy link

oh yes, there is definitely some work to do here, but the real question is who is going to man up and do it

btw, got it to compile finally (thanks ckarthikv!)

@AlifKuan
Copy link

Hi, Guys
I'm trying to use the watch but I had many difficulties
With much efforts I compiled it but some .so file is still missing after compile
And when I click start screaming, the camera screen is displayed and app crashed after 2 or 3 seconds and no recording on event
Please give me an advice
Everything will be really appreciated

@danman81
Copy link

here's a new thread that was started for the audio problem.

#23

@danman81
Copy link

hey @AlifKuan -- why don't you try downloading @garyjamessilva 's precompiled libraries above? they do work, but we are still stuck on this audio problem...

@AlifKuan
Copy link

Hi, Danman81
You mean https://github.com/garyjamessilva/FFmpeg?
How can I integrate it in android studio?Please give me detailed explain
Thanks in advance

@garyjamessilva
Copy link

Hi,

No not on github on dropbox see my comments earlier in
#16

Also this was originally done in Eclipse not Android Studio, you'll needs
to work that out yourself.

Regards
On Mar 30, 2015 11:48 AM, "AlifKuan" notifications@github.com wrote:

Hi, Danman81
You mean https://github.com/garyjamessilva/FFmpeg?
How can I integrate it in android studio?Please give me detailed explain
Thanks in advance


Reply to this email directly or view it on GitHub
#16 (comment).

@garyjamessilva
Copy link

( I have deleted https://github.com/garyjamessilva/FFmpeg it was just an unused clone, for FFMPEG see https://github.com/FFmpeg/FFmpeg instead )

@Lightartist
Copy link

Hey everybody, is someone able to solve the audio problem? If it is complicated or takes too much time, we will pay for your service! Thanks in advance for your message!

@garyjamessilva
Copy link

Hi,

I'm still too busy for the next month or so to go back & fix the audio
problem, but if you are willing to pay you might try contacting this
developer for help -

https://play.google.com/store/apps/details?id=com.rotw.android.bigve&hl=en

https://www.youtube.com/watch?v=pcSYf9pmpcU

http://bigvstudio.com/

Let us know if you make any progress.

Regards

On Sat, Apr 4, 2015 at 10:59 PM, Oliver B. notifications@github.com wrote:

Hey everybody, is someone able to solve the audio problem? If it is
complicated or takes too much time, we will pay for your service! Thanks in
advance for your message!


Reply to this email directly or view it on GitHub
#16 (comment).

@biguas
Copy link

biguas commented Apr 9, 2015

Hey @danman81, I have the same compilation problem on task ':app:compileDebugNdk'.
How did you solve those problems??

Thanks.

@zkdzegede
Copy link

I used @garyjamessilva 's MainActivity solution but tweaked it to compile for gradle. Already included it in my own private project so I don't want to share that source, but I will share my gradle build as well as my gitignore. Gitignore is important to limit the 600mb version after building everything to the smallest amount of source/library files that will compile into the rest of it, which is about 100mb.

My process cannot generate the mp3lame_a in libs or the libffmpeg.so and liblame.a in obj. But it still works the same as MainActivity without them! Still no audio but it works with gradle and AndroidStudio!

The important parts are here:

Gitignore

# FFMPEG build related
**/libs/armeabi-v7a/*
**/obj/local/armeabi-v7a/*

build.gradle

apply plugin: 'com.android.application'

android {
 sourceSets {
        main {
            jniLibs.srcDir 'src/main/libs' //set libs as .so's location instead of jni
            jni.srcDirs = [] //disable automatic ndk-build call with auto-generated Android.mk file
        }
    }

    // Call regular ndk-build (.cmd) script from local.properties
    task ndkBuild(type: Exec) {
        def ndkDir = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder()
        println(ndkDir)
        commandLine "$ndkDir/ndk-build", '-C', file('src/main/').absolutePath
    }

    tasks.withType(JavaCompile) {
        compileTask -> compileTask.dependsOn ndkBuild
    }
}

@GavinCaptain
Copy link

@garyjamessilva :
Hi , I got the audio worked, and this is all because your sharing files on Dropbox.
Thank you very much, and It helped A LOT!
I attached my solution in the thread, and @danman81 have some updated progress.
Hope this would help.
#23

@garyjamessilva
Copy link

Thank you so much @GavinCaptain & well done to all for persevering with
this, very much appreciated!

My boss will be very happy as well, it was the audio that was very
important for our project ;-)

Regards

On Wed, Apr 22, 2015 at 5:10 PM, GavinCaptain notifications@github.com
wrote:

@garyjamessilva https://github.com/garyjamessilva :
Hi , I got the audio worked, and this is all because your sharing files on
Dropbox.
It helped A LOT!
I attached my solution in the thread, and maybe it would help.
#23 #23


Reply to this email directly or view it on GitHub
#16 (comment).

@paulvaskar
Copy link

Hello ,

I am getting the following error while trying to start live streaming using YouTube live streaming API form my android application. Please help me to resolve the issue.

Cannot open connection tcp://a.rtmp.youtube.com:1935

06-15 20:11:54.863 2109-2109/com.happytv.mobapp I/ffmpeg-jni﹕ ERROR: Could not open file rtmp://a.rtmp.youtube.com/live2/............

Ffmpeg.init() returned false

I am using the precompiled ffmpeg library provided with the watchme application. If there is any issue with the ffmpeg library please provide me a working version of the same which I can use in my application.

Thanks in advance
Vaskar

@AhmadHijazi
Copy link

Hi @GavinCaptain
can you please provide me the link to the project ? the one u said u fixed the audio in it
and thank you very much..

@baron4u
Copy link

baron4u commented Sep 4, 2015

@paulvaskar
+1 Me too.

@ghost
Copy link

ghost commented Jan 3, 2016

Hi @paulvaskar +1 , have you solved this issue :

I am too getting the following error:

" com.google.android.apps.watchme I/ffmpeg-jni: Cannot open connection tcp://a.rtmp.youtube.com:1935 com.google.android.apps.watchme I/ffmpeg-jni: ERROR: Could not open file rtmp://a.rtmp.youtube.com/live2/xxxxx.4X-xxxxx.xxxx
com.google.android.apps.watchme I/WatchMe: Ffmpeg.init() returned false"

Any one here please can you suggest any help to resolve this issue.

@iulukaya : Thanks for giving the Library. The video is not streaming to youtube.

@pangguoming
Copy link

i did not fix the audio function. i just can give you a project that can only provide video function.

@ghost
Copy link

ghost commented Jan 6, 2016

@pangguoming , Is the video stream live or it is having a lag(Is it being shown on the youtube lately?) .

As in the demo given by @iulukaya at developers site, the video itself took almost 1 minute to show up on the youtube, after that too they have not shown anything live there.
It is the old recording(~1 minute old) from device.

If it is live stream you are having, Please share your thoughts or if possible Please share the code.

Thank You.

@achinverma
Copy link

Hi everyone , the speed of the video is very fast by default. , i am facing a issue when i try to play the recorded Live stream in my yt-channel , please anyone guide me how to set the video speed to normal ?

@pangguoming
Copy link

@sai-cool the video stream is live , you can download the source code here :https://github.com/pangguoming/Android-Youtube-LiveStream

@MSVhora
Copy link

MSVhora commented Sep 4, 2017

error.txt
@garyjamessilva Thanks for sharing your code. I am trying to build your code, but I am getting linking error. I am attaching error log. I think libavformat.a has some error. Please anyone guide me how to solve this error.

@garyjamessilva
Copy link

garyjamessilva commented Sep 4, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests