Posts

VFAT: too skinny for me.

 A note I should add. VFAT can't handle files over 4GB: format USB datasticks with ext2fs. I built this video player as shown, on a Raspberry Pi running Debian Linux.  The OS and the software (a simple shell script) are stored on the built-in flash RAM on the Pi, but the intention was always that the videos would be stored on a USB data stick (one or more) which could be easily swapped in and out. So I set about ripping all the desired movies to digital form, which I did "in parallel" as I was also building the hardware and writing the software (since ripping the movies happens only at 1x regular speed, coming from a VHS player, it took many hours across several nights, to rip the 20-or-30 favourite movies which we wanted to have available on this system). Then, I tried to copy the resulting digital video files (.mpg format) over to my data stick.  Whoops!  Files too big, can't store.  WTF???  The problem was happening when the file was larger than 4GB (wh...

photos

Image
  booting Debian... I built a plywood "chassis" (bottom and back panels), with finished pine front panel.  Black steel top cover is scavenged from some old piece of audio or video equipment. Here you can see the poplar reinforcement beam I had to fit into the metal cover, so that it would carry the weight of a big monitor on top without bending excessively. Each button presses one of the microswitches, which ground the GPIO lines which are otherwise pulled high to 3.3v, using the 2.2k resistors visible in the foreground. The boards holding the red & blue LEDs can be seen at the top, spaced in between the three button assemblies.  The LEDs shine upon the paper liners, which are visible from the front through the wide gaps around each button shape.  This forms a gradient of diffuse purple light, coming through the cracks. You can see the folded sheet-aluminum heatsink which is superglued to the top of Pi CPU chip.  Not exactly "up to code", but gets rid of the...

comments on software installation

(So as you can see, I shirked the opportunity to learn Python (yet again), and  just did it with a shell script.  Results are a little janky, like you can see a text cursor blinking on top of the cover images, and it takes a little while to start playing a selected video, during which time you see a Linux text screen with login prompt, but overall this gets the job done reliably, it seems.) The main script, called svp.sh, is located under /home/pi.  It has to be run as root, unless you take some care to set up permissions and groups and stuff. You also need to create the file /etc/systemd/system/svp.service as shown, and you'll need to add a line to /etc/fstab as indicated if you want to use a removeable USB stick for the video data, as I have done. The script svp.sh requires the free software programs "fim" and "mpv".  These permit images and videos to be displayed directly on the Linux framebuffer, i.e., the "text console", without needing to run X W...

software (line added to /etc/fstab)

 /dev/sda /mnt ext2 defaults,nofail 0 0 #  Notice that I'm using ext2 here, not VFAT.  This is necessary.  See #  my recent post "VFAT: too skinny for me".

software (/etc/systemd/system/svp.service)

  [Unit] Description=S. Video Player [Service] User=root WorkingDirectory=/home/pi Restart=always RestartSec=3 ExecStart=/home/pi/svp.sh [Install] WantedBy=multi-user.target

software (svp.sh)

#!/bin/bash # Notice, must be run explicitly as "/bin/bash", not "/bin/sh", # because advanced bash features like arrays are used. # svp.sh VID_LOCATION='/mnt/videos' VID_SUFFIX='.mpg' IMG_LOCATION='/mnt/images' IMG_SUFFIX='.jpg' IMG_NOTFOUND='notfound.jpg' VID_CMD='mpv --fs --ontop --no-resume-playback --audio-device=alsa/hdmi:CARD=vc4hdmi,DEV=0' IMG_CMD='fim -N -q' exec 2> /dev/null # Delay for 10 seconds after startup before trying to display anything. # This is a kluge (obviously). The .service file has the # "WantedBy=multi-user.target" line, which is supposed to pause activity # until the system is ready, but this doesn't work. Maybe I should be using # a different .target? Anyway, without the delay here, the first image # does not get displayed, instead there is just a mess of console text on # the screen until the first button is pressed, because the initial...

obtaining the content

Just FYI, in case you, like me, are trying to build a digital system to play videos originally ripped from VHS tapes.  Many of these tapes are recorded with "copy protection", known by the brand name "Macrovision".  This system involves putting out-of-spec signal levels into the vertical blanking interval of the video signal.  Somehow, old-school VHS players -- even if they don't "know about" the copy protection -- are still able to play these tapes, but if you try to copy the signal through the patch cables to another recorder (such as an AV-to-USB converter cable), the irregular sync signals either cause the video to be unusably erratic, or in many cases, the capture software recognizes the Macrovision and refuses to record it (even though it displays it on the screen!). The solution is to pass the video signal through something which breaks down the signal and re-constitutes it, with freshly-created sync pulses.  I'd have thought this would be t...