Page 1 of 1

[SOLVED] How do I play .ts files?

PostPosted: Tue Apr 12, 2016 1:40 am
by FreeMan
Many of my video files are in .ts (transport stream) format. How do I get Subsonic to play them? Right now, it doesn't even show them in the folder view.

I figured that transcoding from the .ts to .flv format would be necessary, so with some Googling, I found a command string that should do the conversion:
Code: Select all
ffmpeg -i input.ts -sn -vcodec copy -sameq -acodec copy -f matroska output.mkv

which I modified like this for Subsonic use:
Code: Select all
ffmpeg -i %s -sn -vcodec copy -sameq -acodec copy -f matroska


I then created this transcoding entry:
Code: Select all
Name: ts video
Convert From: ts
Convert To: flv
Step 1: ffmpeg -i %s -sn -vcodec copy -sameq -acodec copy -f matroska
Step 2: ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast -threads 0 -

Step 1 should transcode from .ts to .mkv, then Step 2 is the default transcode line that should convert the .mkv to .flv for playing at the destination. However, the .ts files still don't show up in the file listing.

I'm currently running Subsonic 4.8 (build 3434) – April 17, 2013 (Yes, I know it's rather old. I'm preparing for a server update that will include the latest version of Subsonic, as well.)

This is my first attempt at adding a transcoding entry, so I wouldn't be surprised if I did something wrong. Also, I'm not sure what's necessary to make the files visible to Subsonic so it knows it can play them. Any tips, pointers or suggestions are more than welcome.

Re: How do I play .ts files?

PostPosted: Tue Apr 12, 2016 11:58 pm
by toolman
Hi,
To make Subsonic accept *.ts-files as videofiles you need to add the ts-extension under settings > General > Videofiles where there is the line "flv avi mpg mpeg mp4 m4v mkv mov wmv ogv divx m2ts"
You need to edit it like "flv avi mpg mpeg mp4 m4v mkv mov wmv ogv divx m2ts ts " and obviously save this setting.
I quite forgot if your version of subsonic needs to do a folderscan to add new files to the database. If so, You should run a folderscan for Subsonic to update the database and show your videofiles.

Re: How do I play .ts files?

PostPosted: Wed Apr 13, 2016 1:18 am
by FreeMan
Thank you very much, toolman, that did the trick! Not only did I have to manually rescan the files, but I had to refresh the left-hand listing of files to get it to show up.

I'm not sure if I need the transcoding lines, so I'll play around with that a bit to see what happens.

Re: [SOLVED] How do I play .ts files?

PostPosted: Wed Apr 13, 2016 11:41 am
by toolman
Ok,
Glad to be of any help.
Í hope your project turns out fine.