Compress or Not to Compress

@ChuckPa said:
Here’s the important parts:

Oct 19, 2016 09:07:00.592 [2108] DEBUG - MDE: analyzing media item 100526
Oct 19, 2016 09:07:00.592 [2108] DEBUG - MDE: Oblivion (2013): Direct Play is disabled
Oct 19, 2016 09:07:00.592 [2108] DEBUG - MDE: Oblivion (2013): media must be transcoded in order to use the hls protocol
Oct 19, 2016 09:07:00.592 [2108] DEBUG - MDE: Oblivion (2013): no direct play video profile exists for http/mkv/hevc
Oct 19, 2016 09:07:00.592 [2108] DEBUG - MDE: Oblivion (2013): no direct play video profile exists for http/mkv/hevc/aac
Oct 19, 2016 09:07:00.592 [2108] DEBUG - Oblivion - audio.channels limitation applies: 6 > 2
Oct 19, 2016 09:07:00.592 [2108] DEBUG - MDE: Oblivion (2013): no remuxable profile found, so video stream will be transcoded
Oct 19, 2016 09:07:00.592 [2108] DEBUG - MDE: computed resolution bounding box of 1920x1080.
Oct 19, 2016 09:07:00.592 [2108] DEBUG - Scaled up video bitrate to 18513Kbps based on 4.500000x fudge factor.
Oct 19, 2016 09:07:00.592 [2108] DEBUG - Oblivion - audio.channels limitation applies: 6 > 2
Oct 19, 2016 09:07:00.608 [2108] DEBUG - Oblivion - audio.channels limitation applies: 6 > 2

Oct 19, 2016 09:07:00.608 [2108] DEBUG - MDE: Oblivion (2013): selected media 0 / 100526
Oct 19, 2016 09:07:00.608 [2108] DEBUG - Streaming Resource: Adding session 0BBFF3C8:PlexYY001D808908 which is using transcoder slot. Used slots is now 1
Oct 19, 2016 09:07:00.608 [2108] DEBUG - Streaming Resource: Added session 0BBFF3C8:PlexYY001D808908

The Roku 4 is not responding as supporting MKV. Your Screenshot also shows HLS is set.

Video had to be transcoded to get to HLS from H.264
Audio had to be transcoded because it’s 6 channel and not 2 channel.

Okay, I am confused as to “why” is the Roku saying it doesn’t support MKV?
Why does the Roku think it’s a HLS?

we know the steps I used to create the compressed file above, is there something wrong with the steps?
Why is it saying its limited to 2 audio channels?

@wesman said:
Okay, I am confused as to “why” is the Roku saying it doesn’t support MKV?
Why does the Roku think it’s a HLS?

we know the steps I used to create the compressed file above, is there something wrong with the steps?
Why is it saying its limited to 2 audio channels?

I cant speak to the Roku, but maybe the audio channels weren’t mixed correctly during processing?

You can find more info here for ffmpeg: AudioChannelManipulation – FFmpeg

I’m wondering if the default action of encoding audio is to downmix it to 2.0. Could I suggest using the -c:a copy switch to copy the audio content directly?

Okay, becuase the first thing you always do is try to isolate the problem.

So, following @ntrevena advice and replace the audio. I extracted the original audio from the non-compressed version and put in the compressed version and removed the FFMPEG created audio..

So, kept the compressed video
Replaced the audio with the original audio.

And now, both Audio and Video Direct Play..

@ljunkie That should not be normal right? it should have played the Video and Transcoded the audio (if needed) right?

@wesman said:
Okay, becuase the first thing you always do is try to isolate the problem.

So, following @ntrevena advice and replace the audio. I extracted the original audio from the non-compressed version and put in the compressed version and removed the FFMPEG created audio…

So, kept the compressed video
Replaced the audio with the original audio.

And now, both Audio and Video Direct Play…

That should not be normal right? it should have played the Video and Transcoded the audio (if needed) right?

From the way I see it, that’s looking good. But again, my experience with the Roku is very limited.

How does the output look/sound?

Yeah, so, back to the original question.

h.265 at -crf 18 looks good, damn good… on my 65’ 4K Samsung TV and in my Media Room (165 inch) I can see slight differences… very slight.

however, if you are looking to save space, do it… I’ll put my command line below… however, I am not looking to save space… so… keeping the full. file…

ffmpeg -i “M:\Media\Adult\Movies\Oblivion (2013).mkv” -c:v libx265 -preset slow -crf 18 -c:a copy -c:s copy “M:\Media\Adult\Movies\x265_Oblivion (2013).mkv”

@ntrevena what, if any, would be the benefit of running the following line, lossless with the “-crf 0”, essentially just converting to h.265 over h.264… any good reasons?

ffmpeg -i “M:\Media\Adult\Movies\Oblivion (2013).mkv” -c:v libx265 -preset fast -crf 0 -c:a copy -c:s copy “M:\Media\Adult\Movies\x265_Oblivion (2013).mkv”

