Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#2060 closed enhancement (invalid)

Concat Demuxer Input Format - Usability enhancement

Reported by: ramitbhalla Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the request: Currently the Concat demuxer required a text file input which requires all special characters AND spaces to be escaped.

I'm suggesting 2 enhancements to it:

  1. Instead of escaping the filepath characters, accept the file path input in double quotes:

e.g. file "C:\Test Videos\Test1.wtv"

  1. Use the same format as the concat protocol for input file names rather than a text file, it makes the command line management a whole lot easier.

e.g. -f concat -i "\"C:\Test Directory\Test1.wtv\"|"C:\Test Directory\Test2.wtv\""

Change History (8)

comment:1 in reply to: ↑ description Changed 6 years ago by Cigaes

Replying to ramitbhalla:

requires all special characters AND spaces to be escaped.

Not true.

  1. Instead of escaping the filepath characters, accept the file path input in double quotes:

Try single quotes. This is specified in the doc. Reading the doc is always useful.

  1. Use the same format as the concat protocol for input file names

Not extensible enough.

comment:2 Changed 6 years ago by ramitbhalla

Yes I did read the documentation and it wasn't clear, enclosing the filepath in single quotes
i.e.

file '"C:\test videos\test1.wtv"'

did not work. I needed to fall back to escaping the spaces, which was a pain!

Hence the request for moving to a more friendly format.

If 2 is not extensible, is there an alternative which can be used at the command line directly, it's not always feasable to create a text file from scripts, hence the request to provide a command line alternative, it doesn't have to be perfect, but can be a basic alternative.

comment:3 Changed 6 years ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

Concerning "2", since the concat demuxer is using the file protocol, I don't think this can be implemented.

comment:4 Changed 5 years ago by ramitbhalla

I think there's a bug in the concat demuxer, if the filename contains a single quote in it's name

The concat demuxer is not able to read from the text file

e.g. here is what the concat.txt file contains:
file 'NCIS HD' Small_0_10.ts'
file 'NCIS HD' Small_18_133.ts'

ffmpeg breaks at NCIS HD and says it cannot find the file. I know the issue, i've tried escaping teh ' character like \' and even
' but even that doesn't work.

Is this broken? If so I'll open a new ticket.

comment:5 Changed 5 years ago by ramitbhalla

Okay figured it out but it does not make sense.

for each ' in the filename I need to replace it with a '\

Anyone tell me how that works? shouldn't it be a simple escape character?

comment:6 Changed 5 years ago by ramitbhalla

Uh it didn't come out properly, let me try again

each ' needs to be replaced with a

'\''

How does that work?

comment:7 Changed 5 years ago by Cigaes

Read the fine documentation:
http://ffmpeg.org/ffmpeg-utils.html#Quoting-and-escaping
The issue of single quotes is explicitly addressed.

comment:8 Changed 5 years ago by ramitbhalla

Thanks, the ffmpeg documentation index is very cryptic and pathetic to be honest. I like the old single page, not the most user friendly but atleast you didn't have to click a hundred links to figure out what is where.

The new index is incomplete, and just terrible, the link to this page can ONLY be found on the main index page (non of the other pages have a link to this page) and there's no description as to what link contains what.

Note: See TracTickets for help on using tickets.