kriskennaway / ii-vision Goto Github PK
View Code? Open in Web Editor NEWStreaming video and audio for Apple II
Streaming video and audio for Apple II
Any chance of sticking the example videos on Google Drive, or some similar service?
I've got a bunch of this stack ready to go, but I'm struggling with trying to transcode a video. Would love to test with a known-good video.
The bug referenced in the docs limiting to Python 3.7 seems to have been fixed:
https://bugs.python.org/issue44439
BMP2DHR only supports error-diffusion dithering which is not appropriate for video. Positional/ordered dithering is much more appropriate for video; it is stable across the spatial domain, which translates into being stable across the time domain. Without any changes in the player, this will allow for larger display updates with less dither noise.
Some good free algorithms for doing this are at https://bisqwit.iki.fi/story/howto/dither/jy/
Congratulations, this is super cool in every way!
Have you considered using the amazing A2BestPix DHGR encoder described here?...
He's researched a way to get exceptional conversions by taking advantage of the fuzzy bleeding artifacts between each pixel on an analog Apple II display. His sample images are stunning and I'd really love to see those come to life in your transcoder.
AppleWin supports Uthernet I and II
Hi
I am trying to stream an mp4 to an Apple ii, but really struggle to make transcode/main.py to work.
Errors look like
Palette NTSC
Input frame rate = 30.000000
Starting frame 1
Similarity 0.000000
Traceback (most recent call last):
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/main.py", line 73, in <module>
main(parser.parse_args())
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/main.py", line 68, in main
for bytes_out, b in enumerate(m.emit_stream(m.encode())):
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/movie.py", line 110, in emit_stream
for op in ops:
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/movie.py", line 87, in encode
(page, content, offsets) = next(
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/video.py", line 88, in encode_frame
yield from self._index_changes(
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/video.py", line 119, in _index_changes
diff_weights = target_pixelmap.diff_weights(self.pixelmap, is_aux)
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/screen.py", line 403, in diff_weights
return self._diff_weights(source.packed, is_aux)
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/screen.py", line 438, in _diff_weights
dist = self.edit_distances(self.palette)[o][pair].reshape(
File "/home/andrea/projects/cvs/3rdParty/ii-vision/transcoder/screen.py", line 348, in edit_distances
dist = pickle.load(ed) # type: List[np.ndarray]
File "/usr/lib/python3.8/bz2.py", line 172, in peek
return self._buffer.peek(n)
File "/usr/lib/python3.8/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/usr/lib/python3.8/_compression.py", line 103, in read
data = self._decompressor.decompress(rawblock, size)
OSError: Invalid data stream
Do you have an example file I could try?
I'm running into the following error when trying to transcode a video. It appears to be hitting bmp2dhr
, which is emitting the following:
% python3 transcoder/main.py voir.mp4
/Users/michael/Repos/ii-vision/transcoder/audio.py:58: FutureWarning: Pass orig_sr=48000, target_sr=14700.0 as keyword args. From version 0.10 passing these as positional arguments will result in an error
a = librosa.resample(a, f.samplerate,
Palette NTSC
Input frame rate = 23.976024
Palette 5: tohgr NTSC DHGR Colors
Preview Palette 5: tohgr NTSC DHGR Colors
voir/DHGR/NTSC/00000000.bmp is in the wrong format!
Exception in thread Thread-1:
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/Users/michael/Repos/ii-vision/transcoder/frame_grabber.py", line 125, in worker
q.put(decode(_idx, _frame))
File "/Users/michael/Repos/ii-vision/transcoder/frame_grabber.py", line 112, in _dhgr_decode
_main = np.fromfile(mainfile, dtype=np.uint8)
FileNotFoundError: [Errno 2] No such file or directory: 'voir/DHGR/NTSC/00000000.BIN'
The error appears to be bmp2dhr
spitting out voir/DHGR/NTSC/00000000.bmp is in the wrong format!
I tried to contact the author of Bmp2DHR but the email just bounces.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.