[FFmpeg-user] Concat command for ffmpeg fails "Unsafe file name" - why?

Bo Berglund bo.berglund at gmail.com
Tue Mar 21 14:49:01 EET 2023


On Thu, 16 Mar 2023 18:28:52 +0100, Bo Berglund <bo.berglund at gmail.com> wrote:

>On Thu, 16 Mar 2023 12:36:27 +0100, Reindl Harald <h.reindl at thelounge.net>
>wrote:
>
>>
>>
>>Am 16.03.23 um 12:10 schrieb Bo Berglund:
>>> Does it matter where on the command line safe is put (in the beginning or at the
>>> end before the output file name)?
>>> Maybe it must be defined before ffmpeg reaches file arguments?
>>> Or does it read ALL arguments before starting to process them?
>>in general:
>>params before "-i" are input params
>>params before the output file are output params
>>
>>generic options don't matter but i would place them in top of all other 
>>params
>
>OK, thanks!
>I figured that it should be early so I put it like this:
>
>ffmpeg -hide_banner -safe 0 <remainder of arguments> <output file>
> 

It turned out that I had to limit the use of -safe 0 to the case when the final
command invoked is concat.
In all other cases my utility uses ffmpeg it fails with an error about an
invalid argument...

At first I started out by defining the base command as:
FFMPEG="ffmpeg -hide_banner -safe 0 " and then depending on further use the
remaining arguments are added.
Does not work because the -safe 0 breaks most other commands with an error.
So I kept -safe 0 out of the general command and only inserted it for concat...


-- 
Bo Berglund
Developer in Sweden



More information about the ffmpeg-user mailing list