a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
362 stars 115 forks source link

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

Open kartheek222 opened 12 months ago

kartheek222 commented 12 months ago

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 commented 9 months ago

Same Issue Here

a914-gowtham commented 9 months ago

@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 commented 9 months ago

@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 commented 9 months ago

yes @rahat14 . that would be great

praveenb commented 1 month ago

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