PDA

View Full Version : AVC format with Sony Bravia 2012 (KDL-46HX850)



Dude
January 17th, 2013, 07:43 AM
Hello Dennis,

Does KRR support transcoding to the AVC format? Because my Sony Bravia 2012 does and I only see files in MPEG2 format.
Using MPEG2 is not a good choice for me since it's got a huge bitrate at the highest quality and my wired network+the TV's ethernet card don't do more than 85MB/s. Full quality MPEG2 will result in choppy playback on any DLNA server. AVC instead has a superior quality to that of max bitrate MPEG2, and smooth playback too.

I've just installed KRR 1.4.0 and no video works. Only a blank screen. It appears as if the video is playing but there is no image or sound. If I let the transcoding engine finish and try to play the vids in KRR's transcoding folder with WMP or VLC on Windows, the transcoded file appears corrupted with a lot of artifacts on the screen, never recovering. Sound plays fine. Also, the few frames that play in the transcoded file have no subtitle burned in, even if I do a manual transcode and tick the Subtitle checkbox in the transcode properties.

I'm sending the logs right after posting this thread.

Regards.

Dude
January 17th, 2013, 07:51 AM
I was unable to attach the logs files to a Private Message, so I've sent them via the Zendesk ticketing system.

Edit: Also sent them to the support address.

Dennis
January 17th, 2013, 08:02 AM
Yes, KooRaRoo fully supports encoding to AVCHD and will attempt to do so when it can (either by remuxing or a full encode). I will check the logs and get back to you via support e-mail.

Dude
January 17th, 2013, 08:08 AM
Great, thank you.

No video files can currently be encoded to AVC on the Bravia 2012 profile (have not checked other profiles) and MPEG2 still transcodes to a corrupted video regardless of the settings I'm choosing. I'll continue to play with it and let you know if MPEG2 gets unstuck.

Dennis
January 17th, 2013, 08:46 AM
Please try the Bravia "2011 models" and see if that encodes to AVCHD correctly - the current "2012 models" profile is mostly based on a TV model different to yours and perhaps a new profile is needed. If 2011 works (AVCHD), then definitely a new profile is needed and I'll send it to you via support as well.

Dude
January 17th, 2013, 08:58 AM
This may have an obvious answer which I'm somehow missing, but how do I select a different profile? I can't find any profile settings anywhere. I can only select an auto-detected profile on the network, for example the "Device:" select box found in the manual transcoding dialog which is listing (among other DLNA devices on the network) the Bravia TV set.

Dennis
January 17th, 2013, 09:16 AM
Sorry, I should've mentioned how to do this :) The instructions are in this thread: http://forum.kooraroo.com/showthread.php/192-How-to-check-and-select-a-correct-device-profile

Dude
January 17th, 2013, 10:29 AM
Ok, choosing the 2011 yields some progress. AVC is working. Subtitles look stunning, best I've seen on any DLNA server, but only partly functional.

Current problems:
1. Pause/resume is not working. Pausing works, however, when hitting the resume button on the remote, the TV says "Playback not available." and I need to quit the movie.
2. Upon stopping a movie and restarting playback, the movie restarts from the beginning, not from where I had left it off. Because the server doesn't remember the file position, the TV no longer displays the Restart Playback option to start the file at the beginning, because it's already at the beginning.
3. The audio volume is too low, I can't find any audio volume setting on transcoding. Selecting AC3 or MP2 has no effect on volume.
4. No subtitles when transcoding with the movie's built-in subtitle stream (selected the "subrip" option on the Subtitle select box, but I guess that's just a passthrough for TV's that support a separate stream for subs - Bravia doesn't)
5. Burned-in subtitles display nicely except the fact that I'm not using an English charset, but a Central/Eastern European one. Characters such as "șță" are not rendered properly. Instead, a square with a question mark inside it appears. Video codecs such as FFDshow (or CoreAVC) together with VSFilter (DirectVobSub filter) have a charset selection dialog. I can't find such a dialog in KKR.
6. The Windows CPU chart shows all my 8 CPU cores at 100% usage while transcoding, but looking at my processlist and ordering by CPU usage descending shows most processes at 0-1% usage (WTF?!). Looking at it with Windows Resource Monitor shows FFMpeg.exe with 25 threads and 97% CPU usage. ffmpeg doesn't appear in the regular process list. Maybe due to the way it's being spawned?
7. Any way I can use ATI GPU hardware acceleration while transcoding to AVC? Or perhaps an AviSynth alternative that uses CoreAVC for transcoding?
8. I couldn't find any settings for 3D subtitles (either SBS or OU). Do you plan on adding support for auto converting a single centered external sub to 2 subs for 3D support? FFDshow is one codec that supports stereoscopic subs.
9. MPEG2 still doesn't work with the 2011 profile (appears to play but no image, no sound). Not that I would ever want to play this antique format.

Thanks for the help so far Dennis!

