Opened 11 years ago
Last modified 11 years ago
#3097 new enhancement
-report option with parallel ffmpeg instances overwrites existing report files
Reported by: | foldaway | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I regularly use two instances of ffmpeg in parallel. With the output of the 1st instance being piped to the input of the 2nd instance.
I would like to be able to generate independent '-report' files from each. Currently only 1 report is generated, as the report file from the 1st instance is overwritten by the 2nd instance.
I understand that report output can be specified using the FFREPORT environment variable but this does not allow sending the report of each instance to a different file. I also understand that specifying a report filename as an option is problematic.
So here's a couple of imagined potential solutions:
1: The unique filename is generated using date,hours,mins,secs at the end. If this included milliseconds, the files are unlikely to collide.
2: Check for the existence of the report file before write & if it does exist change the report filename eg. add '-2' at the end.
Change History (6)
follow-up: 2 comment:1 by , 11 years ago
comment:2 by , 11 years ago
If running 2 instances in parallel like so:
ffmpeg -report -i input ... -f mpegts - | ffmpeg -report -f mpegts -i - ... output
Setting the environment variable FFREPORT will apply to both. Meaning only 1 report file is generated not 2, as required.
follow-up: 4 comment:3 by , 11 years ago
You can set different environment variables in different elements of a pipeline:
FFREPORT=file=a.txt ffmpeg ... - | FFREPORT=file=b.txt ffmpeg -i - ...
follow-up: 5 comment:4 by , 11 years ago
Sorry, I failed to mention I'm running on Windows. I don't think this is possible on Windows.
follow-up: 6 comment:5 by , 11 years ago
Replying to foldaway:
Sorry, I failed to mention I'm running on Windows.
I don't think this is possible on Windows.
Why do you think so?
comment:6 by , 11 years ago
Because AFAICT it isn't possible from the command line. As a workaround, I'm calling FFmpeg through CreateProcess so I can define the environment (/FFREPORT) uniquely for each instance.
Replying to foldaway:
I believe it does allow it:
Or maybe I misunderstood your issue.