@wesman said:
@ntrevena what, if any, would be the benefit of running the following line, lossless with the “-crf 0”, essentially just converting to h.265 over h.264… any good reasons?

ffmpeg -i “M:\Media\Adult\Movies\Oblivion (2013).mkv” -c:v libx265 -preset fast -crf 0 -c:a copy -c:s copy “M:\Media\Adult\Movies\x265_Oblivion (2013).mkv”

That’s an interesting question. -crf 0 essentially is lossless. It should output a file that is visually identical to the input file. The downside is there would be no compression (well, negligible anyway).

The -crf value is exponential, so every time you decrease the value, it increases the bitrate exponentially. You can read more about it here: Encode/H.264 – FFmpeg

A sane -crf value would be 18. But to be certain, I would maybe drop that to 10-12. It would still provide some compression, as well as be visually lossless. You can also run a 2-pass encoding as well, which should increase the visual accuracy.

As to why you would do the conversion to h.265 with a -crf 0 switch? It would seem rather pointless, unless you had a very specific need, such as hardware that can read it. Also, you may like the idea for future compatibility.

If the past has taught us anything, it’s that maintaining a video library can be a pain in the ass, especially as new hardware, encoders, software and fads hit the market. Keeping a library all one set of codecs, means you only have to research a single problem when it comes to moving your library to the next level. Lots of disparate codecs, means lots of different problems to solve when it comes to upgrading your videos.

I have a lot of old avi’s and a few wmv’s. It’s a nightmare to try and play them on some of my players, so moving them all to a newer codec/format, they become useful again.

Does that make sense?

@ntrevena said:

@ChuckPa said:
Wagers a bet that it won’t hold a candle to 50+ Mbps 1080p but wonders how many yards back you have to sit to watch it

(can you tell I’m jealous? :smiley: )

Haha! I would say it too, but you’d be surprised at how far the compression has come over the last 10 years.

I only heavily encode video I don’t care about. You know, the TV Series you can live without, or the shows your wife watches etc… I mean I wouldn’t do that to my wife, but just as an example of something someone might do…

So, @ntrevena, over the last couple days i have been playing around with the x265 compression.

with a 1080P rip, I can get 50% compression with a -crf 12 setting and actually see NO Difference… Of course, that is completely subjective, it just might be my really old eyes. However, even in my gigantic projector screen, I can see no difference between the two files.

That being said, I am keeping the nearly uncompressed h.264 files, even though they are larger, I don’t need to conserve space. but will be looking at that very seriously when we are able to rip the 4K movies.

@wesman said:
So, @ntrevena, over the last couple days i have been playing around with the x265 compression.

with a 1080P rip, I can get 50% compression with a -crf 12 setting and actually see NO Difference… Of course, that is completely subjective, it just might be my really old eyes. However, even in my gigantic projector screen, I can see no difference between the two files.

That being said, I am keeping the nearly uncompressed h.264 files, even though they are larger, I don’t need to conserve space. but will be looking at that very seriously when we are able to rip the 4K movies.

That’s great to hear, such a compression ratio with a nice output.

Keeping the original is probably a good idea if you don’t have the space concerns. That said, it’s still a good way to bring old and disparate videos up to date, with little to no loss in quality.

Glad you got it sorted though :slight_smile:

@ntrevena said:

@wesman said:
So, @ntrevena, over the last couple days i have been playing around with the x265 compression.

with a 1080P rip, I can get 50% compression with a -crf 12 setting and actually see NO Difference… Of course, that is completely subjective, it just might be my really old eyes. However, even in my gigantic projector screen, I can see no difference between the two files.

That being said, I am keeping the nearly uncompressed h.264 files, even though they are larger, I don’t need to conserve space. but will be looking at that very seriously when we are able to rip the 4K movies.

That’s great to hear, such a compression ratio with a nice output.

Keeping the original is probably a good idea if you don’t have the space concerns. That said, it’s still a good way to bring old and disparate videos up to date, with little to no loss in quality.

Glad you got it sorted though :slight_smile:

Yes, and still not exactly sure if I am asking this right, but when I asked about moving everything to x265, i was thinking more along the lines of benefits in Hardware decoding on the client. but I might be asking that completely wrong

@wesman said:
Yes, and still not exactly sure if I am asking this right, but when I asked about moving everything to x265, i was thinking more along the lines of benefits in Hardware decoding on the client. but I might be asking that completely wrong

Honestly, there are no benefits over h.264 at the moment in terms of hardware decoding. If anything, there is actually more of a performance hit when using h.265.

h.265 is not supported on anywhere near the same amount of devices as h.264. I’m lucky that my mobile devices and TV support it, but not many do by comparison.

So at the moment, not really advantageous, but in the future, it’s probably where most people will move to. You can already see it entering the market.

Pretty much anything made in the last two years supports hardware decoding of x265.

So, I am slowly converting my library to 265

@wesman said:
Pretty much anything made in the last two years supports hardware decoding of x265.

So, I am slowly converting my library to 265

incorrect. Software decoding yes. hardware, no.