WebmGenerator icon indicating copy to clipboard operation
WebmGenerator copied to clipboard

Linux mentioned, but not possible to get working?

Open spacelama opened this issue 2 years ago • 12 comments

There's several mentions on Linux/ubuntu etc in eg README.md, but judging from requirements.txt, this is never going to work with the dependency on pywin32 and inherent dependencies on things such as mpv-2.dll. Looking at git log/git blame, it looks like linux has been an afterthought since well before 4420ee3 and maybe all the way back to v2.1.4 (which I couldn't get pip3 install -r requirements.txt to run anyway).

If it's no longer a consideration, maybe that should be clarified in README.md.

spacelama avatar Nov 10 '23 02:11 spacelama

The win32 module is only used for supporting long and network hosted files on Windows, and the import is skipped on other platforms.

And yes on Linux it's the .so version of the library not the .dll, support for either us handled by pythonmpv.

Looks like removing the win32 line from the requirements.txt should get it all installing for you. I'll see about adding in a Linux specific requirements.txt

dfaker avatar Nov 10 '23 02:11 dfaker

OK, I had further problems when I tried that originally, but didn't realise most of the python stack dumps were from code paths that were try/excepted. Still unable to test probably because of my libmpv version (libmpv1) - I can't test that until I'm in a position to update my workstation from debian oldstable. (install instructions for linux could probably do with a note to ensure apt install libmpv2 or equivalent if available)

spacelama avatar Nov 10 '23 05:11 spacelama

Is it still not possible to run this on Linux? I recently put Manjaro and I'd love to have this on it. I really like the tool.

hanami117 avatar Jan 16 '24 11:01 hanami117

@LeKite I've added a requirements-linux.txt now skipping the win32 dependency, that along with libmpv2 should be all you need, give it a go and if you get any failures we'll see what additional guidance we need to add to a linux install note.

dfaker avatar Mar 18 '24 00:03 dfaker

Mmm im very stupid to know how to make it run though. An AUR package would be awesome

hanami117 avatar Apr 11 '24 19:04 hanami117

Haven't used this program in a while but I cloned it today and i'm unable to get it to work. Using arch linux.

`(webms) x@zxc ~/WebmGenerator (master)> python webmGenerator.py Initial working directory /home/x/WebmGenerator Current working directory /home/x/WebmGenerator 2024-06-17 21:32:50,196 [MainThread ] [INFO ] Startup. /home/x/WebmGenerator/src /home/x/WebmGenerator/webms/bin module 'os' has no attribute 'add_dll_directory' 2024-06-17 21:32:50,210 [MainThread ] [ERROR] win32api getShortPathName Exception Traceback (most recent call last): File "/home/x/WebmGenerator/src/encodingUtils.py", line 26, in import win32api ModuleNotFoundError: No module named 'win32api' /home/x/WebmGenerator/src /home/x/WebmGenerator/webms/bin module 'os' has no attribute 'add_dll_directory' 2024-06-17 21:32:50,301 [MainThread ] [INFO ] data registered as img_not_supported No module named 'webrtcvad' cleanInitialFiles {} [] 2024-06-17 21:32:50,383 [MainThread ] [ERROR] Zoomed state not avaliable, possibly on some linux distros? Traceback (most recent call last): File "/home/x/WebmGenerator/src/webmGeneratorUi.py", line 224, in init self.master.state('zoomed') File "/usr/lib/python3.12/tkinter/init.py", line 2295, in wm_state return self.tk.call('wm', 'state', self._w, newstate) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _tkinter.TclError: bad argument "zoomed": must be normal, iconic, or withdrawn Failed to load player bg image couldn't open ".\resources\playerbg.png": no such file or directory 2024-06-17 21:32:50,494 [MainThread ] [ERROR] Startup Exception Traceback (most recent call last): File "/home/x/WebmGenerator/webmGenerator.py", line 32, in webmGenerator = WebmGeneratorController(initialFiles) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/x/WebmGenerator/src/webmGeneratorController.py", line 247, in init self.cutselectionController = CutselectionController(self.cutselectionUi, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/x/WebmGenerator/src/cutselectionController.py", line 28, in init self.initialisePlayer() File "/home/x/WebmGenerator/src/cutselectionController.py", line 302, in initialisePlayer self.player = mpv.MPV(wid=str(int(playerFrameWid)), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 861, in init mpv_set_option_string(self.handle, k.replace('', '-').encode('utf-8'), istr(v).encode('utf-8')) File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 142, in raise_for_ec raise ex ValueError: ('Invalid value for mpv option', -7, (<MpvHandle object at 0x788630b17e50>, b'background', b'#282828')) 2024-06-17 21:32:50,496 [MainThread ] [ERROR] Traceback (most recent call last): File "/home/x/WebmGenerator/webmGenerator.py", line 32, in webmGenerator = WebmGeneratorController(initialFiles) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/x/WebmGenerator/src/webmGeneratorController.py", line 247, in init self.cutselectionController = CutselectionController(self.cutselectionUi, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/x/WebmGenerator/src/cutselectionController.py", line 28, in init self.initialisePlayer() File "/home/x/WebmGenerator/src/cutselectionController.py", line 302, in initialisePlayer self.player = mpv.MPV(wid=str(int(playerFrameWid)), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 861, in init mpv_set_option_string(self.handle, k.replace('', '-').encode('utf-8'), istr(v).encode('utf-8')) File "/home/x/WebmGenerator/webms/lib/python3.12/site-packages/mpv.py", line 142, in raise_for_ec raise ex ValueError: ('Invalid value for mpv option', -7, (<MpvHandle object at 0x788630b17e50>, b'background', b'#282828'))

2024-06-17 21:32:50,496 [MainThread ] [INFO ] DONE `