Dude
January 17th, 2013, 10:40 AM
9. Correction: MPEGTS doesn't work, with the blank screen, no sound. MPEG works fine. I've seen this behaviour with the blank screen on other media servers. I assume that my TV is unable to play MPEGTS.

Dennis
January 17th, 2013, 10:44 AM
Ok, choosing the 2011 yields some progress. AVC is working. Subtitles look stunning, best I've seen on any DLNA server, but only partly functional.

Great, thank you for letting me know!



Current problems:
1. Pause/resume is not working. Pausing works, however, when hitting the resume button on the remote, the TV says "Playback not available." and I need to quit the movie.
2. Upon stopping a movie and restarting playback, the movie restarts from the beginning, not from where I had left it off. Because the server doesn't remember the file position, the TV no longer displays the Restart Playback option to start the file at the beginning, because it's already at the beginning.

Can you please send a log trying to pause/resume a movie to support e-mail and I'll check it out.


3. The audio volume is too low, I can't find any audio volume setting on transcoding. Selecting AC3 or MP2 has no effect on volume.

The volume should be the same as in the original file. Does the original sound ok on the PC?


4. No subtitles when transcoding with the movie's built-in subtitle stream (selected the "subrip" option on the Subtitle select box, but I guess that's just a passthrough for TV's that support a separate stream for subs - Bravia doesn't)

Yes, that's coming soon (extracting embedded subtitles).


5. Burned-in subtitles display nicely except the fact that I'm not using an English charset, but a Central/Eastern European one. Characters such as "șță" are not rendered properly. Instead, a square with a question mark inside it appears. Video codecs such as FFDshow (or CoreAVC) together with VSFilter (DirectVobSub filter) have a charset selection dialog. I can't find such a dialog in KKR.

One thing to try is to use a different font (one that supports your character set). This is set on the Subtitles tab in device properties. Also, can you please send a sample SRT with such characters to support as well and I'll test it here.


6. The Windows CPU chart shows all my 8 CPU cores at 100% usage while transcoding, but looking at my processlist and ordering by CPU usage descending shows most processes at 0-1% usage (WTF?!). Looking at it with Windows Resource Monitor shows FFMpeg.exe with 25 threads and 97% CPU usage. ffmpeg doesn't appear in the regular process list. Maybe due to the way it's being spawned?

FFmpeg is spawned by the server, which is a Windows service, so in Task Manager you need to enable "Show processes from all users" to see FFmpeg.


7. Any way I can use ATI GPU hardware acceleration while transcoding to AVC? Or perhaps an AviSynth alternative that uses CoreAVC for transcoding?

There is preliminary support for using avisynth in KRR, albeit only in a testing phase. If you are interested, I'd be happy to work with you on getting it finalized.


8. I couldn't find any settings for 3D subtitles (either SBS or OU). Do you plan on adding support for auto converting a single centered external sub to 2 subs for 3D support? FFDshow is one codec that supports stereoscopic subs.

Yes, that will come in one of the future updates. Perhaps paired with avisynth processing.


9. MPEG2 still doesn't work with the 2011 profile (appears to play but no image, no sound). Not that I would ever want to play this antique format.

Is it transcoded (with subtitles) or streamed natively? I'll need to see logs for that as well.

Dude
January 17th, 2013, 11:09 AM
1. I'll send a log after posting this
2. I'll send a log after posting this
3. The volume is a little low on the PC as well. I guess I was used to another server's option of converting 5.1 to 2.0 and the sound got louder.
4. Great news
5. I'll send a SRT after posting this. I've tried a few other fonts. Didn't help. All (or most) fonts support a Central or Eastern European encoding, but it needs to somehow be selected. Besides DirectVobSub which comes with the CCCP codecs you can also find the dialog in the VLC player or other DLNA media server software, as an example of what I'm talking about. I'll tell you how to access it if you need.
6. Ah yes, "Show processes from all users" wasn't enabled
7. Great, I'll be glad to help
8. Yes, paired with AVISynth makes sense since some codecs already have support for stereoscopic subs
9. MPEG actually works (see above). Tell me if you need the log for MPEGTS if you decide to investigate this too.

Dennis
January 17th, 2013, 11:24 AM
3. The volume is a little low on the PC as well. I guess I was used to another server's option of converting 5.1 to 2.0 and the sound got louder.

We can test such an option (to increase the volume). Converting 5.1. to stereo will be done in KRR if you manually select MP3 or MP2 as the destination audio codecs, as these don't support 5.1 sound.


5. I'll send a SRT after posting this. I've tried a few other fonts. Didn't help. All (or most) fonts support a Central or Eastern European encoding, but it needs to somehow be selected. Besides DirectVobSub which comes with the CCCP codecs you can also find the dialog in the VLC player or other DLNA media server software, as an example of what I'm talking about. I'll tell you how to access it if you need.

We'll also test setting a charset - once I have your SRT, I'll test it here and send you a patch to try (via support).

