Opened 4 years ago

Last modified 4 years ago

#8898 open defect

`-passlogfile` inconsistent behavior on two pass encoding with `file:` prefix

Reported by: aeris Owned by: Chris Miceli
Priority: normal Component: ffmpeg
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I try to 2-pass encode files with : in filename, so i need to use the file: prefix to force local file usage instead of remote one.
But -passlogfile acts strangely in this case.

First pass seems ignore the file: prefix and create a real file:xxx.log file on the filesystem, but the second pass take care of the prefix and look for a xxx.log file, which doesn't exist.

How to reproduce:

ffmpeg -f lavfi -y -i nullsrc=s=1280x720 -filter_complex "geq=random(1)*255:128:128;aevalsrc=-2+random(0)" -t 1 "file:input.mp4"
ffmpeg -y -i "file:input.mp4" -passlogfile "file:output.log" -pass 1 -an -f webm /dev/null
ffmpeg -y -i "file:input.mp4" -passlogfile "file:output.log" -pass 2 -f webm "file:output.webm"

strace output to see files access

First pass
[pid 48159] openat(AT_FDCWD, "file:output.log-0.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4

Second pass
[pid 48223] openat(AT_FDCWD, "output.log-0.log", O_RDONLY) = -1 ENOENT (No such file or directory)

Change History (1)

comment:1 by Chris Miceli, 4 years ago

Owner: set to Chris Miceli
Status: newopen

I have submitted a fix for this which is currently being reviewed in the developer email list. Thanks for the detailed report.

Note: See TracTickets for help on using tickets.