videoscripts
videoscripts copied to clipboard
Python 3 conversion?
Any chance we could get this converted to Python 3?
I tried the trusty old 2to3 but it blows up after thumbnail generation:
9 thumbs written in /mnt/videoscripts/sprites/thumbs/test_encode_vtt
START [2020-03-19 20:44:25.282928] : mogrify -geometry 100x /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv002.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv003.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv004.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv005.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv006.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv007.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv008.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv009.jpg /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv010.jpg
END [2020-03-19 20:44:25.497202]
b''
START [2020-03-19 20:44:25.497783] : identify -format "%g - %f
" /mnt/videoscripts/sprites/thumbs/test_encode_vtt/tv002.jpg
END [2020-03-19 20:44:25.507754]
b'100x56+0+0 - tv002.jpg\n'
Traceback (most recent call last):
File "makesprites.py", line 292, in <module>
run(task)
File "makesprites.py", line 259, in run
coords = get_geometry(thumbfiles[0]) #use the first file (since they are all same size) to get geometry settings
File "makesprites.py", line 145, in get_geometry
parts = geom.split("-",1)
TypeError: a bytes-like object is required, not 'str'
https://github.com/vlanard/videoscripts/pull/16
Btw you can check my fork for python3 compatibility and minor improvements
Btw you can check my fork for python3 compatibility and minor improvements
hi, it's not working out of the box, could you just rewrite her script in python3 language? thanks
the issue you see if your script works for one video at a time. this script is called batchsprites for a reason, this is what I use to do:
cd to videos dir ls -d -1 $PWD/.mp4 > videos.txt python batchsprites.py videos.txt
all videos in the folder would have a sprite conversion job.
Btw you can check my fork for python3 compatibility and minor improvements
hi, it's not working out of the box, could you just rewrite her script in python3 language? thanks
the issue you see if your script works for one video at a time. this script is called batchsprites for a reason, this is what I use to do:
cd to videos dir ls -d -1 $PWD/.mp4 > videos.txt python batchsprites.py videos.txt
all videos in the folder would have a sprite conversion job.
Hey, I guess I've added feature you needed. Check it if you still need it. And it is more a feature request rather than an issue so I don't think it is relevant to request it here :)
yes and no. basically what op asked was a translation of the original script to python3. so we wouldn't lose any functionalities