Open pravindahal opened 1 year ago
I recently experienced this and took a look at the .wts file. Turns out the filter argument was thousands of lines long (long podcast). Anyway I managed to fix it by extracting this parameter to a text file and then replace it in the was file with:
-filter_complex_script filter.txt
rather than the -vf param
this then works. Can provide more info if necessary.
-filter_complex_script filter.txt
Thanks, can confirm that this solution works!
However, maybe it's just me, but with a large filte script ffmpeg takes ages to render the video. For comparison: a 3 minute audio (filter script 379 KB - that's roughly the amount you can still parse as command-line parameters) ffmpeg renders at 3x, while a 16 minute audio (filter script about 2 MB), ffmpeg renders at only 0.1x.
Am I holding it wrong or is that an unavoidable side effect at this scale?
Specs: latest ffmpeg snapshot on M1 Pro
This solution also helped me out!
Also bumped into this problem, output_wts should create parameter file instead of the long command https://github.com/ggerganov/whisper.cpp/blob/7a74e929c842489010f641156f2a5ac733b17016/examples/main/main.cpp#L693
I recently experienced this and took a look at the .wts file. Turns out the filter argument was thousands of lines long (long podcast). Anyway I managed to fix it by extracting this parameter to a text file and then replace it in the was file with:
-filter_complex_script filter.txt
rather than the -vf param
this then works. Can provide more info if necessary.
How to extract the filter param? For me the file is so large it lags out everything I use...
I recently experienced this and took a look at the .wts file. Turns out the filter argument was thousands of lines long (long podcast). Anyway I managed to fix it by extracting this parameter to a text file and then replace it in the was file with: -filter_complex_script filter.txt rather than the -vf param this then works. Can provide more info if necessary.
How to extract the filter param? For me the file is so large it lags out everything I use...
I use following command to generate param file,
grep -o -E '(\-vf ".+")' ${WAV}.wts > filter.txt
LC_ALL=C sed -E 's/(\-vf ".+")/\-filter_complex_script filter.txt/g' -I ${WAV}.wts
Maybe we can use ASS instead of many -vf filters: https://github.com/ggerganov/whisper.cpp/compare/master...tamo:whisper.cpp:main-wts-ass?expand=1 see https://aegisub.org/docs/latest/ass_tags/#\k
Maybe we can use ASS instead of many -vf filters: https://github.com/ggerganov/whisper.cpp/compare/master...tamo:whisper.cpp:main-wts-ass?expand=1 see https://aegisub.org/docs/latest/ass_tags/#\k
There's a script which can convert json output [-ojf
] to karaoke ass
Used the following to produce the working command:
# Extract the -vf parameter and save to filter.txt
awk '/-vf "/{flag=1} flag; /"/{flag=0}' fileName.wav.wts | awk 'BEGIN{RS="\""} /-vf /{getline; print}' > filter.txt
# Replace -vf parameter with -filter_complex_script filter.txt in the original file, preserving the surrounding text
perl -0777 -i.bak -pe 's/-vf ".*?"/-filter_complex_script filter.txt/s' fileName.wav.wts
Same issue here. I've tried with the commands listed above, but I got some errors in my environment (Ubuntu 22.04)
Finally I get it working with the following:
grep -oP '(?<=-vf ").*?(?=")' myfile.wav.wts > filter.txt
LC_ALL=C sed -E 's/\-vf ".*"/-filter_complex_script filter.txt/g' -i myfile.wav.wts
Thanks!
It seems that if the audio file is too long, the generated wts file cannot be converted to video.
enchiridion-01-epictetus_64kb.wav.wts.zip