Showing posts sorted by date for query kodi. Sort by relevance Show all posts
Showing posts sorted by date for query kodi. Sort by relevance Show all posts

Thursday, September 03, 2026

creating m3u playlists with Claude

Tried out creating new playlists for playout in Kodi atop LibreElec on Raspberry Pi 4, using Claude instead of manually copy-pasting filenames. Perhaps a time saving of half-an-hour or so? Private URL for my reference at https://claude.ai/chat/cf6e6881-2424-4a24-a1a7-ed38bc9b4942

Uploaded a playlist and prompted

Just like this playlist, please create a playlist called U055newname.m3u where the items #EXTINF:0,1.mp4
 /var/media/1.mp4
 #EXTINF:0,2.mp4
 /var/media/2.mp4
 #EXTINF:0,3.mp4
 /var/media/3.mp4
 are replaced by the files

/var/media/4.mp4
 /var/media/5.mp4
 /var/media/6.mp4
 /var/media/7.mp4

and the appropriate EXTINF lines.

Claude did catch some typos I had made, and double-checked some files, like

Note the last item keeps its .mp4 extension (matching what you specified: only.mp4), unlike the ENG version which was .avi. Let me know if that should also be .avi.

Also asked Claude to create a python script with the prompt

Now, please write a python script to check each m3u file in the current directory if it has all these items as the first few items of the playlist,

(lines of playlist pasted here)

(for playlists which have TEL in the name)

and if any items are missing, to add them in this order.

Similarly, for m3u files with 3lang or ENG in the name, 

(lines of playlist pasted here)

and for playlists with HIN in the name, 

(lines of playlist pasted here)

which worked well - I have uploaded to the private repo upstairs-Kodi-playlists

Sunday, January 12, 2025

manually editing kodi playlists

Following up on the use of Kodi for theatre playouts - the previous posts below,
Work Stuff: optimizing kodi for planetarium projection


the playlists are located on the SDCARD and not on the USB drive containing the video files - 
Path to the video playlists is
STORAGE > .kodi/userdata/playlists/video

The editing has to be done as root, as no access otherwise.

Can't use UI, since gksudo is removed,
and other methods also don't work,

The entries in the m3u files are of the form
#EXTINF:0,3002Fade-out Lights.avi
/var/media/NTFS500GB/CommonFiles/3002Fade-out Lights.avi
so we need to remember to edit the filename on two lines.

Monday, August 19, 2024

raspberry pi LibreElec Kodi playout issues and solution

Doing playout using Kodi and LibreElec, we had issues of disk corruption when using a FAT32 USB flash drive for the content - the first time we play a playlist there would be no issues, but when we go back to the beginning of the playlist using the page-down key, or using x to stop playback and open the playlist again, there would be random jumps during subsequent playout. 

Tried various workarounds like using a different USB flash drive, shutting down and restarting the Pi between shows (takes 5 minutes), "safely remove" the drive and re-plug it in between shows.

For a more durable solution, tried
(a) adding a powered USB hub for the Lexicon Alpha sound device
(b) using a USB drive formatted with NTFS instead of FAT32

With this configuration, the Pi seems to recognize the Lexicon Alpha without having to plug it in after the Pi boots up as noted in the previous post, and the playlist playout also doesn't skip. So, perhaps both these points helped.

Saturday, June 01, 2024

VP9 codec for 4K video on Raspberry Pi4 - stutters

Tested a video encoded with VP9 - very good quality 4K video - only 2.5 GB file size for a 24 minute 4K video - but playback on Kodi running on Raspberry Pi 4 stutters for high complexity scenes. x265 is the way to go, for now. 

Monday, February 12, 2024

optimizing kodi for planetarium projection

By default, Kodi on LibreELEC running on Raspberry Pi 4 was detecting our Optoma ZK 507 projector and setting the output resolution to 4096x2160 @ 30 Hz. This was all right, but our 3840x2160 and 1920x1080 shows were showing a black bar at the bottom. Checking for solutions - not the minimise black bars global setting, but instead, setting the resolution from the comments on this thread, 

https://discourse.osmc.tv/t/howto-guide-to-the-kodi-whitelist-function-and-related-settings/83919

