mobile-ffmpeg | FFmpeg for Android, iOS and tvOS Not maintained anymore Superseded by FFmpegKit | Graphics library
kandi X-RAY | mobile-ffmpeg Summary
kandi X-RAY | mobile-ffmpeg Summary
FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mobile-ffmpeg
mobile-ffmpeg Key Features
mobile-ffmpeg Examples and Code Snippets
Community Discussions
Trending Discussions on mobile-ffmpeg
QUESTION
Using OpenCV 4.5.2 + FFMPEG on an android app
I'm trying to convert an .avi video file into a .mp4 file using x264, by running
...ANSWER
Answered 2021-Apr-16 at 22:35Figured it out myself with some debug assitance from @llogan.
So, it looks like VideoCapture exports frames with BGR
format, thus the Red and Blue colors being switched out. In order to fix my issue all I had to do was to convert the frame from BGR
to RGB
using the OpenCV utility method:
QUESTION
I have a video cropper working fine to all videos I tested, but a video from s20 ultra, gives me some error in FFmpeg, i don't really know if the video is oversize or not my source code https://github.com/rushidevmurari/RushiCropVideo/blob/213166834b0bc6ce83ab3f4ac494f261a57d7436/app/src/main/java/com/androworld/allinonevideoeditor/videocrop/VideoCropActivity.java
I got these link but nothing good to my work Error when cropping video using FFMPEG
...ANSWER
Answered 2021-Apr-15 at 00:41ffmpeg is auto rotating the video due to the rotate side data, so it becomes 2160x3840 before being cropped resulting in the error. You can tell it not to auto rotate with the -noautorotate
input option.
QUESTION
I am using libVLCSharp (Xamarin bindings to the libvlc library) for video playback. I am adding a feature to transcode / compress downloaded videos to the local filesystem. Normally I'd use mobile-ffmpeg for this, but since internally VLC uses ffmpeg with different build configurations, ffmpeg transcoding does not work - android it crashes the app, ios returns a 'Invalid data found when processing input' error message when attempting to convert. The code works fine when libvlcsharp is uninstalled and there is only one instance of the ffmpeg library being used.
So, I'm looking for video compression / transcode options for Xamarin.iOS.
I've looked into the docs for libvlcsharp and it sounds like we can transcode, but it's somewhat vague on how to do that:
https://github.com/videolan/libvlcsharp/blob/3.x/docs/how_do_I_do_X.md
How do I do transcoding? Pretty similarly to how you would do it from the CLI. Read https://wiki.videolan.org/Transcode/ and try media options with Media.AddOption.
In my case, I'd like to transcode non-interactively / in the background of the app. There is a 'dummy' option in the command line interface for doing this, so I was wondering how we'd do this from libvlc / libvlcsharp.
So far, my code from these docs looks like this:
...ANSWER
Answered 2021-Mar-31 at 05:29As replied on the libvlc discord server, when you are transcoding a video, it is not displayed at all and you just don't need to create a VideoView, the MediaPlayer alone is enough. The rest is finding the correct transcoding options, and you already found the correct wiki page for that.
QUESTION
Issue : I have 7 images in a list (with different size, resolution and format). I am adding an mp3 audio file and fade effect while making a slideshow with them, as i am trying to do it by following command
...ANSWER
Answered 2021-Mar-17 at 17:49Remove -framerate 1/5
. That's too low of a value for your given -t
and it won't work well with fade (image a fade at 0.2 fps). You're only applying that to the first input, while the rest are using the default -framerate 25
. Remove it and the image will be visible.
Alternatively, use -framerate 1
for each image input, and add fps=25
after each setsar
. It will be significantly faster.
QUESTION
I am adding video stream capture functionality to a Xamarin Forms project. I am trying to use VLC's LibVLCSharp.Forms (https://github.com/videolan/libvlcsharp) package and the Mobile ffmpeg Xamarin wrapper package, Laerdal.Xamarin.FFmpeg.* (https://github.com/Laerdal/Laerdal.Xamarin.FFmpeg.iOS). However, the internal ffmpeg library from VLC is conflicting with the ffmpeg wrapper and is built with different flags which exclude functionality that I need.
For native development, it looks like you can configure a preferred library with the OTHER_LDFLAGS
flag in the Pods-.debug.xcconfig
file but I don't see where to do that with Xamarin.Forms.
Source: https://github.com/tanersener/mobile-ffmpeg/wiki/Using-Multiple-FFmpeg-Implementations-In-The-Same-iOS-Application
How can I configure Xamarin iOS builds to prefer the mobile ffmpeg library over the VLC ffmpeg library? If I am able to use the mobile ffmpeg library, will it cause issues with VLC?
Here is a log message when I try to run commands with ffmpeg. As you can see, ffmpeg's internal library paths reference "vlc":
...ANSWER
Answered 2021-Feb-26 at 05:52The solution is in one of the link you shared
For native development, it looks like you can configure a preferred library with the OTHER_LDFLAGS flag in the Pods-.debug.xcconfig file but I don't see where to do that with Xamarin.Forms. Source: https://github.com/tanersener/mobile-ffmpeg/wiki/Using-Multiple-FFmpeg-Implementations-In-The-Same-iOS-Application
Xamarin.Forms is still native development, so you can do this the same way a Swift iOS developer would.
- You need to open your native iOS app project in XCode (not the shared project one).
- Create a xcconfig file. This guide looks good enough with screenshots to help you navigate XCode.
- A xcconfig look like this. You want to put the mobile-ffmpeg frameworks before the mobilevlckit one.
- Xamarin.iOS might require some framework as well, so before all this I'd build your app in verbosity diagnostics mode to see what the current
OTHER_LDFLAGS
value is.
QUESTION
I tried to create a video using multiple images having different scales or sizes or (height*widths) using Mobile-FFmpeg
#
I am using this code script to get the required result:
ANSWER
Answered 2021-Jan-23 at 18:08QUESTION
The only thing I want to do is convert wav files to mp3 inside my Android application.
I am currently using https://github.com/tanersener/mobile-ffmpeg and with audio-release everything is working fine. As the lib size is about 40 MB and I only need a single command, I'd like to build my own .aar file as described in the Wiki to reduce the application size.
I edited the android-ffmpeh.sh ./configure:
ANSWER
Answered 2020-Nov-22 at 04:48The ffmpeg
tools can call upon the following filters automatically: aformat anull atrim format hflip null transpose trim vflip
. configure
is set to select them automatically unless overridden, which you have by declaring --disable-everything
. So, these filters need to be manually enabled.
QUESTION
I try to create a video with ffmpeg
and save it to the device with gallery_saver
package for Flutter.
The ffmpeg
command works well and the video is created. But GallerySaver
does not save it. As result I get no error, but a false
boolean for the success
argument.
This is the ffmpeg
output. Is this a valid video mp4 file?
ANSWER
Answered 2020-Sep-18 at 17:03Make the video and add the audio in the same command. You can loop the images so it makes a proper length in relation to the audio:
QUESTION
I´m using ffmpeg
with flutter and I create a video from a lot of images. The problem: ffmpeg
seems to not create a video with a right codec or something else.... please check my description below for concrete informations.
First the code parts:
Creating video from images
-r $settings_fps -i $tempPath/img%04d.jpg -vcodec libx264 -y -an -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -shortest $tempPath/$videoFileName.mp4
Adding audio to the created video
-i ${finalSong.path} -i $videoPath -c:a aac -shortest $tempPath/$newVideoFileName.mp4
This is my video output from console on creating this video:
...ANSWER
Answered 2020-Sep-12 at 09:39Videos for web playback usually require chroma sampling to be 4:2:0. FFmpeg, by default, will try to preserve the source sampling scheme, so your output is 4:2:2 (see yuvj422p
in the output stream).
Use for step 1,
-r $settings_fps -i $tempPath/img%04d.jpg -vcodec libx264 -y -an -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -pix_fmt yuv420p $tempPath/$videoFileName.mp4
And in step 2, avoid re-encoding video
-i ${finalSong.path} -i $videoPath -c:v copy -c:a aac -shortest $tempPath/$newVideoFileName.mp4
QUESTION
I'm making a movie player with libav. I have decoding video packets working, I have play in reverse working, I have seeking working. All this works no an x86 android emulator, but fails to work on a real android phone (arm64-v8a)
The failure is in sws_scale()
- it returns 0. The video frames continue to be decoded properly with no errors.
There are no errors, warnings, alerts from libav. I have connected an avlog_callback
ANSWER
Answered 2020-Aug-26 at 16:50This is a known bug in FFMPEG on ARM architecture.
A workaround was posted by mythtv that involves subtracting 1 from the destination width in order to bypass broken optimization code.
https://code.mythtv.org/trac/ticket/12888
https://code.mythtv.org/trac/changeset/7de03a90c1b144fc0067261af1c9cfdd8d358972/mythtv
Reported against FFMPEG 3.2.1 http://trac.ffmpeg.org/ticket/6192
Still exists in FFMPEG 4.3.2
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mobile-ffmpeg
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page