Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8536 closed defect (wontfix)

'wiki: Concatenate' confusion

Reported by: markfilipak Owned by:
Priority: minor Component: wiki
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

On this page:
https://trac.ffmpeg.org/wiki/Concatenate

on which appears this text:
"The -safe 0 above is not required if the paths are relative."

To which paths do "are relative" (that obviates '-safe 0') apply?
1, 'mylist.txt'? or,
2, 'output.wav'? or,
3, 'mylist.txt'? or,
4, the contents of 'mylist.txt'? or,
5, any of them? or,
6, all of them?

In other words, is '-safe 0' obviated only if all paths are relative, or if only the command line uses relative paths, or what?

Change History (3)

comment:1 by Gyan, 4 years ago

Component: websitewiki
Priority: normalminor
Resolution: wontfix
Status: newclosed

For context, the preceding text is


Create a file mylist.txt with all the files you want to have concatenated in the following form (lines starting with a # are ignored):

# this is a comment
file '/path/to/file1.wav'
file '/path/to/file2.wav'
file '/path/to/file3.wav'

Note that these can be either relative or absolute paths. Then you can stream copy or re-encode your files:

ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.wav

The -safe 0 above is not required if the paths are relative.


So 'paths' refers to the file paths specified in the concat text file, as signified by the specimen /path/to/file1.wav. With -safe 1, all file paths must be deemed safe.

Here's the requirement for filename safety, as given in the docs:

If set to 1, reject unsafe file paths. A file path is considered safe if it does not contain a protocol specification and is relative and all components only contain characters from the portable character set (letters, digits, period, underscore and hyphen) and have no period at the beginning of a component.

comment:2 by markfilipak, 4 years ago

Thank you for the clarification, Gyan.

So, "-safe 0 above is not required if the paths are relative" is incorrect due to being incomplete? There apparently are more requirements before potentially unsafe paths can be ignored (i.e., not rejected), correct?

Last edited 4 years ago by markfilipak (previous) (diff)

comment:3 by Gyan, 4 years ago

The wiki is an unofficial community-editable resource geared to getting most users on their way, rather than being technically exact. The official docs (the one I linked to) aims to be technically exact, although it may often fail at that, for lack of my time or attention. If there's any doubt or nuance missing from the wiki, consult the official docs. If that still doesn't resolve your issue, open a ticket here.

Note: See TracTickets for help on using tickets.