broconut123 avatar Jun 17 '24 19:06 broconut123

@broconut123 That background property was renamed in the last mpv release, patched now in #111

dfaker avatar Jun 17 '24 23:06 dfaker

@dfaker thanks!

broconut123 avatar Jun 18 '24 05:06 broconut123

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

hanami117 avatar Jun 20 '24 11:06 hanami117

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

Sure. Install tk and possibly mpv with aur helper yay or paru

paru -S tk mpv

cd into the webmgenerator folder

make a virtual environment https://wiki.archlinux.org/title/Python/Virtual_environment python -m venv envname then activate environment with source envname/bin/activate then pip install -r requirements-linux.txt then run it with python webmGenerator.py

broconut123 avatar Jun 20 '24 13:06 broconut123

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

Sure. Install tk and possibly mpv with aur helper yay or paru

paru -S tk mpv

cd into the webmgenerator folder

make a virtual environment https://wiki.archlinux.org/title/Python/Virtual_environment

python -m venv envname

then activate environment with

source envname/bin/activate

then

pip install -r requirements-linux.txt

then run it with

python webmGenerator.py

I will try this asap. Is mpv from AUR needed? I think I run it from arch repo

hanami117 avatar Jun 20 '24 13:06 hanami117

@broconut123 hey buddy I saw you're using Arch.. would you help me make this run? ;w;

Sure. Install tk and possibly mpv with aur helper yay or paru

paru -S tk mpv

cd into the webmgenerator folder

make a virtual environment https://wiki.archlinux.org/title/Python/Virtual_environment python -m venv envname then activate environment with source envname/bin/activate then pip install -r requirements-linux.txt then run it with python webmGenerator.py

Holy it worked! Thanks! This should be added as a Linux installation guide by @dfaker Imo! Thanks a lot I really missed this on Arch :)

hanami117 avatar Jun 20 '24 15:06 hanami117

@dfaker hey sorry to bump this again, but I am getting this error with every file I try to render

