2017-01-12, 11:09
I have it setup using Windows & ffmpeg. I made a few small changes to your original PlayWith.py, most notably I added in some filters to remove regex characters from the filename by using "import re". I also changed the file output to show a regular date/time using strftime. This is the section with the changes:
Code:
# Play with your own preferred player and paths
if url:
name = "%s = %s = %s" % (channel,title,time.strftime('%d%m%Y-%H%M'))
name = re.sub("\?",'',name)
name = re.sub(":|<>\/",'',name)
name = name.encode("cp1252")
filename = xbmc.translatePath("C:\Users\Kodi\AppData\Roaming\Kodi\Recordings\%s.ts" % name)
ffmpeg = r"c:\utils\bin\ffmpeg.exe"
cmd = [ffmpeg, "-y", "-i", url, "-c", "copy", "-t", str(seconds), filename]
p = Popen(cmd,shell=False)