Skip to content
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

Not able to see the video in Chrome web browser after trimming. #98

Open
kartheek222 opened this issue Jul 6, 2023 · 6 comments
Open

Comments

@kartheek222
Copy link

We are not able to see the video in web browsers after trimming the video with this library. The video shows completely black screen, but able to hear the audio for the trimmed video.
This might be because the codec is not compatible with the browsers.
Version : 1.7.14

Capture
@rahat14
Copy link

rahat14 commented Oct 4, 2023

Same Issue Here

@a914-gowtham
Copy link
Owner

a914-gowtham commented Oct 4, 2023

@rahat14 did you upload the video file to server and used the url in the browser? or else could u share the reproduction steps?

@rahat14
Copy link

rahat14 commented Oct 4, 2023

@a914-gowtham I uploaded in my bucket and it does not play via link only audio comes. After debugging I found to play a video over Chrome or Mozilla it needs to have an x264 encoder, so I downloaded the library and changed the FFmpeg version to GPL, and added x264 encoder to the execution code now it's working. if u want i can share the code

@a914-gowtham
Copy link
Owner

yes @rahat14 . that would be great

@praveenb
Copy link

I followed details given by @rahat14 , below is the code changes,
in library build gradle file change implementation 'com.arthenica:mobile-ffmpeg-min:4.4.LTS' to implementation 'com.arthenica:mobile-ffmpeg-min-gpl:4.4.LTS'

In ActVideoTrimmer class file, search for "mpeg4" and replace it with "h264".

That's it, hope it helps somebody

Thanks @rahat14, @a914-gowtham

@HafizHamza19
Copy link

@rahat14 @praveenb can you help me.
when I am using this
implementation 'com.arthenica:mobile-ffmpeg-min-gpl:4.4.LTS.
my app is crashing on videotrimmer activity (ActVideoTrimmer ).

java.lang.Error: FFmpegKit failed to start on brand: Redmi, model: 21061119AG, device: selene, api level: 33, abis: arm64-v8a armeabi-v7a armeabi, 32bit abis: armeabi-v7a armeabi, 64bit abis: arm64-v8a.
at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:50)
at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKitAbiDetect(NativeLoader.java:130)
at com.arthenica.ffmpegkit.AbiDetect.(AbiDetect.java:30)
at com.arthenica.ffmpegkit.NativeLoader.loadNativeAbi(NativeLoader.java:65)
at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:173)
at com.arthenica.ffmpegkit.FFmpegKitConfig.(FFmpegKitConfig.java:145)
at com.arthenica.ffmpegkit.FFmpegSession.create(FFmpegSession.java:68)
at com.arthenica.ffmpegkit.FFmpegKit.executeWithArgumentsAsync(FFmpegKit.java:78)
at com.gowtham.library.ui.ActVideoTrimmer.execFFmpegBinary(ActVideoTrimmer.java:610)
at com.gowtham.library.ui.ActVideoTrimmer.trimVideo(ActVideoTrimmer.java:540)
at com.gowtham.library.ui.ActVideoTrimmer.onOptionsItemSelected(ActVideoTrimmer.java:509)
at android.app.Activity.onMenuItemSelected(Activity.java:4555)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:352)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:264)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:66)
at androidx.appcompat.widget.Toolbar$1.onMenuItemClick(Toolbar.java:221)
at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:781)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:834)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:985)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:975)
at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
at android.view.View.performClick(View.java:7575)
at android.view.View.performClickInternal(View.java:7548)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:29848)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8294)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libffmpegkit_abidetect.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
at java.lang.System.loadLibrary(System.java:1661)

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

No branches or pull requests

5 participants