b'\rframe=  108 fps=108 q=17.0 size=   16128KiB time=00:00:04.42 bitrate=29884.3kbits/s speed=4.41x    '
b'\rframe=  176 fps=117 q=17.0 size=   26624KiB time=00:00:07.25 bitrate=30053.3kbits/s speed=4.83x    '
b'\rframe=  235 fps=117 q=17.0 size=   35840KiB time=00:00:09.71 bitrate=30212.0kbits/s speed=4.85x    '
b'\rframe=  296 fps=118 q=17.0 size=   45824KiB time=00:00:12.30 bitrate=30509.7kbits/s speed=4.91x    '
b'\rframe=  358 fps=119 q=17.0 size=   56320KiB time=00:00:14.84 bitrate=31072.8kbits/s speed=4.94x    '
b'\rframe=  417 fps=119 q=17.0 size=   66048KiB time=00:00:17.30 bitrate=31259.3kbits/s speed=4.94x    '
b'\rframe=  480 fps=120 q=17.0 size=   76544KiB time=00:00:19.93 bitrate=31452.2kbits/s speed=4.98x    '
b'\rframe=  538 fps=119 q=17.0 size=   86272KiB time=00:00:22.35 bitrate=31613.5kbits/s speed=4.96x    '
b'\rframe=  598 fps=119 q=17.0 size=   96768KiB time=00:00:24.85 bitrate=31889.9kbits/s speed=4.96x    '
b'\rframe=  659 fps=119 q=17.0 size=  107264KiB time=00:00:27.40 bitrate=32066.8kbits/s speed=4.97x    '
allowableTargetSizeUnderrun 0.15
sizeLimitMax 4194304.0
sizeLimitMin 3565158.4
Encoding final 2352718937_8.webm 0.48717948717948717
------
sizeLimitMax 4194304.0
targetSizeMedian 3879731.2
sizeLimitMin 3565158.4
dependentValueMaximum 6144000.0
val 982863.2106666667
------
VP9 targetWidth: 1280
VP9 tileColumns: 1
Ffmpeg command: ffmpeg -y -i tempVideoFiles/0_2352718937mp4_4.824177741514362_34.82417774151436_9149d78ba7_1720869227_0.mp4 -filter_complex_script tempVideoFiles/filters_8.txt -map [outvfinal] -map [outa] -pass 1 -passlogfile tempVideoFiles/encoder_8.log -shortest -copyts -start_at_zero -c:v libvpx-vp9 -c:a libopus -stats -pix_fmt yuv420p -threads 4 -auto-alt-ref 6 -lag-in-frames 25 -quality good -psnr -row-mt 1 -tile-columns 1 -tile-rows 0 -arnr-maxframes 7 -arnr-strength 5 -aq-mode 0 -tune-content film -enable-tpl 1 -frame-parallel 0 -metadata Title=2352718937 WmG -b:v 982863 -an -sn -f null /dev/null
None None
Complete Pass 1 Stats Pass 2  tempVideoFiles/2352718937_8.webm 0.48717948717948717
VP9 targetWidth: 1280
VP9 tileColumns: 1
Ffmpeg command: ffmpeg -y -i tempVideoFiles/0_2352718937mp4_4.824177741514362_34.82417774151436_9149d78ba7_1720869227_0.mp4 -filter_complex_script tempVideoFiles/filters_8.txt -map [outvfinal] -map [outa] -pass 2 -passlogfile tempVideoFiles/encoder_8.log -shortest -copyts -start_at_zero -c:v libvpx-vp9 -c:a libopus -stats -pix_fmt yuv420p -threads 4 -auto-alt-ref 6 -lag-in-frames 25 -speed 1 -quality good -psnr -row-mt 1 -tile-columns 1 -tile-rows 0 -arnr-maxframes 7 -arnr-strength 5 -aq-mode 0 -tune-content film -enable-tpl 1 -frame-parallel 0 -metadata Title=2352718937 WmG -b:v 982863 -ac 1 -ar 48k -b:a 65536 -sn tempVideoFiles/2352718937_8.webm
None None
Complete Pass 1 Encode Pass 2  tempVideoFiles/2352718937_8.webm 0.7435897435897436
2024-07-13 13:22:40,580 [Thread-6 (en] [ERROR]  unhandled CONCAT exception
Traceback (most recent call last):
  File "/home/beki/WebmGenerator/src/ffmpegService.py", line 1448, in encodeWorker
    encodeConcat(tempPathname,outputPathName,runNumber,requestId,mode,seqClips,options,filenamePrefix,statusCallback)
  File "/home/beki/WebmGenerator/src/ffmpegService.py", line 1417, in encodeConcat
    finalEncoder(inputsList,
  File "/home/beki/WebmGenerator/src/encoders/webmvp9Encoder.py", line 253, in encoder
    finalFilenameConfirmed = optimiser(encoderFunction=encoderFunction,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/beki/WebmGenerator/src/optimisers/linear.py", line 54, in encodeTargetingSize
    finalSize,lastpsnr,returnCode = encoderFunction(val,passCount,passReason,passPhase=2,requestId=requestId,widthReduction=widthReduction,cqMode=cqMode)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/beki/WebmGenerator/src/encoders/webmvp9Encoder.py", line 235, in encoderFunction
    finalSize = os.stat(tempVideoFilePath).st_size
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'tempVideoFiles/2352718937_8.webm'
`
```

hanami117 avatar Jul 13 '24 11:07 hanami117

I have to add, I made webms previously with this method on Arch...

hanami117 avatar Jul 13 '24 11:07 hanami117

@LeKite not really enough to go on there apart from ffmpeg is failing to produce a file.

"previously with this method" could mean anything!

Is this for all encode types? (mp4 and VP8 webm too for example), do you have any filters applied?

What ffmpeg version do you have installed?

dfaker avatar Jul 13 '24 18:07 dfaker

@LeKite not really enough to go on there apart from ffmpeg is failing to produce a file.

"previously with this method" could mean anything!

Is this for all encode types? (mp4 and VP8 webm too for example), do you have any filters applied?

What ffmpeg version do you have installed?

Sorry. To clarify. This method means on arch with the installation provided from the other user.. anyway no filters. Happens with mp4 rendering and vp9 webm at least. I can try more and give you any info you ask me

hanami117 avatar Jul 13 '24 20:07 hanami117

Does seem like the ffmpeg version mismatch in that case, please run a ffmpeg -version and confirm what you're running.

dfaker avatar Jul 14 '24 17:07 dfaker

Hello @dfaker thanks for your reply. ffmpeg version n7.0.1 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 14.1.1 (GCC) 20240522 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mbedtls --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan libavutil 59. 8.100 / 59. 8.100 libavcodec 61. 3.100 / 61. 3.100 libavformat 61. 1.100 / 61. 1.100 libavdevice 61. 1.100 / 61. 1.100 libavfilter 10. 1.100 / 10. 1.100 libswscale 8. 1.100 / 8. 1.100 libswresample 5. 1.100 / 5. 1.100 libpostproc 58. 1.100 / 58. 1.100

Here we go!

hanami117 avatar Jul 14 '24 18:07 hanami117

All seems correct, try running those Ffmpeg commands it's printing into the console in the same wording dir as WmG and see what the internal failure in ffmpeg is.

You'll need to get the console output from a running instance of WmG and make sure to keep WmG open so it doesn't delete the temporary files.

dfaker avatar Jul 15 '24 00:07 dfaker

image Hello, even without making ffmpeg test you told me about, I see that the file is not present in the folder.

FileNotFoundError: [Errno 2] No such file or directory: 'tempVideoFiles/dHisueOMr-k-3Fig_3.webm'

While in the folder I have this as you can see /home/beki/WebmGenerator/tempVideoFiles/0_dHisueOMr-k-3Figmp4_0.0_11.586757369614512_9149d78ba7_1721060907_0.mp4

Is this of any help?

This is my whole terminal


------
['ffmpeg', '-y', '-i', 'tempVideoFiles/0_dHisueOMr-k-3Figmp4_0.0_11.586757369614512_9149d78ba7_1721060907_0.mp4', '-filter_complex_script', 'tempVideoFiles/filters_3.txt', '-map', '[outvfinal]', '-map', '[outa]', '-pass', '1', '-passlogfile', 'tempVideoFiles/encoder_3.log', '-shortest', '-slices', '8', '-copyts', '-start_at_zero', '-c:v', 'libvpx', '-c:a', 'libvorbis', '-stats', '-pix_fmt', 'yuv420p', '-bufsize', '5357458', '-threads', '4', '-crf', '4', '-auto-alt-ref', '1', '-lag-in-frames', '25', '-deadline', 'best', '-slices', '8', '-cpu-used', '16', '-psnr', '-movflags', '+faststart', '-f', 'webm', '-metadata', 'title=dHisueOMr-k-3Fig WmG', '-metadata', 'WritingApp=WebmGenerator v3.41.1', '-metadata', 'DateUTC=2024-07-15T16:29:10.308536']
None None
Complete Pass 1 Stats Pass 2  tempVideoFiles/dHisueOMr-k-3Fig_3.webm 0.5
['ffmpeg', '-y', '-i', 'tempVideoFiles/0_dHisueOMr-k-3Figmp4_0.0_11.586757369614512_9149d78ba7_1721060907_0.mp4', '-filter_complex_script', 'tempVideoFiles/filters_3.txt', '-map', '[outvfinal]', '-map', '[outa]', '-pass', '2', '-passlogfile', 'tempVideoFiles/encoder_3.log', '-shortest', '-slices', '8', '-copyts', '-start_at_zero', '-c:v', 'libvpx', '-c:a', 'libvorbis', '-stats', '-pix_fmt', 'yuv420p', '-bufsize', '5357458', '-threads', '4', '-crf', '4', '-auto-alt-ref', '1', '-lag-in-frames', '25', '-deadline', 'best', '-slices', '8', '-cpu-used', '16', '-psnr', '-movflags', '+faststart', '-f', 'webm', '-metadata', 'title=dHisueOMr-k-3Fig WmG', '-metadata', 'WritingApp=WebmGenerator v3.41.1', '-metadata', 'DateUTC=2024-07-15T16:29:10.349243']
None None
Complete Pass 1 Encode Pass 2  tempVideoFiles/dHisueOMr-k-3Fig_3.webm 0.75
2024-07-15 18:29:10,388 [Thread-6 (en] [ERROR]  unhandled CONCAT exception
Traceback (most recent call last):
  File "/home/beki/WebmGenerator/src/ffmpegService.py", line 1448, in encodeWorker
    encodeConcat(tempPathname,outputPathName,runNumber,requestId,mode,seqClips,options,filenamePrefix,statusCallback)
  File "/home/beki/WebmGenerator/src/ffmpegService.py", line 1417, in encodeConcat
    finalEncoder(inputsList,
  File "/home/beki/WebmGenerator/src/encoders/webmvp8Encoder.py", line 193, in encoder
    finalFilenameConfirmed = optimiser(encoderFunction=encoderFunction,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/beki/WebmGenerator/src/optimisers/linear.py", line 54, in encodeTargetingSize
    finalSize,lastpsnr,returnCode = encoderFunction(val,passCount,passReason,passPhase=2,requestId=requestId,widthReduction=widthReduction,cqMode=cqMode)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/beki/WebmGenerator/src/encoders/webmvp8Encoder.py", line 176, in encoderFunction
    finalSize = os.stat(tempVideoFilePath).st_size
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'tempVideoFiles/dHisueOMr-k-3Fig_3.webm'

hanami117 avatar Jul 15 '24 16:07 hanami117

in that case the question is why isn't the prior command producing an output file.

dfaker avatar Jul 15 '24 17:07 dfaker

in that case the question is why isn't the prior command producing an output file.

... do I do the same thing as you previously explained?

hanami117 avatar Jul 15 '24 18:07 hanami117

I'm running into the same FileNotFoundError: [Errno 2] No such file or directory issue. The encode gets stuck at 75% and the errors are the same ( [Thread-6 (en] [ERROR] unhandled CONCAT exception and then the no such file error) ffmpeg version n7.0.1 Arch Linux I've encoded hundreds of vp9 webms using WmG previously on the same setup. cloned the repo today

Trying to encode an h.264 mp4 with the filename test.mp4 to vp9 webm.

At the time of the error, my tempVideoFiles folder has filters_1.txt along with 0_testmp4_0.0_1.0010000000000001_c0a5150cb0_1722805269_0.mp4 but no log file despite it claiming it finished pass 1.

Trying to run the ffmpeg commands given

ffmpeg -y -i tempVideoFiles/0_testmp4_0.0_1.0010000000000001_c0a5150cb0_1722805269_0.mp4 -filter_complex_script tempVideoFiles/filters_1.txt -map [outvfinal] -pass 1 -passlogfile tempVideoFiles/encoder_1.log -shortest -copyts -start_at_zero -c:v libvpx-vp9 -c:a libopus -stats -pix_fmt yuv420p -threads 4 -auto-alt-ref 6 -lag-in-frames 25 -quality good -psnr -row-mt 1 -tile-columns 1 -tile-rows 0 -arnr-maxframes 7 -arnr-strength 5 -aq-mode 0 -tune-content film -enable-tpl 1 -frame-parallel 0 -metadata Title=test WmG -b:v 6144000.0 -an -sn -f null /dev/null

I get zsh: no matches found: [outvfinal] Assuming this is just a formatting error with my shell I put it in quotations. Next I get Unrecognized option 'psnr'. if I remove the psnr flag I get [AVFormatContext @ 0x63c31e0e5900] Unable to choose an output format for 'WmG'; use a standard extension for the filename or specify the format manually. [out#0 @ 0x63c31e0a5b00] Error initializing the muxer for WmG: Invalid argument Error opening output file WmG. Error opening output files: Invalid argument I assume this is also just a weird formatting error with the title metadata and my shell so I put that in quotations.

After that, it did work. It created a log, and I then continued to run the 2nd pass command after fixing it up in the same way (adding quotations, removing -psnr):

ffmpeg -y -i tempVideoFiles/0_testmp4_0.0_1.0010000000000001_c0a5150cb0_1722805269_0.mp4 -filter_complex_script tempVideoFiles/filters_1.txt -map "[outvfinal]" -pass 2 -passlogfile tempVideoFiles/encoder_1.log -shortest -copyts -start_at_zero -c:v libvpx-vp9 -c:a libopus -stats -pix_fmt yuv420p -threads 4 -auto-alt-ref 6 -lag-in-frames 25 -speed 1 -quality good -row-mt 1 -tile-columns 1 -tile-rows 0 -arnr-maxframes 7 -arnr-strength 5 -aq-mode 0 -tune-content film -enable-tpl 1 -frame-parallel 0 -metadata Title="test WmG" -b:v 6144000.0 -an -sn tempVideoFiles/test_1.webm

and it worked as well although the output webm was extremely low bitrate for whatever reason. I'm not super familiar with what the PSNR option is supposed to do so maybe the quality is related to removing that?

I know most of this was me adjusting for zsh but I wanted to thoroughly explain all of my steps. psnr being an unrecognized option seemed to be the only real roadblock.

If there's anything else I can supply let me know.

Mojavve avatar Aug 04 '24 21:08 Mojavve

@Mojavve very helpful I saw that was being deprecated but isn't yet gone on my version, will toggle that to the new option.

dfaker avatar Aug 05 '24 08:08 dfaker

I'm running into the same FileNotFoundError: [Errno 2] No such file or directory issue. The encode gets stuck at 75% and the errors are the same ( [Thread-6 (en] [ERROR] unhandled CONCAT exception and then the no such file error) ffmpeg version n7.0.1 Arch Linux I've encoded hundreds of vp9 webms using WmG previously on the same setup. cloned the repo today

Trying to encode an h.264 mp4 with the filename test.mp4 to vp9 webm.

At the time of the error, my tempVideoFiles folder has filters_1.txt along with 0_testmp4_0.0_1.0010000000000001_c0a5150cb0_1722805269_0.mp4 but no log file despite it claiming it finished pass 1.

Trying to run the ffmpeg commands given

ffmpeg -y -i tempVideoFiles/0_testmp4_0.0_1.0010000000000001_c0a5150cb0_1722805269_0.mp4 -filter_complex_script tempVideoFiles/filters_1.txt -map [outvfinal] -pass 1 -passlogfile tempVideoFiles/encoder_1.log -shortest -copyts -start_at_zero -c:v libvpx-vp9 -c:a libopus -stats -pix_fmt yuv420p -threads 4 -auto-alt-ref 6 -lag-in-frames 25 -quality good -psnr -row-mt 1 -tile-columns 1 -tile-rows 0 -arnr-maxframes 7 -arnr-strength 5 -aq-mode 0 -tune-content film -enable-tpl 1 -frame-parallel 0 -metadata Title=test WmG -b:v 6144000.0 -an -sn -f null /dev/null

I get zsh: no matches found: [outvfinal] Assuming this is just a formatting error with my shell I put it in quotations. Next I get Unrecognized option 'psnr'. if I remove the psnr flag I get [AVFormatContext @ 0x63c31e0e5900] Unable to choose an output format for 'WmG'; use a standard extension for the filename or specify the format manually. [out#0 @ 0x63c31e0a5b00] Error initializing the muxer for WmG: Invalid argument Error opening output file WmG. Error opening output files: Invalid argument I assume this is also just a weird formatting error with the title metadata and my shell so I put that in quotations.

After that, it did work. It created a log, and I then continued to run the 2nd pass command after fixing it up in the same way (adding quotations, removing -psnr):

ffmpeg -y -i tempVideoFiles/0_testmp4_0.0_1.0010000000000001_c0a5150cb0_1722805269_0.mp4 -filter_complex_script tempVideoFiles/filters_1.txt -map "[outvfinal]" -pass 2 -passlogfile tempVideoFiles/encoder_1.log -shortest -copyts -start_at_zero -c:v libvpx-vp9 -c:a libopus -stats -pix_fmt yuv420p -threads 4 -auto-alt-ref 6 -lag-in-frames 25 -speed 1 -quality good -row-mt 1 -tile-columns 1 -tile-rows 0 -arnr-maxframes 7 -arnr-strength 5 -aq-mode 0 -tune-content film -enable-tpl 1 -frame-parallel 0 -metadata Title="test WmG" -b:v 6144000.0 -an -sn tempVideoFiles/test_1.webm

and it worked as well although the output webm was extremely low bitrate for whatever reason. I'm not super familiar with what the PSNR option is supposed to do so maybe the quality is related to removing that?

I know most of this was me adjusting for zsh but I wanted to thoroughly explain all of my steps. psnr being an unrecognized option seemed to be the only real roadblock.

If there's anything else I can supply let me know.

Now that you mention it. I may have swapped from bash to zsh and the error started occurring.

hanami117 avatar Aug 05 '24 08:08 hanami117

PSNR flag changed in master now.

dfaker avatar Aug 05 '24 09:08 dfaker

PSNR flag changed in master now.

I can confirm it worked, but the result is very bad. image

This is a 30second clip, webm VP9 with audio. rez is 720p. Is this normal behavior?

hanami117 avatar Aug 05 '24 11:08 hanami117

image Another 16 second clip from instagram

hanami117 avatar Aug 05 '24 11:08 hanami117

Yep that definitely seems worse than expected, I'll need to bisect the ffmpeg versions.

dfaker avatar Aug 05 '24 12:08 dfaker

seemingly an ffmpeg 2-pass regression

dfaker avatar Aug 05 '24 17:08 dfaker