How to use the vidgear.gears.helper.validate_ffmpeg function in vidgear

To help you get started, we’ve selected a few vidgear examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github abhiTronix / vidgear / tests / test_helper.py View on Github external
def test_validate_ffmpeg(paths):
	FFmpeg_path = ''
	if os.name == 'nt':
		FFmpeg_path += os.path.join(paths, 'ffmpeg-latest-{}-static/bin/ffmpeg.exe'.format(getBitmode()))
	else:
		FFmpeg_path += os.path.join(paths, 'ffmpeg-4.1.3-{}-static/ffmpeg'.format(getBitmode(False)))
	try:
		output = validate_ffmpeg(FFmpeg_path, logging = True)
		if paths != 'wrong_test_path':
			assert bool(output), "Validation Test failed at path: {}".format(FFmpeg_path)
	except Exception as e:
		if paths == 'wrong_test_path':
			pass
		else:
			pytest.fail(str(e))