Use of FFmpeg in the project - iphone

I am taking some screens shot images and want to convert them to videos of some format. Iknw FFmpeg is the solution for this but I am unable to find the code for using it in my project and also am unable to find this library. Please give me a step by step process with details of coding this.

An example to help you get started:
ffmpeg -ab 256k -s 640x480 -f image2 -r .1 -b 180000 -i pics*.jpg -i coolmusic.mp3 final-video.mpg
Read the man page for further details.

Related

How to stop ffmpeg automatically rotating (Iphone 13) videos

I have a bunch of videos I want to merge into one video.
Therefore I used this ffmpeg command.
ffmpeg -y -loglevel warning -f concat -safe 0 -i "filelist.txt" -c copy "merged.mov"
When I open merged.mov all my videos are rotated -90 degerees but when I open my videos for example in vlc it has the right rotation.
What am I doing wrong?
I tried already adding the "-noautorotate" option but that does not seem to solve the problem.

Issue regarding Slides not being shown in converted video to mp4 in BigBlueButton

We are using BigBlueButton 2.4 for webinars. When an webinar video is processed by bigbluebutton, the presentation shows the slides that were uploaded in the webiner, but the converted video that we are downloading, does not have those slides shown (Rest of the video is okay).
Does anyone know how to fix this for this particular version?
The code that we are using is mentioned below, if it helps:
#!/bin/sh
# Convert the deskshare and webcam to a combined video stream including logo
cd /var/bigbluebutton/published/presentation/
meetingId=$1
cd $meetingId
# add webcam sound to deskshare
if [ -e deskshare/deskshare.webm ]
then
ffmpeg -nostdin -threads 4 -i video/webcams.webm -i deskshare/deskshare.webm -af afftdn deskshare_with_sound.mp4
else
ffmpeg -nostdin -threads 4 -i video/webcams.webm -af afftdn deskshare_with_sound.mp4
fi
ffmpeg -nostdin -threads 4 -i video/webcams.webm -vf

Laggy video when downloading from m3u8 link with ffmpeg

Im trying to download the video in this m3u8 link https://lbs-usp-hls-vod.cmore.se/vod/1aee4/l4fiymehvxx(13287875_ISMUSP).ism/l4fiymehvxx(13287875_ISMUSP).m3u8, and to do that I run this command:
ffmpeg -i "https://lbs-usp-hls-vod.cmore.se/vod/1aee4/l4fiymehvxx(13287875_ISMUSP).ism/l4fiymehvxx(13287875_ISMUSP).m3u8" -vcodec copy -acodec copy output.mp4
The video downloads fine without any errors, but when I play the video it dosen't look great because it looks like the frame rate is very low, but looking in videoproperties in VLC it says that it is 25 fps which is the same as the original video.
The m3u8 link comes from this website if you need to know that: https://www.tv4play.se/program/taskmaster/13287875
Do someone know what is causing this issue and how to fix it?
Thank you for any advice!
EDIT: I did manage to solve it myself after a lot of research. I just needed to add -fflags +igndts before the -i so the command looked like this
ffmpeg -fflags +igndts -i "https://lbs-usp-hls-vod.cmore.se/vod/1aee4/l4fiymehvxx(13287875_ISMUSP).ism/l4fiymehvxx(13287875_ISMUSP).m3u8" -vcodec copy -acodec copy output.mp4

Flutter - How get use data in FFMPEG commands (input & output)

In Flutter, How to use data in FFMPEG commands (input & output).
Like:
ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -i 4.mp3 -filter_complex "[0:a][1:a][2:a][3:a]amerge=inputs=4[aout]" -map "[aout]" output.mp3
2 Question regarding this command:
What is the path to bring the '1.mp3', '2.mp3'... to the FFMPEG.
Where is the 'output.mp3' goes to? eventually?
Didn't find any solution, let's speak locally and after that remotely (API/SERVER).
What is the path to bring the '1.mp3', '2.mp3'... to the FFMPEG.
Your ffmpeg command in your question assumes 1.mp3 and 2.mp3 are in the current working directory that ffmpeg is being executed in.
For example, in Linux if the files are in /home/aix/music, then you would have to navigate to /home/aix/music in your terminal (such as by running cd /home/aix/music) before running the ffmpeg command shown in your question.
Or, provide the full path to the files and the current directory will not matter:
ffmpeg -i /home/aix/videos/1.mp4 -i /home/aix/videos/2.mp4 ...
Where is the 'output.mp3' goes to? eventually?
output.mp3 goes wherever you tell it to. Because no path was provided the ffmpeg command in your question it will output output.mp3 into the current directory.
Or, provide the full path to output output.mp3 in the desired directory:
ffmpeg -i input.mp3 /home/aix/music/encoded/output.mp3

How do you generate a looping animated gif for Facebook with ffmpeg

When I paste a giphy url (like this one) into a facebook post or comment, the gif plays immediately and loops indefinitely. When I upload ones I make from ffmpeg, neither of those things happen. You have to click a play button to start the animation and then it ends after one time through.
I have a couple of ffmpeg commands I use to create the gifs. They are:
ffmpeg -ss 10 -t 5 -i input.m4v -vf "fps=15,scale=800:-2:flags=lanczos,palettegen" -y palette.png
and
ffmpeg -ss 10.6 -t 5 -i input.m4v -i palette.png -filter_complex "fps=15,scale=800:-1:lanczos[video];[video][1:v]paletteuse" output.gif
The first one generates a custom color pallet that's used by the second one to create a high quality animated gif. I've also tried adding -loop 0 (i.e. ffmpeg -ss 10.6 -t 5 -i input.m4v -i palette.png -filter_complex "fps=15,scale=800:-1:lanczos[video];[video][1:v]paletteuse" -loop 0 output.gif) but that didn't work either.
I also tried uploading the ffmpeg generated images to a personal website and calling them from there but those didn't load at all.
In case it helps, here's a copy of one of the gifs (which autostarts and loops on StackOverflow for me but not on FB)
How does one go about creating a gif that will autostart and loop indefinitely for facebook?
(Note: I've got no problem if I need to do something with a personal website, but I don't want to use Giphly or the other animated gif sites directly if at all possible. Also worth pointing out that I discovered if I download the image from giphly and upload it, it doesn't autostart either. So, this may be something internal to FB, but I'd still like to figure that out.)
The file from Giphy appears to be a WebP, not a GIF:
ffmpeg -i giphy
[…]
Stream #0:0: Video: webp, none, 25 tbr, 25 tbn, 25 tbc
Firefox and mediainfo concur.
So try making a WebP instead:
ffmpeg -ss 10.6 -t 5 -i input.m4v -loop 0 output.webp
Your ffmpeg will have to be compiled with --enable-libwebp.
See ffmpeg -h encoder=libwebp and ffmpeg -h muxer=webp for more options.