Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: FfmpegProcess.run() got an unexpected keyword argument 'log_file' #48

Open
nothing2obvi opened this issue Jan 29, 2025 · 2 comments
Assignees

Comments

@nothing2obvi
Copy link

nothing2obvi commented Jan 29, 2025

Hello, I used this successfully before, many times, a few months ago, but I guess because I updated now when I run the command I get an error.

This is my command:

python3 '/Users/username/video-quality-metrics/main.py' -i "/path/to/video" -e libx265 -c "preset slow crf 18,preset slow crf 20,preset slow crf 22" --interval 60 --clip-length 2 -o '/Users/username/video-quality-metrics/output' --n-threads 6

These are the results:

Overview Video: /Users/username/video-quality-metrics/output/Overview_Video.mkv
--------------------------------------------------------------------------------
Combination Mode activated.
--------------------------------------------------------------------------------
Transcoding the video using combination '-preset slow -crf 18'...

Traceback (most recent call last):
  File "/Users/username/video-quality-metrics/main.py", line 326, in <module>
	main()
	~~~~^^
  File "/Users/username/video-quality-metrics/main.py", line 302, in main
	process_combination(
	~~~~~~~~~~~~~~~~~~~^
		combination, video_path, output_folder, args, table, vmaf_scores
		^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	)
	^
  File "/Users/username/video-quality-metrics/main.py", line 147, in process_combination
	time_taken, json_file_path = transcode_and_analyse(
								 ~~~~~~~~~~~~~~~~~~~~~^
		video_path,
		^^^^^^^^^^^
	...<4 lines>...
		f"combination '{combination_string}'",
		^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	)
	^
  File "/Users/username/video-quality-metrics/main.py", line 108, in transcode_and_analyse
	time_taken = transcode_video(
		video_path,
	...<4 lines>...
		combination_list,
	)
  File "/Users/username/video-quality-metrics/transcode_video.py", line 35, in transcode_video
	process.run(log_file="transcode_log.txt", progress_bar_description="")
	~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: FfmpegProcess.run() got an unexpected keyword argument 'log_file'
username@user-Mac-Mini ~ % 

What should I do? Thanks!

CrypticSignal added a commit that referenced this issue Feb 1, 2025
@CrypticSignal
Copy link
Owner

@nothing2obvi Fixed in the latest code.

@CrypticSignal
Copy link
Owner

@nothing2obvi By the way, as you are only comparing the effect of one parameter being changed, you don't need to use combination mode. You can achieve the same result by replacing -c "preset slow crf 18,preset slow crf 20,preset slow crf 22" with -p crf -v 18 20 22 --encoder-options="-preset slow". The command can be made even shorter by using the the alias of --encoder-options which is -eo.

@CrypticSignal CrypticSignal self-assigned this Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants