Jump to content

Transcoding mkv x265 for Roku 3


Recommended Posts

Posted

Hi,

My Emby library has a few mkv x265 videos and the transcoding results on my TV screen is not very good.

I understand that the quality of the mkv x265 video determines the quality of the transcode result.

I tested one of the mkv x265 video using vlc media player and I get a very good image quality.

When I play that video from Emby server to my TV via the Roku 3, the image is pixelized.

 

I didn't find transcoding options for Roku 3 in Emby Server or Emby for Roku app.

I tried the blue neon night app, but it didn't improve quality.

 

Can someone please help me diagnose my transcoding problem?

Thanks.

Posted

When you go "preferences" in the Roku Emby app what is the quality currently set?

 

 

Sent from my iPhone using Tapatalk

Posted

The video quality is set to 30.0 Mbps HD.

Posted

Ok did you test with lower bitrates? Maybe the bitrate currently defined is to high for your bandwidth and the roku app try to reduce quality on the fly to garantee a smooth playback??? Just give it a try.

 

Other thing i'm thinking about is that the tranco software on server will pixelize the stream to serve quickly the Emby client (your Roku). We see that especially when we seek. Maybe your server computer is not enough powerfull to deliver H265 content, so it tries to transco as fast as it can but due to the low power it can access to, it can't deliver a better picture because it can't get out if this "pixelizing" phase...

 

Keep in mind that the H265 is a really high CPU/GPU draining codec. What are your server hardware specs?

 

To complete your tests, did you try on over clients (IOS, Android tv, Emby Theatre) to see if the H265 content is better displayed?

 

 

Sent from my iPhone using Tapatalk

Posted

Thanks, I'll give it a try.

The Roku 3 is connected on a wired connection 100 Mbps.

The Emby server is an Intel Core i7 X980 (6 cores, 12 logical processors) 12 GB RAM, video card is AMD Radeon HD 5870 1GB RAM.

 

I'll be back with the results.

Posted

OK, I did the tests.

If I play the video with Emby Theatre (latest legacy version) on my laptop (1920x1080), the image quality is very good.

If I play the video with Roku 3 on my TV (42" plasma 720p), the image quality is pixelized.

I don't know if I did it right, but here is what I did.

I played the video at 30.0 Mbps and confirmed the pixelization on a particular sequence.

I paused the playback and changed the video quality at 3.2 Mbps [default].

I rewinded the video for about 1 minute and watched the same sequence again.

I confirmed the same pixelization on that sequence.

Should I do the test differently?

Posted

Unfortunately I'm not a dev. I think you performed well the first tests. Let's see what devs could do for you at this point.

Posted

One more thing.

Checking the logs, I only have transcoding logs for the Roku.

It seems that Emby Theater is receiving a direct stream.

That would explain the image quality on the laptop screen.

Posted

Yea theater can direct play h265

Posted

But Luke when H264 is trancoded we've got a great picture right? Why is it not the case for H265? FFMPEG limitations?

 

 

Sent from my iPad using Tapatalk

Posted

So, what should I change to get the h265 files to transcode correctly on my Roku?

Happy2Play
Posted

Could it be h265 provided so much compression then when converted back to h264 it is pixelated?

Posted

It might be the -crf (constant rate factor) needs adjustment when downsampling hevc to x264.

 

Sent from my Nexus 7 using Tapatalk

  • Like 1
  • 1 month later...
myriaxis
Posted

Hi,

 

I realize it's been quite a while, but I'd like to revive this topic.

 

When I play an HEVC file, the ffmpeg parameters are:

-map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -b:v 908016 -maxrate 908016 -bufsize 1816032 -vsync vfr -profile:v high -level 51 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,min(1920\,1080*dar))/2)*2:trunc(min(max(iw/dar\,ih)\,min(1920/dar\,1080))/2)*2" -flags -global_header -copyts -codec:a:0 aac -strict experimental -ac 2 -ab 128000 -af "adelay=1,aresample=async=1,volume=2" -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -hls_time 3 -start_number 0 -hls_list_size 0
 
Is there a way to improve quality?
Posted

is there an issue that you're seeing with those params?

myriaxis
Posted

Hello Luke,

 

Yes. The video quality is poor.

Lot's of pixelization, especially with a dynamic scene.

Posted (edited)

Is there a way to improve quality?

 

The easiest way is change "-crf 23" to "-crf 18".  Depending on your CPU (changing this hits it much harder), you may notice lots of buffering, but it should look considerably better. This might be required when transcoding hevc to h264 and retain quality.

Edited by speechles
myriaxis
Posted

Hello Luke.

 

Except for the logs, I think the problem is well described at the beginning of this topic.

I'll create new logs tonight for you to decipher.

I can't produce screen shots because I play the HEVC files through my Roku 3 to my TV set.

The files play fine with Emby Theater.

 

Hello speechles,

 

How can I change the crf value?

Posted

Can you try the beta server? thanks.

myriaxis
Posted

Sure.

To make sure I understand correctly, I download Emby Server from Beta Channel link?

Happy2Play
Posted

Or change your Automatic updates level to beta and the server will auto update when the check for updates task is run.

 

Settings-Automatic Updates-Update Level

myriaxis
Posted

OK Luke. I installed Beta 3.1.11.0.

I supposed you changed the crf value.

I'll give it a try later to see the results.

Posted

No, didn't change the crf. I increased the bitrate.

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...