FAQ  •  Register  •  Login

Transcoding analyze for future shedule or custom profile.

<<

yoGhurt

Serviio newbie

Posts: 13

Joined: Mon Dec 30, 2013 6:15 pm

Post Thu Oct 08, 2015 6:45 pm

Transcoding analyze for future shedule or custom profile.

Because after last topic, I couldn't find transcoding software that would work as a service and have "watch folder", I'm again trying to figure out why my problem happens with transcoding via ffmpeg in Serviio.

My file that will be example - the.wire.s02e11.1080p.bluray.x264-rovers.mkv because with this file and all other from that season, video shutters or there is video/audio desync in same situations.

In this example, Serviio runs ffmpeg with options below:

  Code:
Starting C:\Program Files\Serviio\bin\\..\lib\ffmpeg.exe -threads 2 -i E:\The.Wire.S02.1080p.BluRay.x264-ROVERS[rartv]\the.wire.s02e11.1080p.bluray.x264-rovers.mkv -y -threads 2 -c:v mpeg2video -pix_fmt yuv420p -qscale:v 1 -vf subtitles=filename="E\\:/The.Wire.S02.1080p.BluRay.x264-ROVERS\[rartv\]/the.wire.s02e11.1080p.bluray.x264-rovers.srt":original_size=1920x1080:charenc=UTF-8 -r 24000/1001 -g 15 -c:a ac3 -b:a 192k -ac 6 -map 0:0 -map 0:1 -sn -f mpegts E:\Transcoding\Serviio\transcoding-temp-20228-sony2013-ORIGINAL-5f606bbf5a22dad7872355ad06878853.stf


I understand Sony Bravia 2014 series doesn't support subs from DLNA, Serviio transcods both files to readable one - but why it's .stf file instead of .mkv? Why Serviio cannot just hardsub that .mkv file?

Bitrate of file
Image

I was writing about shuttering in all files. When you'll look at first few minutes, it goes up to 27142kbps in 4:20min, in all files and always shutters at this point (maybe not exactly at 4:20min, but always on same scene). It only appears in transcoded file, even whole file is transcoded and just streams to TV. Same with audio/video desync, so they appears even whole file is transcoded and just streams to TV.

Anyone have idea what it's happening something like that? It's chance to change from .stf to .mkv as an output file?
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Fri Oct 09, 2015 6:28 am

Re: Transcoding analyze for future shedule or custom profile

The .stf (Serviio Transcoded File) is, in this case, an mpeg-ts file (you could rename your .stf file to a .mpg file quite comfortably). Serviio uses mpeg-ts as a container for the transcoding target as you cannot transcode on the fly to matroska (mkv) files. Transcoding on the fly is not the same as pre-transcoding (transcoding for later use) - there are limited containers that support on-the-fly playback - mpeg-ts, mpeg-ps, asf and applehttp. Note that the most common containers, such as .mp4, .avi and .mkv do not support transcoding-on-the-fly.

I'm not sure what you are trying to do. If it's to have Serviio transcode to a .mkv file, that wont work (for the reasons above). If its to pre-transcode your files into something your TV will support, don't use the command line - download a program such as XMedia Recode. If (as I suspect) all you need to do is play sub-titles with your MKV file, then as I understand it (at least given my reading of this: viewtopic.php?f=11&t=2396) the 2014 models should support subtitles embedded into your MKV file. You can do this with either ffmpeg or MKVmerge (part of MKVToolsnix) - I'm working from memory (and google) here so may be slightly wrong:

    ffmpeg -i "input.mkv" "subtitle.srt" -map 0 -map 1 -c copy "output.mkv"
    or
    mkvmerge -o "output.mkv" "input.mkv" "subtitle.srt"
This should then enable Serviio to stream the file natively (after you turn off your subtitle burn-in options), and you can select the subs from your remote.
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

yoGhurt

Serviio newbie

Posts: 13

Joined: Mon Dec 30, 2013 6:15 pm

Post Fri Oct 09, 2015 8:08 pm

Re: Transcoding analyze for future shedule or custom profile

I'm not sure what you are trying to do.

