KrisKennaway / ii-vision

Streaming video and audio for Apple II
22 stars 1 forks source link

Where to find a demo video #5

Closed audetto closed 1 year ago

audetto commented 3 years ago

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?

audetto commented 3 years ago

Turns out that one needs git lfs to properly clone this repository. Without debugging I would have never realised the .bz2 files are links. Maybe a quick mention in the doc would help.

michaelquigley commented 1 year ago

Looks like the demo video LFS is over quota... #6

KrisKennaway commented 1 year ago

Apologies that I never replied to this issue! My notifications were disabled for this project for some reason 😞

I'm about to release a new version that stops using LFS for those transcoder data files - for now it will require generating them locally before first use, which takes about 90 minutes on my machine. I might look at hosting them elsewhere, but at 885MB that's also a lot to download.

As far as sample video files, I've uploaded some here and will update the README to link to them.

michaelquigley commented 1 year ago

No worries! Happy that we're working on this stuff! :+1:

audetto commented 1 year ago

A couple of corrections to the readme.

AppleWin can now emulate the Uthernet II card, but only in slot 3.

The linux version on the other hand allows to insert it in any slot. https://github.com/audetto/AppleWin