I did not need to make a whitelist or blacklist in Kodi (blacklist is for devices, whitelist is for allowed video modes) - just setting the resolution at Settings --> System --> Display to 3180x2160 @ 30 Hz did the trick. Now, no black bars at the bottom of the FHD or UHD videos. 


Another issue was, hiss in the sound output via a generic USB sound output, when amplified by our sound system. We set up a limiter and a gate with our old Behringer MDX 2200 compressor. Then, for further sweetening, I got a second-hand Lexicon Alpha sound device via bajaao.com for approximately one day's salary, and used that for sound output - no more hiss.

For recognizing the Lexicon Alpha, we had to plug it in after the Raspberry Pi booted into LibreELEC and Kodi - on every reboot. After recognizing the device, a one-time configuration change in Kodi --> Settings --> Audio settings --> Audio device , and set the output device to Lexicon Analog (not Lexicon SPDIF in this case).

Trying a direct connection for the Lexicon Alpha onto the RPi (as against a connection via a USB hub) also did not resolve the issue of not recognizing it on boot. So, we're plugging it in after every reboot (on the USB hub for convenience.) 

Also available -
https://kodi.wiki/view/Settings/System/Audio#Maintain_original_volume_on_downmix
(not directly useful for us, since we're not downmixing all our files)
 

https://kodi.wiki/view/Settings/System/Audio#Volume_control_steps
(set it to the maximum of 50)

And, compression also seems to be available, via specific video's context menu
https://forum.kodi.tv/showthread.php?tid=196313
https://kodi.wiki/index.php?title=Video_playback#Audio_Settings

If this could be a global setting, we could perhaps avoid the hardware compressor, too.

Tuesday, January 09, 2024

playing custom local video playlist from Kodi

The way to play local videos as a playlist seems to be, as per this forum thread

right-click or C in the Files view to get the context menu for a video file,
choose to queue it,
the file view automatically jumps to the next file in the folder,
right-click or C and choose to queue it and so on,
and when all the required files are added,
left arrow for the hidden menu, choose Go to Playlist,
then choose Save - it will now ask you for a filename for the playlist.

In order to play this playlist, from the home screen,
choose Videos (NOT Movies)
choose Playlists
highlight the desired playlist,
C for context menu, and choose Play.
Or press P to play after highlighting the desired playlist,
after which you have to press TAB for full-screen video without the menu.

List of keyboard shortcuts is at https://kodi.wiki/view/Keyboard_controls

Most of the options like audio device are in the Kodi Settings (gear icon on top of home screen.) LibreElec settings for system name, keyboard layout, etc.

Monday, January 01, 2024

problems with Sony player 4K playback on planetarium dome

We have a Sony HD player for playback of 1080p files - works well for XVID-encoded files. When we had issues with the Firestick for playback, we tried out the Sony UBP-X700 4K Ultra HD Blu-Ray Player even though it was very much more expensive - Rs. 30k compared to the Firestick 4K's Rs. 5k. But unfortunately, it did not work out.

Problems with the Fire TV stick 4K were:

  • Using the Amazon Firestick 4K for playout is extremely flaky - since the firestick keeps checking Amazon for updates and auto-updates, sometimes the show stops playing.  
  • Audio has to be taken from the projector's EP audio out, and has a lot of hiss. 

 Problems with the Sony were:

  • It was starting up in 4K 60 Hz which our projector did not support
  • It was changing modes when playing files with different resolutions and frame rates, causing delays and missed frames between files.

So we returned that, and are leaning towards playback using a Raspberry Pi 4.

The earlier models of R Pi, which we already have, do not support 4K. Raspberry Pi 5 has also come out now, which is slightly more expensive, but which we don't necessarily need.

Estimated prices:
Raspberry Pi 4  - Rs. 6,500
Power supply - Rs. 1,000
HDMI mini to HDMI adapter - Rs. 664

The following items may also be required, which we might buy later if required:
Keyboard - Rs 300
Mouse - Rs. 300
HDMI mini to HDMI adapter - Rs. 664
(we may need 2 of these)
USB sound card, high quality - Rs. 2,000
Case with cooling for R Pi - Rs. 2,000
Mini SD card - Rs. 600

 Edit: Raspberry Pi 4 running Kodi and a pre-owned external USB Lexicon Alpha audio interface is what we're using as of May 2024.