Open lisbonjoker opened 3 years ago
Hi,
thanks for reporting this issue. May I ask, if there's a chance to upload the sample movie? From the error I guess, there's an issue with the file.
Regards Martin
This is the code https://paste.fiery.me/?0f3b73a0fa94b11f#6PijaM5xThnBtbddqtoc6jknEN1hDtJmadZW84KeMvUf computer.txt
Unfortunately, I can't get the file you've linked.
This is what I see, when I click the link. What I'm doing wrong?
Odd, I'll try send it here: computer.txt
Do you know what could be?
Hi,
the original specification limits the number of characters per line and the number of lines to 67x14 characters. The player is somewhat restricted to that magic numbers. After looking at your provided files, it seems to not match this restrictions.
You may can shrink your movie file, no? Alternatively, feel free to provide a PR to make the player configurable for other movie source sizes ;) (currently I can't work on that.)
From ascii_movie.py
def load(self, filepath):
"""
Loads the ASCII movie from given text file.
Using an encoded format, described on
http://www.asciimation.co.nz/asciimation/ascii_faq.html
In short:
67x14 chars
lines separated with \n
first line is a number telling delay in number of frames
13 lines effective frame size
15 frames per second
Args:
filepath (str): Path to Ascii Movie Data
"""
Original spec ... http://www.asciimation.co.nz/asciimation/ascii_faq.html
Alternatively, feel free to provide a PR to make the player configurable for other movie source sizes ;)
There used to be a commit https://github.com/nitram509/ascii-telnet-server/commit/e3753e13a8db86f3aa2cb50546626b92913a3663 that implemented this function. But it was reverted by https://github.com/nitram509/ascii-telnet-server/commit/930aa00d8a32a24f31397df8a9455a8173658d1c. Shrug.
I would like to suggest nitram509 reverting this revert or cherry-pick some of my commits. For lisbonjoker, you may try my fork in https://github.com/ZenithalHourlyRate/ascii-telnet-server
Oh, you're right. And I apologize for not remembering ... this was once in but AFAIK did not work as expected, hence reverted and moved into a separate branch https://github.com/nitram509/ascii-telnet-server/tree/refactoring-auto-detection-frame-size. Also, I thought it would be smarter to auto-detect the frame size, as I guess, that would be easier for everyone to use then.
I'm sorry for not mentioning this earlier and I will have a look at your fork.
Thank you, for pointing this out.
AFAIK did not work as expected,
I wonder if you are referring to #10. I think that was caused by this single commit 81606544edbcf327e7a23238b3c31194d69a6c06. As I indicated in my comment, the state in commit 5b69116
works as expected.
hence reverted
I suggested reverting that single commit in that comment, but I'm afarid that you have reverted too many.
Also, I thought it would be smarter to auto-detect the frame size, as I guess, that would be easier for everyone to use then.
Detecting is hard, as we need to place some metadata in the movie file, thus designing the file format, or having some assumption about the movie file content. I suggest giving these parameters manually as a middle step.
I will have a look at your fork.
That fork remains what it was when I was sending PR to you, so no need to look at that again. Just review the earlier commits in this repo.
Odd, I'll try send it here: computer.txt
I have looked into your movie. You meant to use 110x24 as your frame size, but your first six frames did not follow this convention. Here is a fixed version of your movie. computer.txt
With this version, you may play it using the earlier version (or my fork) by the following command
python3 ascii_telnet_server.py -f /path/to/your/computer.txt --stdout -S 110x24 -s 110x25 -r 5
I did a text movie according to the examples but I always get this