'FFMPEG - can you have comments in script files?
Because of batch's poor ability to handle multi-line strings, I'm using FFMPEG script files more and more for filter_complex
arguments. I'm wondering if there is any way to include comments in these files. They seem to be quite tolerant of white space and line breaks. I've tried:
#
# comment
#
and
;
; comment
;
and
`
` comment
`
and
'
' comment
'
with no success. It doesn't look as if comments are officially supported, but I'm wondering of there is some syntax quirk that allows them?
*** CLARIFICATION ***
I'm not talking about comments in batch files here, but comments in filter_complex_script
files. FFMPEG supports specifying the filter_complex
argument string in a separate file. So instead of:
ffmpeg -i "input.mp4" -filter_complex "[0:v] crop=w=100:h=100:x=12:y=34 " "output.mp4"
you can specify:
ffmpeg -i "input.mp4" -filter_complex_script "crop.txt" "output.mp4"
where crop.txt contains
[0:v] crop=w=100:h=100:x=12:y=34
This is really handy when the filter_complex string gets more complicated (I routinely deal with arguments 10,000 characters in length).
Solution 1:[1]
You can use drawtext with an Y out of the image :-D
...
rotate=(t/4),
drawtext=text='This is a comment. OMG I am so smart!':y=1000,
crop=500:500:100:100,
...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Juan Lucas |