Description
Not a bug report or anything but mostly a common sense check.
First of all thanks for porting this, and making it much much easier to use on Android.
Now to the point in question. I am trying to stitch together 2 video files, and I did manage to do that but there is something that I noticed during the process. The output quality of the videos in question is _much much lower_ then the original files.
Now at this point I though that maybe I gave wrong instructions to the library, but then I tried the same command, with the same original video files recorded on my device, on windows.
Downloaded the source files directly and ran everything locally on my Windows PC.
Is it possible that the difference in the base libs can affect the video quality so much?
My question is base on the command bellow, do you think that there should be any difference in the output of them on different systems?
Command used:
ffmpeg.exe -i 1570134462551.mp4 -i test123.mp4 -filter_complex [1:v]colorkey=0x0000FF:0.2:1.0[ckout];[ckout]scale=w=200:h=-1[sout];[0:v][sout]overlay=25:main_h-overlay_h-25[out] -map [out] final.mp4
Environment
Version of FFmpeg used on Windows:
ffmpeg version N-95202-g2a546fb7d5 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20190918
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 59.101 / 58. 59.101
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 61.100 / 7. 61.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Note
(unfortunately I am unable to share the video files, due to certain limitations of the contents of them)
Which mobile-ffmpeg package do you use? Can you try running the same command using full-gpl package?
My question is base on the command bellow, do you think that there should be any difference in the output of them on different systems?
Yes, ffmpeg chooses the best encoder available when encoding a file. And the best encoder may change according to the external libraries enabled.
Console output shows the selected encoder. If you compare the outputs of both executions you will see which encoder is used for both of them. I suspect they are different and this is the reason behind the quality difference between them.
Ok managed to get it to work!
I actually was not aware of multiple different packages, so fiddled around and yes figured how to use another one.
Also a note, while switching from full to full-gpl I had an error: "dlopen failed: library "libcpufeatures.so" not found"
Fixed it by cleaning the project must have been a leftover by android studio.
Afterwards manage to run the ffmpeg command with an additional parameter -v:c libx264 which dramatically improved the quality, actually matched the Windows output so all is good!
Again thanks for the library! And thank you for prompt response!!!
Reduce quality of Video while use this library how can i solve this.
@vlazdra how can you increase your output
video quality
Hi @mansiJspaceo unfortunately I ended up switching libraries for ffmpeg actions, so no longer have the code as a reference.
@vlazdra okat Thnak you.
What you use for the Video Editing ?