Let me write it again. I'm trying to get best solution for smooth video streaming with stuff (TV and server) I already have. In best scenario, fully automatic, without any additional software or in the worst scenario, with additional steps and additional software like MKVToolnix.
That means, with transcoding-on-fly in best scenario or using pre-transcoding in worse scenario.

[...]then as I understand it (at least given my reading of this: viewtopic.php?f=11&t=2396) the 2014 models should support subtitles embedded into your MKV file.

Yes, that's why in previous topic I was looking for some software that would automatically pre-transcode/hardsub files. I tried few mintues ago with MKVToolnix and embend subtitles into file looks like a good idea - it worked on TV as it should and transcoding process was much faster then hardsubing. But, MKVToolnix cannot work as a service and cannot have schedule to watch for new files to transcode.

The .stf (Serviio Transcoded File) is, in this case, an mpeg-ts file (you could rename your .stf file to a .mpg file quite comfortably). Serviio uses mpeg-ts as a container for the transcoding target as you cannot transcode on the fly to matroska (mkv) files


That explains a lot about transcoding matroska.
I renamed file to look how that .mpg after transcoding acts on notebook and it still shutters in first few seconds, what shows that's a problem with transcoding process or server. BUT, video didn't act wierd in 4:20min like I wrote before, that means, it's somewhere between server and TV.

You can do this with either ffmpeg or MKVmerge (part of MKVToolsnix) - I'm working from memory (and google) here so may be slightly wrong:

ffmpeg -i "input.mkv" "subtitle.srt" -map 0 -map 1 -c copy "output.mkv"
or
mkvmerge -o "output.mkv" "input.mkv" "subtitle.srt"


I'll try with mkvmerge command, maybe it would be a good start to make some script that would automate this with new files.
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Fri Oct 09, 2015 10:27 pm

Re: Transcoding analyze for future shedule or custom profile

I don't think anyone can help you with such a specific issue, only generally. You've already done a lot of the tests to rule out common causes of shuttering (stuttering? artifacts?) :

  • as it still occurs after it has been fully transcoded rules out a problem related to resources - CPU, etc that are used during the transcode process
  • and that it doesn't occur when playing the file locally, likely means the stuttering is not encoded into the file (may also be that the software on the PC is compensating for it).
Suggests that it is, as you say, between the server and the TV. It could be:

  • how Serviio delivers the file (buffers etc used to stream). This would be my last suspect but try streaming the file (the transcoded .mpg file) to your TV using Windows Media Player as the streaming server;
  • the delivery network - if is it wired, try wireless.
  • the TV. The most likely culprit on my view. Have you got another device that you can stream the .stf (.mpg) to?
I'm trying to get best solution for smooth video streaming
The best solution is always to avoid transcoding. So, particularly if you have only one TV, the best solution is to encode/mux the file so that your TV plays it natively.

Your TV will play MKV files natively, and will play MKVfiles with embedded subs natively so the embedded subs solution is the best outcome imho (ps. the process of embedding the subs is a muxing process, not an encoding process. It is therefore quick, and does not result in video or audio quality degradation, as transcoding will do).

...that would automatically pre-transcode/hardsub files
What you're looking for is to address a quite specific issue, so unlikely you will find off the shelf. You can write your own batch script easy enough that you could trigger manually. If you do want to go down the watch-folder path, you can even do that yourself using Powershell (look at https://social.technet.microsoft.com/Fo ... -new-files) or vbscript or the like. Or maybe, if i get energetic and get some free time, I'll add something like this to WinHelper ;)
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

yoGhurt

Serviio newbie

Posts: 13

Joined: Mon Dec 30, 2013 6:15 pm

Post Sat Oct 10, 2015 7:11 pm

Re: Transcoding analyze for future shedule or custom profile

how Serviio delivers the file (buffers etc used to stream). This would be my last suspect but try streaming the file (the transcoded .mpg file) to your TV using Windows Media Player as the streaming server;

I have to leave that for the end because I couldn't configure Windows Media Player on WS2012R2 to be accessable by my TV.

the delivery network - if is it wired, try wireless

