Kodi Community Forum

Full Version: Create own tv channel?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Folks, does anyone know of any free software that will basically stream the video files in a folder as one stream (that could then be added as a channel in tvheadend using the pipe function). VLC can stream one video file but had no luck with it streaming multiple videos, i.e. once first video ended the stream stopped. It would need to play the videos randomly of course as you wouldnt want the same video playing every time you went to the channel. A pipe dream would be able to somehow get kodi smart playlists to appear as channels! I know pseudo tv can do something similar but it just doesnt have the same feeling as using kodi's own tv function for me anyways.

I posted in the tvheadend forum itself but not much traffic there.
this is an extremely powerful add-on that can do what you want.

Thanks for the reply. Yes i know about pseudo tv and used it briefly in the past but i don't feel its a proper replacement for kodi's pvr (doesn't feel as natural and was always slow and clunky for me - I use samba shares and that probably didnt' help).
I am sure you can do this with writing a script rather than calling into ffmpeg directly.
I just gave this a quick test.

In tvheadend, I had pipe:////usr/bin/ffmpeg -i rtsp://stream.url -vcodec libx264 -acodec aac -vbsf h264_mp4toannexb,dump_extra -strict experimental -tune zerolatency -f mpegts pipe:1

so instead, I made a script...

/usr/bin/ffmpeg -i rtsp://strea.url vcodec libx264 -acodec aac -vbsf h264_mp4toannexb,dump_extra -strict experimental -tune zerolatency -f mpegts pipe:1

and then updated tvheadend to pipe:///location.of.script.sh - this works.

So in that script, you can write something to randomly select a file and start piping it out, once it's complete then randomly select another file - I am sure that would work.
Thanks xxxnelly, not good at the scripting myself! Was trying to get help yesterday on the openelec irc (was googling examples first of finding random files but a lot of the commands don't work with openelec). A helpful person gave me the following but had no luck getting it to work

FOLDER="~/storage/videos/"; f=$(find "$FOLDER" -type f | grep -c .); r=$(echo $(($RANDOM % $f)))
FILE="$(find \"$FOLDER\" -type f | grep -m $r . | tail -1)"
ffmpeg -i "$FILE" -vcodec copy -acodec copy -bsf:v h264_mp4toannexb -f mpegts pipe:1