HoloArchivists/twspace-dl

subprocess.CalledProcessError

leegdcert opened this issue · 3 comments

Describe the bug
When I use the twspace_dl tool in the linux enviroment, I encountered the subprocess.CalledProcessError, the detailed errors are displayed as follows:

To Reproduce
Input command example : twspace_dl -i https://twitter.com/i/spaces/1eaKbNOMMmXKX

Output
Error Output:

Unrecognized option 'protocol_whitelist'.
Error splitting the argument list: Option not found
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.8/site-packages/twspace_dl/twspace_dl.py", line 164, in download
subprocess.run(cmd_old, check=True)
File "/root/anaconda3/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ffmpeg', '-protocol_whitelist', 'file,https,tls,tcp', '-y', '-stats', '-v', 'warning', '-i', './tmpur8x10cr/............................', '-c', 'copy', '-metadata', 'title=......', '-metadata', 'artist=................', '-metadata', 'episode_id=1BdGYwOazmgxX', './tmpur8x10cr/.........']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/root/anaconda3/bin/twspace_dl", line 8, in
sys.exit(main())
File "/root/anaconda3/lib/python3.8/site-packages/twspace_dl/main.py", line 199, in main
args.func(args)
File "/root/anaconda3/lib/python3.8/site-packages/twspace_dl/main.py", line 92, in space
twspace_dl.download()
File "/root/anaconda3/lib/python3.8/site-packages/twspace_dl/twspace_dl.py", line 166, in download
raise RuntimeError(" ".join(err.cmd)) from err
RuntimeError: ffmpeg -protocol_whitelist file,https,tls,tcp -y -stats -v warning -i ./tmpur8x10cr/............ -c copy -metadata title=.......... -metadata artist=............... -metadata episode_id=1BdGYwOazmgxX ./tmpur8x10cr/............BdGYwOazmgxX.m4a

Desktop (please complete the following information):

  • OS: Linux
  • Installation method :pip install

This is probably an issue with your ffmpeg version. Could you send the output of ffmpeg -version?

This is probably an issue with your ffmpeg version. Could you send the output of ffmpeg -version?

ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100

Any advice?

You need to update your ffmpeg version for the program to work. I think anything higher than 3.1 will work but I haven't tested them. The process depends on your distribution of linux.