Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Initial setup of Raspberry Pi 1 B as a TV channel playback source
- Intended for use with 4:3 CRT TVs
- Only H264/x264 encoded videos will work
- This walkthrough uses as many default settings as possible
- Configure additional settings as desired
- Decide whether to store videos on the OS SD card or a USB flash drive
- (This walkthrough covers loading them onto the SD card, but a video walkthrough linked at the bottom covers loading them from a flash drive.)
- Choose an SD card to be your boot drive
- Connect it to a Windows PC where you will be configuring the boot drive
- Go to https://libreelec.tv/downloads and download LibreElec Creator
- Install and run LibreElec Creator
- Click the checkbox for Show All
- In the Select Version dropdowns in section 1, make the following selections:
- Raspberry Pi Zero and 1
- LibreELEC-RPi.arm-7.0.3.img.gz, 116 MB
- Select the SD card in section 3 and ensure it is correct before proceeding
- Click the Write button
- After writing is complete, open the drive labeled LIBREELEC on your PC
- Open config.txt
- Verify that the Default GPU Memory Split is set to gpu_mem=128
- Scroll to the Various Settings section
- Add a new line after hdmi_ignore_cec_init=1 with the following text:
- sdtv_aspect=1
- Ensure there is no # or space or tab before this line of text
- Save config.txt, and eject SD card
- Load SD card into Pi
- Connect USB mouse to Pi
- Connect Pi to CRT TV with composite cable
- Connect Pi to router with ethernet cable
- (This needs to be the same router that your PC is connected to.)
- Connect micro USB cable to power on
- During initial Kodi setup wizard, enable SSH and note IP address
- When setup wizard is complete:
- Mouse over System on main Kodi home screen
- Select Settings then select System
- In Audio, set audio output to Analogue
- In Video, select Video Calibration
- Adjust overscan corners to be just barely visible
- (Blue corner highlights will not be visible by default. Position mouse in lower right corner of screen, then click and drag towards the center. The blue corner should become visible. Repeat this process with upper left corner.)
- Click and drag right side of center square rightward to a 9.02 ratio
- Click close button in upper right corner to exit calibration
- Right click to go back in menus til reaching the main Kodi home screen
- These steps configure the Pi to start playing random videos at bootup
- Return to PC, go to https://winscp.net/eng/download.php and download WinSCP
- Open WinSCP and enter IP address of Pi
- Default User Name: root
- Default Password: libreelec
- Click Login
- Press Ctrl+Alt+H to enable Show Hidden Files
- In /storage/.kodi/userdata, create new file called autoexec.py
- If storing videos on OS SD card, paste the following into autoexec.py file:
- import xbmc
- xbmc.executebuiltin("PlayMedia(/storage/videos,isdir)")
- xbmc.executebuiltin("PlayerControl(RandomOn)")
- xbmc.executebuiltin("PlayerControl(RepeatAll)")
- Save file
- The following steps prevent UI overlay elements popping up between videos:
- Connect to Pi with WinSCP as before
- Copy folder "skin.confluence" from /usr/share/kodi/addons
- Paste folder to /storage/.kodi/addons
- Rename folder to "skin.confluence.edit"
- In /storage/.kodi/addons/skin.confluence.edit/720p, add "_Removed" to filenames:
- DialogBusy.xml
- DialogSeekBar.xml
- They should now read:
- DialogBusy_Removed.xml
- DialogSeekBar_Removed.xml
- In /storage/.kodi/addons/skin.confluence.edit, open addon.xml and edit:
- id="skin.confluence" to id="skin.confluence.edit"
- name="Confluence" to name="Confluence Edit"
- These last steps will verify correct configuration and playback
- Connect to Pi with WinSCP as before
- Open /storage/videos and drag-and-drop a few video files from PC for testing
- Unplug and replug Pi
- Pi should automatically begin random playback upon boot
- Stop playback and return to main Kodi home screen
- From main Kodi home screen, select System>Settings>Appearance>Skin
- Select Skin - Confluence
- Select Confluence Edit from the popup list of skins
- Unplug Pi then replug Pi to simulate power outage and verify random playback
- Seek to near end of video and watch transition to verify overlay is disabled
- Stop playback and return to main Kodi home screen
- Connect to Pi with WinSCP and remove test video files if needed
- Transfer all desired video files to /storage/videos
- Reboot Pi and enjoy!
- Additionally, @probnotstech made a walkthrough video that covers the installation of LibreElec, editing the config.txt, and creating the autoexec.py file:
- https://www.youtube.com/watch?v=mCzcPr-aOIw
- This video uses a later release of LibreElec which has a bug that doesn't allow Video Calibration settings to be saved. The default settings it constantly resets to result in excessive overscan losses.
- Also, this video does not cover adjusting the skin settings to prevent UI elements from popping up on screen between every video.
- This video uses Putty for connecting to the Pi and editing configurations, while the written instructions above use WinSCP. This is just a matter of preference.
- This video offers an alternative configuration of playing the videos from a USB flash drive instead of the SD card used for the OS.
Advertisement