Jump to content

FireTV and Transcoding


gcastro000

Recommended Posts

gcastro000

Hi,

I just bougth the FireTV app (I have been waiting for it for a long time, thanks a lot) and I am seeing that many MKV movies stutter almost every 10 seconds. I have a few questions:

 

1. Is there a way for FireTV NOT to need transcoding?

 

2. Is there a way to know why a specific film needs transcoding?.... I love to have my movies in the original MKV dump (and specially I would like to keep 2 languages in them), but if that makes them unplayable, I will be willing to store them or transcode them to a format that is friendly to my clients (FireTV and ipad). So I am seeing the transcoding log and I see a lot of information but I do not see a simple paragraph that tells me why the film needs transcoding so I can modify my file.

 

3. The other thing I would like to know is why this specific film (Barman Begins) plays so bad while transcoding. My Server is a Quad Core I7-950  * 3.06 GHZ, the transcode location is an SSD and I have 12 GB of RAM. I guess that should be fairly good to transcode a single film (I guess the server cannot use my graphics card to make the transcode go faster?)

 

On the realm of Feture Requests... it seems that there are a lot of problems with transcoding in general, would it be possible to generate transcoded files in a cache area, lets say I want to dedicate 500 GB as a cache and leave the films transcoded there until the space is needed.

 

Thanks a lot for your help, I am adding the transcode file for the file... the server trancode is set to Automatic

 

transcode-97ed5f13-5643-4445-8afd-b55f998faeb0.txt

Link to comment
Share on other sites

In this particular case you're only getting about 20 fps. your cpu can't keep up. Yes - your cpu is generally fine even for multiple transcodings, but this source video is VC1 encoded which is much costlier to transcode. And it's also burning in subtitles at the same time so that makes this particular scenario very stressful for any cpu.

  • Like 1
Link to comment
Share on other sites

To answer your questions about what you can do to improve the situation:

 

1) Encode the video as h.264 20Mb or less for video and aac for audio

2) If you don't want to permanently re-encode the items you could use folder sync to pre-transcode ones you want to watch.

  • Like 1
Link to comment
Share on other sites

Deathsquirrel

There aren't many client devices that are going to play vc1 without transcoding.  The pc-based clients are likely the only ones.

 

I rip blu-ray and reencode the video to h264.  I put in the best available audio track as the primary audio and an aac copy of that stream as secondary audio.  Foreign language subtitle tracks get burned into the image since they always get used and the primary english language subs get downloaded by the server should I ever want them.  The  results play on just about anything without transcoding though I do sometimes have to switch audio tracks for some devices if I care.

 

You can keep the original disc video stream in your mkv but, as Luke said, it will require a lot of your server if the client cant process that stream natively.

  • Like 1
Link to comment
Share on other sites

gcastro000

Hi guys, thanks a lot for the fast answers, sorry for the delay but I was doing some tests, I had no idea about VC1, I thougth all blurays were h264, I also had no idea the number of languages/subtitles impacted the performance.... anyway, I did a few tests:

 

1. I left only 3 languages/subtitles, it did not help, if anything it made it worse.

2. I converted to H264 (still 3 languages/subtitles) with

   "ffmpeg -i input.mkv -map 0 -c copy -c:v libx264 output.mkv",

no difference (the file was 5 GB almost 1/3 the original size, quality not that good)

3. Convertted it with

   "ffmpeg -i input.mkv -map 0 -c copy -c:v libx264 output.mkv"

and this is playable in the FireTV (almost half the original size, very decent quality in my 40 inch TV)

 

However, it does stil need transcoding, so what are the factors that trigger transcoding for the FireTV? the presence of subtitles, the presence of multiple languages?, the quality requested by the client?

server-63568195200.txt

transcode-44e00072-f766-42e5-bf49-b2994e85a448.txt

Link to comment
Share on other sites

Deathsquirrel