9. MPEG actually works (see above). Tell me if you need the log for MPEGTS if you decide to investigate this too.
No need for logs, thanks - we'll sort it out through support as well.

Dude
January 17th, 2013, 11:34 AM
Fast Forwarding and Rewinding appear to be working properly, but only up to the point where the transcoding process has reached, then seeking stops and the file pauses. Is this as intended, or a bug? Should the transcoding engine seek ahead and transcode ahead when Fast Forwarding, or does transcoding need to be done sequentially and not chunked?

Dennis
January 17th, 2013, 11:40 AM
Transcoding is done sequentially (since the file is being written to disk), so you can't seek past the current transcoded position.

Dude
January 17th, 2013, 11:43 AM
I've sent the SRT. Windows calls this character set, "Script". You can also find a similar dialog in notepad.exe: Format -> Font menu. You'll see the Script select box there.

In the subtitle file, you can see the characters as early as line 3:


Merii asta... should display on the rendered file:
Meriți asta...

Dude
January 17th, 2013, 11:51 AM
Tell me if you need my set's info to create a more accurate 2012 profile. Surely it should have some XML files describing it somewhere, like dmr.xml, etc.

Dennis
January 17th, 2013, 12:05 PM
Tell me if you need my set's info to create a more accurate 2012 profile. Surely it should have some XML files describing it somewhere, like dmr.xml, etc.

Thanks - I should have it in the logs, but if not we'll get it through that. Usually those only describe a subset of the full formats support - basically only file types that are in the DLNA spec are there, but the TV may be able to play more. We'll test it soon - your issues are not far away from being processed in the queue ;)

Dude
January 17th, 2013, 07:12 PM
The engine always chooses an MPEG2 transcoding profile by default when first playing a file. It's only when manual transcoding begins to AVC that the engine will use it from that point on, even if manual transcoding is interrupted. Next time the file plays it will choose AVC.

How do I set a default AVC transcoding profile for all files?

Dennis
January 17th, 2013, 07:26 PM
It depends on the original file - if the original file is h264 with a level higher than the destination video level (4.1 in the current profile), then encoding defaults to MPEG2, because it's typically faster, albeit at a higher bitrate. I think once we work out the best options for the device profile and sort out exactly what the TV plays and what it doesn't, we'll optimize encoding.

If you want to set it manually to always encode to AVCHD though, just change this:



<Format id="mpegts_mpeg" format="mpegts" dlna="AVC_TS_HD_EU_ISO" encode="1">


to this:



<Format id="mpegts_mpeg" format="mpegts" dlna="AVC_TS_HD_EU_ISO" encode="1" default="1">


in the device profile. Please don't do it before we finish testing and working through your support issues though :)

Dude
January 17th, 2013, 07:46 PM
I will not change it yet. I've run into a bit of a problem with AVC. It processes files on my 8-core (4 physical, 4 logical, HT enabled) i7 920 machine at about 17-20 frames a second. That means that if I play the file immediately, streaming will catch up with transcoding and playing will become extremely choppy. If I pause it and play again after 5 minutes it works fine again.

So this may not necessarily be a bug. Most likely it's not. But do you have any tips on how to speed up transcoding so that it increases FPS output without sacrificing quality?
Since the movie plays at 23.976 FPS, if ffmpeg would manage to keep a constant 25 to 27 FPS that would be a safe value.
Setting FFmpeg process priority to high does not seem to help.

Edit: Not all movies convert at 17 FPS. The highest quality 1080p ones with Blu-ray as a source, with a lot of movement and a 5.1 level do. Must be a bitrate thing. Most convert at 23-25 which is the threshold.

Dennis
January 17th, 2013, 08:08 PM
Does this happen when you burn-in subtitles? Burning-in subtitles requires full transcoding and this is where MPEG2 encoding is typically faster (but with a higher bitrate and a bit of a quality loss). We can certainly work on improving your numbers, as that seems to be really, really slow, given your hardware.

Please send in a log showing the issue to support and I'll work on it with you.

Dude
January 17th, 2013, 08:46 PM
You. Are. Awesome! And you're making this into the best DLNA transcoder. Ever.

I'll compare FPS with and w/o subtitles in an hour or so.

Dennis
January 17th, 2013, 09:57 PM
Thanks :) I really appreciate it!

Dude
January 18th, 2013, 01:02 AM
I've got the exact same FPS when fully transcoding, with or without burned subtitles. Apparently, there is no overhead when overlaying the subs.

Fully transcoding to MPEG2 is done about 4 times faster, at an average of 52 FPS. Obviously, I've used the same file as an input source.

MPEG2: 52 FPS, CPU usage: 38%
AVCHD: 17 FPS, CPU usage: 100%

Dennis
January 18th, 2013, 07:00 AM
Right, but without subtitles many (most?) files should be remuxed, since the device profiles allows for it.

Still, I would've expected full transcoding to be faster for AVCHD given your CPU, so we'll try to work out how to optimize it through support.

Dude
January 18th, 2013, 08:10 AM
Of course, thanks.