master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.51k stars 155 forks source link

Encoding fails to start on Windows #131

Closed RolfHashcat closed 4 years ago

RolfHashcat commented 4 years ago

Hi.

Trying to encode a file using Av1an on Windows, it fails to start. All prerequisites installed & binaries are in the same folder. Tried troubleshooting with different ffmpeg versions, placing files & folders on root drive - didn't help, same traceback observed.

C:\av1an>python av1an.py -i C:\col.mkv -o C:\col_av1.mkv -v " --cpu-used=2 --cq-level=18 --end-usage=q "
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████
Traceback (most recent call last):
  File "av1an.py", line 22, in <module>
    main()
  File "av1an.py", line 18, in main
    Av1an().main_thread()
  File "av1an.py", line 14, in main_thread
    main_queue(self.args)
  File "C:\av1an\Av1an\encode.py", line 46, in main_queue
    encode_file(args)
  File "C:\av1an\Av1an\encode.py", line 79, in encode_file
    extract_audio(args.input, args.temp, args.audio_params)
  File "C:\av1an\Av1an\ffmpeg.py", line 57, in extract_audio
    is_audio_here = len(subprocess.run(check, stdout=PIPE, stderr=STDOUT).stdout) == 0
  File "C:\Program Files\Python\lib\subprocess.py", line 466, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Program Files\Python\lib\subprocess.py", line 769, in __init__
    restore_signals, start_new_session)
  File "C:\Program Files\Python\lib\subprocess.py", line 1113, in _execute_child
    args = list2cmdline(args)
  File "C:\Program Files\Python\lib\subprocess.py", line 524, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable
master-of-zen commented 4 years ago

@RolfHashcat try putting all paths in " ". Also relative paths are recommended. python av1an.py -i "C:\col.mkv" -o "C:\col_av1.mkv " -v " --cpu-used=2 -cq-level=18 --end-usage=q "

RolfHashcat commented 4 years ago

Tried

python av1an.py -i "C:\col.mkv" -o "C:\col_av1.mkv " -v " --cpu-used=2 --cq-level=18 --end-usage=q " >python av1an.py -i col.mkv -o col_av1.mkv -v " --cpu-used=2 --cq-level=18 --end-usage=q " python av1an.py -i col.mkv -o colav1.mkv

same deal.

n9Mtq4 commented 4 years ago

I know what's wrong. I'll fix it later today.

RolfHashcat commented 4 years ago

Thanks, it works now.