If you plan to convert to h264 I suggest trying handbrake.  I do my conversions at a constant quality of around 20 and am very happy with the results.

Link to comment
Share on other sites

gcastro000

anyway to know from the transcode log file why the decisition to transcode was made?

anyway to override the client and just sent them the file we have (ie if the only issue is quality for example)

Link to comment
Share on other sites

gcastro000

I have been doing some research. Can you confirm that transcoding will ALWAYS be necesary for the FireTV if the source container is MKV?

 

I have found this link:

https://developer.amazon.com/public/solutions/devices/fire-tv/docs/media-specifications

 

And MKV is not listed as a valid container for video. So I did a few extra tests:

1. Changed the video from VC1 to H264, my CPU transcode went down from 90% to 50%

2. Set user to NOT to display subtitles. CPU transcode went down to 35%, (when subtitles are requested, they will be burned in the video and video transcoding is needed)

With subtitles off, the video is not trancoded but the audio is still transcoded

3. For some reason audio transcoding is happening (-codec:a:0 aac -strict experimental -ac 2 -ab 128000 -af "adelay=1,aresample=async=1,volume=1")

 

Also it seems that the whole container is being changed from MKV ot MPEG-TS ?

Link to comment
Share on other sites

well at some point soon we will add support for text-based delivery of subtitles, which means subs on their own won't cause transcoding anymore, and they won't affect cpu usage. Note - that only applies to text-based subtitles, so if yours are bluray pgs subs, then those will always have to be burned in.

 

as far as formats, yea, whatever that says in that link. we use android api's to tell us the supported formats for the device, it should be pretty much inline with that document. 

Link to comment
Share on other sites

gcastro000

ok, thanks

Can you give me a recipe for a file that will not need transcoding in the FireTV or it will always be needed because of the container (ie if I use mp4 will the file still need transcoding?)

Link to comment
Share on other sites

gcastro000

So the recipe is:

MP4 container

Audio must be AC3, 16-bit or 24-bit, stereo or 5.1, 160 kbps

Video must be H264 L 4.0

The client must not require subtitles, nor a smaller quality than the video offers

 

Any other setting will generate some type of transcode, as per my testing:

1. Worse offender is video in VC1 format, changing this to H264 reduces CPU usage from 90% to 55%, constant

2. Audio, changing this to less than 160 kbps will reduce cpu usage from 50% constant to 100% every 2 minutes (burst of less than 20 seconds)

3. MKV, changing the container to MP4 will stop transcoding (CPU usage will go from 0% to 100% every 2 minutes

 

There are some posts in "the other media server"  stating that, to been able to transcode 1080p, your CPU must have 2000 passmarks for every stream. My CPU i7-950 has around 5500 passmarks ,correctly configured, which seems about right if using H264, however the 2000 estimated seems too low for VC1. As Luke pointed out VC1 seem to be very power hungry.

 

BTW this restrictions seem to be the same for ipad airs.

 

I think this is enough information for anybody decide if they want to re-transcode their media or buy a bigger CPU :-)

Edited by gcastro000
Link to comment
Share on other sites

dragon2611

I have been doing some research. Can you confirm that transcoding will ALWAYS be necesary for the FireTV if the source container is MKV?

 

I have found this link:

https://developer.amazon.com/public/solutions/devices/fire-tv/docs/media-specifications

 

 

Try Sideloading the Kodi APK and then installing the Emby plugin for Kodi,

 

The FireTV app is progressing nicely but at the moment Kodi seems to be able to directplay more formats and things like AAC/DTS passthrough.

Link to comment
Share on other sites

moviefan

I was reading about Fire TV yesterday and was considering the idea of switching moving over to that for new setups instead of the Roku because the Emby client for it appears much more mature so far and then I found that it doesn't support DTS output at all so that was pretty much a deal killer.  So any files you have with DTS sound will always need to be transcoded.  Personally I can really hear the difference between the element separation on DTS versus AC3 so this is not something I am thrilled about.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...