Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 conversion? #15

Open
dprestegard opened this issue Mar 19, 2020 · 5 comments
Open

Python 3 conversion? #15

dprestegard opened this issue Mar 19, 2020 · 5 comments

Comments

@dprestegard
Copy link

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'
@dprestegard
Copy link
Author

#16

@JollyGoal
Copy link

Btw you can check my fork for python3 compatibility and minor improvements

@campones
Copy link

campones commented Jan 6, 2022

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.

@JollyGoal
Copy link

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 :)

@campones
Copy link

yes and no. basically what op asked was a translation of the original script to python3. so we wouldn't lose any functionalities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants