Giter Site home page Giter Site logo

Comments (16)

Arlem avatar Arlem commented on August 12, 2024 1

@JajuanWang I solved (this) problem! Open FFmpegWrapper.c, go to line 420 and modify the code from:

packet->pts = (int) jPts;

to:

packet->pts = (int64_) jPts;

Then, recompile the FFmpeg library and wrapper with

sudo ndk-build.sh

and copy the generated library in the correct folder of your project.
I've done registration for more than 1 hour with this change.
I have checked that the error originates from jPts being a jlong, which overflows when casted to int (at around 35-40 minutes).
I don't know why it was casted to int, since pts is int64_t (as described by https://ffmpeg.org/doxygen/2.8/structAVPacket.html).

from kickflip-android-sdk.

Arlem avatar Arlem commented on August 12, 2024

Just a small update, I have made more tests and can now exclude that the size of the data written (1.5GB) or the number of .ts files are the culprit; all registration stopped at approximately 40 minutes, as before.
Since it is a problem with FFMPEG, I will try to compile the newer version and go ahead from there.

from kickflip-android-sdk.

Arlem avatar Arlem commented on August 12, 2024

I updated FFMPEG to version 2.7.1, no differences encountered.

from kickflip-android-sdk.

Arlem avatar Arlem commented on August 12, 2024

@OnlyInAmerica Have you got a chance to look into this?

from kickflip-android-sdk.

gouravd avatar gouravd commented on August 12, 2024

@Arlem I am having a hard time building FFMPEG 2.7.1 with rtmp. WOuld you be able to help? I want to use the native rtmp instead of librtmp.

I am able to separately build ffmpeg, openssl (using a different method than guardianproject's). I am not able to build librtmp. I am looking for a script that can build librtmp with my generated openssl. Any help would be appreciated

from kickflip-android-sdk.

JajuanWang avatar JajuanWang commented on August 12, 2024

@Arlem I have also encountered this problem.Stoped at approximately 35 minutes every time.To reproduce the bug running at least 35 minutes.
Have you solved it? Looking forward to your reply,thanks

from kickflip-android-sdk.

JajuanWang avatar JajuanWang commented on August 12, 2024

Working properly before approximately 35 minutes, but after about 35 minutes it stop recording and log that:
08-27 23:58:05.158: E/FFmpegWrapper(28230): av_interleaved_write_frame video: 1 pkt: 60493 size: 8892 error: Invalid argument

from kickflip-android-sdk.

Arlem avatar Arlem commented on August 12, 2024

@gouravd Sorry, I am using hls and haven't tried to build FFMPEG 2.7.1 with rtmp.
@JajuanWang No solution found, do you have any guess?

from kickflip-android-sdk.

JajuanWang avatar JajuanWang commented on August 12, 2024

@Arlem https://github.com/OpenWatch/FFmpegWrapper-Android/blob/master/FFmpegWrapper/jni/FFmpegWrapper.c on line 413 //packet->pts = av_rescale_q(packet->pts, *videoSourceTimeBase, (outputFormatContext->streams[packet->stream_index]->time_base));I was going to comment this line,because i need not to adjust the time base,I guess the problem is caused by the this.I have tried to verify it,but recompile the .so files failed

from kickflip-android-sdk.

JajuanWang avatar JajuanWang commented on August 12, 2024

@Arlem and you can see the link http://www.ffmpeg.org/doxygen/2.0/mathematics_8c_source.html on line 130 int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq),I just known it is used to adjust the time base

from kickflip-android-sdk.

Arlem avatar Arlem commented on August 12, 2024

@JajuanWang It fails when you run ndk-build.sh or build_ffmpeg_for_android.sh?

from kickflip-android-sdk.

dyoungjr08 avatar dyoungjr08 commented on August 12, 2024

I have FFmpegWrapper.so and cant view or edit it. what would be the solution in this case. Thank you.

from kickflip-android-sdk.

dyoungjr08 avatar dyoungjr08 commented on August 12, 2024

@Arlem can you please share the corrected and updated. .so files. Thank you

from kickflip-android-sdk.

Arlem avatar Arlem commented on August 12, 2024

@dyoungjr08 This is my .so file of the FFmpeg wrapper (for armeabi and armeabi-v7a).
libFFmpegWrapper.zip

Tell me if you need the other FFmpeg library also.

By the way, have you seen this project? https://github.com/OnlyInAmerica/FFmpeg-Android you might need to recompile on your own in the future.

from kickflip-android-sdk.

dyoungjr08 avatar dyoungjr08 commented on August 12, 2024

Thank you. I believe I do need the others. Im getting this crash now when I try and start a stream:

04-13 22:43:33.562 25102-25102/com.peekatucorp.thePartyStarter I/Muxer: Created muxer for output: /storage/emulated/0/MySampleApp/1fd9e0d2-92de-45b1-883f-192b7a2554a0/index.m3u8 04-13 22:43:33.564 25102-25102/com.peekatucorp.thePartyStarter E/art: dlopen("/data/app/com.peekatucorp.thePartyStarter-1/lib/arm/libFFmpegWrapper.so", RTLD_LAZY) failed: dlopen failed: library "libavformat-57.so" not found 04-13 22:43:33.564 25102-25102/com.peekatucorp.thePartyStarter D/AndroidRuntime: Shutting down VM 04-13 22:43:33.565 25102-25102/com.peekatucorp.thePartyStarter E/AndroidRuntime: FATAL EXCEPTION: main Process: com.peekatucorp.thePartyStarter, PID: 25102 java.lang.UnsatisfiedLinkError: dlopen failed: library "libavformat-57.so" not found at java.lang.Runtime.loadLibrary(Runtime.java:371) at java.lang.System.loadLibrary(System.java:988) at net.openwatch.ffmpegwrapper.FFmpegWrapper.<clinit>(FFmpegWrapper.java:43) at io.kickflip.sdk.av.FFmpegMuxer.<init>(FFmpegMuxer.java:72) at io.kickflip.sdk.av.FFmpegMuxer.create(FFmpegMuxer.java:101) at io.kickflip.sdk.av.SessionConfig$Builder.<init>(SessionConfig.java:225) at com.peekatucorp.io.kickflip.sample.Util.create720pSessionConfig(Util.java:58) at com.peekatucorp.thePartyStarter.MainActivity.configureNewBroadcast(MainActivity.java:2141) at com.peekatucorp.thePartyStarter.MainActivity.startBroadcastingActivity(MainActivity.java:2134) at com.peekatucorp.io.kickflip.sample.fragment.StreamListFragment$4.onClick(StreamListFragment.java:241) at android.view.View.performClick(View.java:4786) at android.view.View$PerformClick.run(View.java:19897) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5300) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) 04-13 22:43:33.566 25102-25102/com.peekatucorp.thePartyStarter D/AppTracker: App Event: crash

from kickflip-android-sdk.

Arlem avatar Arlem commented on August 12, 2024

@dyoungjr08 These are the ones I am actually using. Let me know if they work
ffmpeg+wrapper.zip

from kickflip-android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.