Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
FFmpeg Command for Audio Files mix getting error
21 mai 2019, par priya senTask: Mix Audio Files using FFmpeg in Android.
Error:
[NULL @ 0xf6468400] Unable to find a suitable output format for ' -i ' -i : Invalid argument
my Command:
File m1 = new File(Environment.getExternalStorageDirectory() + "/MyFolder/m1.mp3"); File m2 = new File(Environment.getExternalStorageDirectory() + "/MyFolder/m2.mp3"); //m1,m2 are mp3 files //File outputDirectory2 = new File(Environment.getExternalStorageDirectory() + "/MyFolder/video1.mp3"); String[] auidoMixCmd3={" -i ",""+m1.getPath()," -i ",""+m2.getPath()," -filter_complex [0:0][1:0] amix=inputs=2:duration=first:dropout_transition=0 -codec:a libmp3lame -q:a 0:-f mp3",outputDirectory2.getPath()}; String[] auidoMixCmd2={" -i ",""+m1.getPath()," -i ",""+m2.getPath()," -i ",""+m1.getPath()," -filter_complex","\"[0:0][1:0] amix=inputs=2:duration=longest\" -c:a libmp3lame -f mp3",outputDirectory2.getPath()};
I tried more than 100 times with differnt commands but i did not get any solutions.So many commands are in Stack overflow but getting same error.Please anyone help me out here.
-
How to tag metadata m4v files using FFmpeg
21 mai 2019, par jazz-eSo I'm trying to tag metadata to a video file m4v from the filename. However, I can't seem to find the answer in the man -h page and everything online shows how to pull the metadata from m4v.
I've looked here on StackOverflow and also online for the answer and most are answers on pulling the metadata from the m4v file but nothing on tagging the file (other than stripping out metadata). I found this http://jonhall.info/create_id3_tags_using_ffmpeg/ regarding tagging an mp3 file, which I tried the syntax and it fails.
Here's the mp3 syntax I tried subbing out mp3 to m4v
ffmpeg32 -i in.m4v -metadata title="The Title You Want" out.m4v
Also tried the following as well
ffmpeg -i "$filedir$name" -metadata title="The Title You Want" -c:v copy -c:a copy "$filedir$newname"
This command works for removing the metadata from the file
ffmpeg -i "$filedir$name" -map_metadata -1 -c:v copy -c:a copy "$filedir$newname"
The error I usually get a syntax error.
Any help much appreciated
-
FFMEG Unable to find a suitable output format for '' (Convert Image To Video )
21 mai 2019, par John WallyUnable to find a suitable output format for ''
convertir (){ const video =' file:///storage/emulated/0/128150.jpg' RNFFmpeg.execute('-r:v 30 -i'+video+' -codec:v libx264 veryslow -pix_fmt yuv420p -f mp4 -an Penguins.mp4 ') .then(result => console.log("FFmpeg process exited with rc " + result.rc)); }
Affichage Console
enter image description here
-
ffmpeg output Filename from multiple source
21 mai 2019, par JermyI want to have the output file to have same name from source ( for eg first filename from
list.txt
), how can I do it?This is the code I have which converts the all the .avi in folder to a single files and renames it to
output.avi
.Instead of
output.avi
I want the filename to be same as first filename from source folder or first filename fromlist.txt
.for %%f in (*.avi) do ( echo file %%f >> list.txt ) ffmpeg -f concat -safe 0 -i list.txt -c copy output.avi del list.txt
One more thing I want to know, is it possible to flip video horizontal or mirror it without re-encoding?
-
ffmpeg very bad quality mp4 conversion
21 mai 2019, par LegotinTrying to convert mp4 with ffmpeg, two passes, with -crf 50 and seems like it doen't impact on video quality. It's always very poor.
'/usr/bin/ffmpeg' '-y' '-i' '/app/storage/7/02/f47a2133-d0fe-6e7f-5e76-3efd22a88027_original.mp4' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pix_fmt' 'yuv420p' '-crf' '50' '-profile' 'baseline' '-movflags' '+faststart' '-vf' '[in]scale=trunc(iw/2)*2:trunc(ih/2)*2[out]' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes5cde7ed5d2937fzaaz/pass-5cde7ed5d2caf' '/app/storage/7/02/f47a2133-d0fe-6e7f-5e76-3efd22a88027_temp.mp4'
'/usr/bin/ffmpeg' '-y' '-i' '/app/storage/7/02/f47a2133-d0fe-6e7f-5e76-3efd22a88027_original.mp4' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pix_fmt' 'yuv420p' '-crf' '50' '-profile' 'baseline' '-movflags' '+faststart' '-vf' '[in]scale=trunc(iw/2)*2:trunc(ih/2)*2[out]' '-pass' '2' '-passlogfile' '/tmp/ffmpeg-passes5cde7ed5d2937fzaaz/pass-5cde7ed5d2caf' '/app/storage/7/02/f47a2133-d0fe-6e7f-5e76-3efd22a88027_temp.mp4'
Original: https://giant.gfycat.com/CreepyZigzagFish.mp4
Converted: https://leonardo.osnova.io/f47a2133-d0fe-6e7f-5e76-3efd22a88027/-/format/mp4/How to fix video quality? I've tried to change crf value, but seems like it doesn't matter.