How to catch a FFMPEG exception with subprocess?

I’m doing some work on subtitles and some videos have 1 subtitle track, others have 2 subtitle tracks. For those that have 2, I use the 2nd one (index = 1). I’m trying to automate it with python. For files with with 2 subtitle tracks, I use: -vf "subtitles=’file.mkv’:si=1 and for those with 1 subtitle… Read More How to catch a FFMPEG exception with subprocess?

Failed to capture the error message in linux

Failed to capture the response for the below command; URL="https://gsdfdsfithub.com/gitexpert/testGithub.git" > /dev/null git ls-remote $URL -q if [ $? -nq 0 ]; then echo "Failed, please provide valid url" fi output: fatal: unable to access ‘https://gsdfdsfithub.com/gitexpert/testGithub.git/’: Received HTTP code 404 from proxy after CONNECT 128 line 4: [: -nq: binary operator expected I tried the… Read More Failed to capture the error message in linux

Update only two lines in print inside jupyter notebbok

I want to print only two lines in my cycles, I started with the following: import time for i in range(10): time.sleep(0.5) for j in range(10): time.sleep(0.5) print(‘Index1:’, i) print(‘Index2:’, j) I tried different combinations of \r, \n, flush=True etc. at the beginning and end of print, but wasn’t successful(( What I’d like to see… Read More Update only two lines in print inside jupyter notebbok