It is already wireless because I have 802.11n card in TV and my network card is only FastEthernet so it still have higher bandwith. My server is connected (obviously) wierdly (GigabitEtheret) to router with also Gigabit ports, so I'm sure it's not network related problem. Yes, I tried wierd connection even it's 10/100Mb, nothing changed because I monitored bandwith on router and server - in a pick it had something above 54Mb/s, so it wasn't really that much.

the TV. The most likely culprit on my view. Have you got another device that you can stream the .stf (.mpg) to?

Yes I have. I tried with my PS3, but output file is in worse quality (artefacts, pixelated screen), so for me it's not a good example to compare with TV. I have set-top box from my Sat TV operator that is able to use DLNA, so I will try it later, but i'm not sure about quality neither.

(ps. the process of embedding the subs is a muxing process, not an encoding process. It is therefore quick, and does not result in video or audio quality degradation, as transcoding will do)

True, I always mess up muxing and transcoding.

What you're looking for is to address a quite specific issue, so unlikely you will find off the shelf. You can write your own batch script easy enough that you could trigger manually. If you do want to go down the watch-folder path, you can even do that yourself using Powershell (look at https://social.technet.microsoft.com/Fo ... -new-files) or vbscript or the like.


Yup, that's what I searched for yesterday after your response. Making vbs or powershell script will be a good start but imo, best solution would be integrated function with Serviio, because it already have watch folder function (i'm not sure if it's available via API, cannot find that in documentation), but looking at your WinHelper (I wasn't even aware it exists), adding that would be some idea too. Because I need that script anyway, I would go back to you with it when I'm sure it will work fine.
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Tue Oct 13, 2015 1:45 am

Re: Transcoding analyze for future shedule or custom profile

Me wrote:- if is it wired, try wireless.
I meant to say if "if it's wireless try wired" ... brain thinks one thing, fingers type the other :(. Anyway, you had this covered - just raising it for anyone else that reads this topic.
yoGhurt wrote:...but imo, best solution would be integrated function with Serviio
zip has already indicated that he wont be supporting pre-transcoding (viewtopic.php?f=5&t=7698&p=55497) in Serviio. I can understand that - pre-encoding is OK if you have one device (in which case one of the suggested tools can be used manually to achieve the same thing), but can be a real mess when a user has multiple devices.

Muxing-on-the-fly doesn't work to an MKV container afaik (even though it doesn't take long, it's still too long - the TV/renderer will time out. Problem with MKV containers is you need the whole file to exist before you can start streaming).
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Tue Oct 13, 2015 12:39 pm

Re: Transcoding analyze for future shedule or custom profile

Just a thought, even though your network appears to be working correctly. I discovered an issue on mine while everything appeared to be working fine. I had one bad Ethernet cable and it seemed to be affecting the whole network. Even though it appeared to be working, and I could see Serviio and stream, I wasn't getting the speed I should have. My TV (which wasn't the one with the bad cable) was having problems reaching UHD from Netflix, and my switch (again, the TV wasn't plugged into it) was acting funky.

I replaced the Ethernet cable to my Blu-Ray player and suddenly these network issues seems to have vanished. Don't know if that cable was sending reflections back into the network, but I have no other explanation. My entire network is wired gigabit, so I shouldn't have had any bandwidth issues, but something was mucking up the system. This particular cable is one I made (not a commercial cable), so if you have any home made yourself you might look at them.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

yoGhurt

Serviio newbie

Posts: 13

Joined: Mon Dec 30, 2013 6:15 pm

Post Wed Nov 18, 2015 12:01 am

Re: Transcoding analyze for future shedule or custom profile

I'll add some thought even topic wasn't continued in a while. I tried with some script to make that idea happen and script remuxing but I ain't really good at it. Also, MKVToolNix (as suggested software) isn't that painfull to use with. Yeah, I still need to prepare all files after downloading to watch it on TV, but even when I was remuxing whole season of serie that was in high quality files, wasn't that long.
There is another way to do it - specific empty watch folder where I would copy any file I would like to remux automatically - but still it's some compromise.
atc98092 it is some idea but i don't think so it's between TV, router and NAS because TV is connected wirelessly to network. Also, I made some bandwith tests connected wiredly to network and top was 75MB/s so speed it's really a problem here.

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 11 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.