I am having a bad time trying to figure out how to write this command in the subprocess.
In the terminal I run :
ffprobe -i test.avi -show_format -v quiet | sed -n 's/duration=//p' | xargs printf %.0f
and it runs fine. Now in the python 3 I want to run it in my code and it gives me an error. I tried
subprocess.call(['ffprobe', '-i', 'test.avi' ,'-show_format', '-v' ,'quiet' ,'|', 'sed' ,'-n' ,'s/duration=//p', '|' ,'xargs printf %.0f'])
and
subprocess.run(['ffprobe', '-i', 'test.avi' ,'-show_format', '-v' ,'quiet' ,'|', 'sed' ,'-n' ,'s/duration=//p', '|' ,'xargs printf %.0f'])
but none works.