my code:
ffmpeg -i "C:\Users\xxxxxxx\Desktop\aaaaaa\a.mp4" -frames 1 -vf "drawtext="fontsize=60:fontcolor=yellow select=not(mod(n,18)),scale=200:100,tile=15x48" "C:\Users\xxxxxxx\Desktop\aaaaaa\a.png"
i got this error:
At least one output file must be specified
where is the problem?
command is get error and i need fix
Related
I am trying to use this ffmpeg command:
ffmpeg -i "full_lowq.flac" -c copy -map 0 -f segment -segment_times "302.825,552.017" "%03d_output.flac"
to take my flac file input "full_lowq.flac" and split it at specific points 302.825,552.017 into output audio files like so:
%01d_output.flac
%02d_output.flac
%03d_output.flac
And this command does work at the moment, except that my three outputted flac files display the wrong 'length' metadata number when viewed in the win10 file browser. like in this example every outputted file has the same length as 11:16
But if i view the audio files in audacity i can see the correct file length such as file 0 have a length of 05:02
Is it possible my input file (https://file.io/oof3eykKwXiI) is corrupted? or my command is making a mistake here? wrong codec?
I'm using FFmpeg to extract frames of a video and therefore I want to print the metadata of the video to a text file first (to get the scene\ value of each frame).
This already works for me with something like:
ffmpeg -i input.mp4 -vf "select='gte(scene,0)',metadata=print:file=scenescores.txt" -an -f null -
Because I'm using all this inside of a Java application I want to pass an absolute path (of an temp directory) to print:file= instead of the currently relative one which will write it to the root directory of the project.
But when I try to specify an absolute path like D:\scenescores.txt I get the following error:
[metadata # 00000203282ff0c0] Unable to parse option value "scenescores.txt" as boolean
[metadata # 00000203282ff0c0] Error setting option direct to value scenescores.txt.
[Parsed_metadata_1 # 00000203269bdf00] Error applying options to the filter.
[AVFilterGraph # 0000020328020840] Error initializing filter 'metadata' with args 'print:file=D:\scenescores.txt'
Is there any way to achieve printing to an absolute path? Am I missing some escape rules or something?
I played a lot with escaping different things and in the end it worked for me like this:
ffmpeg -i input.mp4 -vf "select='gte(scene,0)',metadata=print:file=\'D:\scenescores.txt\'" -an -f null -
The difference is that the path is surrounded by \'.
Also I read that escaping \ to \\ or / can help sometimes.
I am trying to work out why I get the error message Invalid file index 3 in filtergraph description from the following command (ignoring the line breaks that I have put in for readability):
ffmpeg -y -progress .progressinfo.dat
-i "E:/tmp/f1.ts"
-i "E:/tmp/f2.ts"
-i "E:/tmp/f3.ts"
-filter_complex "
[0][1:v]xfade=transition=fade:duration=4.235:offset=3.235[vfade1];
[vfade1][2:v]xfade=transition=fade:duration=1:offset=6.562[vfade2];
[vfade2][3:v]xfade=transition=fade:duration=1:offset=10.183333333333,format=yuv420p;
[0:a][1:a]acrossfade=d=1[afade1];
[afade1][2:a]acrossfade=d=1[afade2];
[afade2][3:a]acrossfade=d=1"
-movflags +faststart "E:/tmp/_MERGED.mp4"
The full error is :
Invalid file index 3 in filtergraph description [0]
[1:v]xfade=transition=fade:duration=4.235:offset=3.235[vfade1]; [vfade1]
[2:v]xfade=transition=fade:duration=1:offset=6.562[vfade2]; [vfade2]
[3:v]xfade=transition=fade:duration=1:offset=10.183333333333,format=yuv420p; [0:a]
[1:a]acrossfade=d=1[afade1]; [afade1][2:a]acrossfade=d=1[afade2]; [afade2]
[3:a]acrossfade=d=1.
I'm reading that the problem is referring to the 4th input.. but I do not see where I reference the 4th input.
What is wrong?
Thanks Gyan - that worked (I referred to it [vfade2][3:v] and here [afade2][3:a])
I'm trying to rotate videos and increase its sound as well as change itsframe rate
ffplay -i C:/Users/thota/OneDrive/Desktop/VET/Input.mp4 -af "volume="10.0",atempo="10.0" -vf "transpose=2,transpose=2,setpts=1/"10.0"*PTS,scale="3840:2160",fps="5.0"
I'm using FFmpeg as I'm trying to build a video editing application hence I need to combine many operations when i try to use above command I'm getting this error(in command im using ffplay as I just want to see output)
error
[atempo # 000001fdd50c7c40] [Eval # 00000047b79fe770] Undefined constant or missing '(' in
'vftranspose=2'
[atempo # 000001fdd50c7c40] Unable to parse option value "10.0 -vf transpose=2"
[atempo # 000001fdd50c7c40] [Eval # 00000047b79fe770] Undefined constant or missing '(' in
'vftranspose=2'
[atempo # 000001fdd50c7c40] Unable to parse option value "10.0 -vf transpose=2"
[atempo # 000001fdd50c7c40] Error setting option tempo to value 10.0 -vf transpose=2.
[Parsed_atempo_1 # 000001fdd50c7b40] Error applying options to the filter.
Error initializing filter 'atempo' with args '10.0 -vf transpose=2'
Pleas help me solve this issue and suggest me a best way to add multiple operations when i try to use , its being tough so is their any other way
If yes please let me know
Thank you
It looks like you are missing quotation marks " character in two places.
The following command works (weird audio, but no errors):
ffplay -i C:/Users/thota/OneDrive/Desktop/VET/Input.mp4 -af "volume="10.0",atempo="10.0"" -vf "transpose=2,transpose=2,setpts=1/"10.0"*PTS,scale="3840:2160",fps="5.0""
You don't need all the quotation marks, and you may improve readability by using '' instead of nested "".
The following command is equivalent:
ffplay -i C:/Users/thota/OneDrive/Desktop/VET/Input.mp4 -af "volume=10.0,atempo=10.0" -vf "transpose=2,transpose=2,setpts=1/10.0*PTS,scale='3840:2160',fps=5.0"
I'm attempting to concatenate various .ts video clips into one video and then convert the video into an .mp4 file. I know I can make a .txt file formatted like so:
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'
and then concatenate them like so:
ffmpeg -f concat -i mylist.txt -c copy all.ts
and then convert the file like so:
ffmpeg -i all.ts -acodec copy -vcodec copy all.mp4
My question is, can my .txt file be urls from another domain? e.g.:
http://somewebsite.com/files/videoclip1.ts
http://somewebsite.com/files/videoclip2.ts
http://somewebsite.com/files/videoclip3.ts
Or, do I first have to download all these clips, store them locally on my domain, then make a .txt file pointing to them? I'm using PHP. Thanks.
Yes, this is possible. Note that in the following examples I use the urls and filenames from your question, when testing I used some test files on my own web server.
Trying this with the example text file you provided will give a pretty clear error message:
[concat # 0x7f892f800000] Line 1: unknown keyword 'http://somewebsite.com/files/videoclip1.ts
mylist.txt: Invalid data found when processing input
This is easily fixed by re-introducing the 'file' keyword in mylist.txt:
file 'http://somewebsite.com/files/videoclip1.ts'
file 'http://somewebsite.com/files/videoclip2.ts'
file 'http://somewebsite.com/files/videoclip3.ts'
That updated file will give a different error message:
[concat # 0x7fa467800000] Unsafe file name 'http://somewebsite.com/files/videoclip1.ts'
mylist.txt: Operation not permitted
The reason for this is that ffmpeg will not allow http-urls by default. This can be bypassed by including the -safe 0 argument in your ffmpeg call before the -i argument:
ffmpeg -f concat -safe 0 -i mylist.txt -c copy all.ts
This might work out of the box on your installation, on mine this gave another error message:
[http # 0x7faa68507940] Protocol 'http' not on whitelist 'file,crypto'!
[concat # 0x7faa69001200] Impossible to open 'http://somewebsite.com/files/videoclip1.ts'
mylist.txt: Invalid argument
This is because, on my installation, ffmpeg's default protocol whitelist only includes file and crypto. To allow the http protocol as well, we need to explicitly provide the allowed protocols whitelist in the command. As it turns out, tcp is also required:
ffmpeg -f concat -safe 0 -protocol_whitelist file,http,tcp -i mylist.txt -c copy all.ts
This allowed my installation to download and concatenate the video files.