PDA

View Full Version : Playback issue with Mezzmo transcoding



pgoelz
09-13-2011, 08:50 AM
Hi all,

I tried searching and found several references to what might be similar issues but no solutions. So here goes...

On a lark, I bought a Logitech Revue... the price was right. Since its media player uses streaming vs. file sharing and does not support my Canon HF100 MKV (h.264) files, I have been trying various DLNA servers to see what works. They all have their various issues but Mezzmo comes the closest. In fact, it works great except for one annoying issue. Playing any transcoded file on the Revue for the first time results in no movement of the progress bar in the player and the video stops abruptly after 2-10 seconds (kinda random). If I play the file a second time, it plays perfectly.... the progress bar moves and it plays to the end just fine.

I cannot be sure but I don't think this is strictly a player issue because it plays supported files perfectly with transcoding disabled.

Server machine is Windows 7 x64, plenty of HD space, 3GHz dual core and 4GB RAM. Connection to the Logitech is 1GB hardwired. CPU usage during transcoding is low.... less than 50% and sometimes below 30%. In fact, is that maybe suspiciously low? Simply playing an h.264 file on that machine without hardware acceleration uses more CPU. The video card is an nVidia GT210 with Cuda acceleration.... does Mezzmo use hardware acceleration?

Since subsequent plays are perfect, is this maybe an issue with on the fly transcoding serving up the file before it has transcoded enough? Just a thought.

Yes, a workaround would be to play all files at least once. However, I have a LOT of them and insufficient storage space to transcode them all up front.

Hope I can get it solved before the trial expires..... it works great aside from this, and I have no problem purchasing it.

Any ideas? Anyone else using MKV files successfully with the Revue?

Paul

Paul
09-13-2011, 08:56 AM
Hi Paul,

Unfortunately it's a limitation of their player at the moment - since a file that needs to be transcoded doesn't have a known size, their player rejects it. We've tried various workarounds that work for other devices, but couldn't find one that works. Considering their DLNA is still in beta state, we're hoping that Logitech will improve this in their firmware over time.

Mezzmo uses FFmpeg for transcoding and that doesn't use hardware acceleration (at least not yet, but we're investigating this as well).

pgoelz
09-13-2011, 09:11 AM
Well DAMN! Yeah, that makes perfect sense.

Would it be possible for the transcoding engine to guestimate the final transcoded file size up front, add a bit for safety, and then pad the end as needed? Or guestimate the final file size up front and then dynamically adjust the compression to make the final file match the guestimate?

Just thinking..... the Revue works pretty well aside from that. And the fact that it doesn't have much content at present ;) But as a network aware wired or wireless player it isn't bad.

Paul

Paul
09-13-2011, 09:18 AM
Some of our workarounds do try to guess the final size and of course it's impossible to match a guesstimate perfectly, since we're talking about variable rate video and audio. If the file is off even by one byte, some devices will reject it. I don't think it's technically possible to match the file size precisely, unless the encoded format is uncompressed video and uncompressed audio (which isn't playable by anything, really).

pgoelz
09-13-2011, 09:27 AM
Here's another thought.... per what I have read, the Revue supposedly supports h.264, just (apparently) not my MKV container. Any chance of "transcoding" to another supported container without trying to decompress/recompress? That might be fast enough to finish the file before serving it to the player without adding a significant delay?

Please help.... I'm trying to justify keeping the Revue ;) I love the keyboard and the Tivo integration, but if it won't play my files AND won't play the major TV web sites.......

Paul

Paul
09-13-2011, 09:30 AM
We will try to remux as much as possible (change the video container, keeping the video stream), but that still takes time and we're limited by the few seconds a device will wait for us to start delivering a file (usually under 25 seconds). Even if you have an i7, I doubt you can remux a full-length movie within the 20-25 second time slot. The best results I have on my i7 here are around 2-3 minutes.

pgoelz
09-13-2011, 09:37 AM
But but but..... in my case, my files are between 10 seconds and 10 minutes long. They are camera original files from my Canon HF100. All my longer files are AVI. Any chance I can get it to remux my MKV files and accept the fact that it will introduce a delay and longer files may not play (I think the Revue waits about 10 seconds)? That would be a very acceptable solution for me.

Paul

Paul
09-13-2011, 09:38 AM
Well, we could try :) If you are comfortable editing the device profiles (they are just text files), I can tell you what to change, or open up a support ticket (mention this thread) and I'll create a test device profile for you.

pgoelz
09-13-2011, 10:03 AM
I'm quite comfortable with editing the profile as long as I can find it ;) How about we do it here so others with the same issue can try it?

Unfortunately, I don't know what h.264 containers are supported. That said, I'm pretty sure my Sony AVS files (*.mp4, rendered from Vegas) play just fine without transcoding.

Paul

pgoelz
09-13-2011, 10:15 AM
Just had a look to get a head start and I don't see anything that looks like a profile file. I looked in the program file folder as well as app data (local, low and roaming).

Paul

Paul
09-13-2011, 01:22 PM
See this post for their location: http://forum.conceiva.com/showthread.php/467-FAQ-Where-are-device-profiles-located

You'll want to edit LogitechRevue.prf (using Notepad) and change:



<transcoding enabled="1" minimumstreamingsize="6000000" waitmsbeforestreaming="4000" contentlength="5" understandsdlnaprofileid="0" />


to:



<transcoding enabled="1" minimumstreamingsize="200000000" waitmsbeforestreaming="25000" contentlength="5" understandsdlnaprofileid="0" />


This will tell Mezzmo to wait until the transcoded file is at least 200 MBs or for 25 seconds, whichever happens first and then it'll try to send the file through. See if that helps. You can try increasing those values and see if the device will still work.

Please let me know how that goes.

pgoelz
09-13-2011, 09:03 PM
I tried it this morning but I had limited time to play and something broke. In fairness, I think it might have broken last night during other experimentation, but transcoding seems to be broken. I noticed before I changed the profile that checking or unchecking the "disable transcoding" box did not seem to affect whether or not Mezzmo created files in the transcoding folder (it created them whether or not it served them up to the Revue). This morning after changing the profile, the Revue was unable to play files that should have been transcoded.

I ended up uninstalling and reinstalling and that seems to have restored normal transcoding functionality (with the stock profile) but the library seems to be confused with references to the previous install library. This evening I'll try cleaning up the library and modifying the profile again.

But it brings up a question.... when I modify and re-save the profile, when is it active? Immediately? After server stop/start? After program restart? Or after reboot? And can I create a new profile under a different name (like for example "Logitech Revue-modified") and have the program find it? I tried that and it didn't show up but I didn't have time to experiment with restarts and reboots.

Paul

pgoelz
09-14-2011, 08:35 AM
OK, after messing around with it this evening I can report a certain amount of success. After the reinstall and a total re-do of the library, I modified the profile for the Revue. It seems to play my shorter transcoded files mostly OK. If the shorter files start, they play correctly. Trouble is that the transcoding takes too long and videos more than maybe a minute long have not finished transcoding by the time that the file reaches the 200MB or 25 second limit. These files do not play correctly. I could increase the parameters but transcoding 200MB takes a while and the 25 second max delay is excessive and not practical.

We talked about simply remuxing since as far as I know, the Revue supports h.264, just not the MTS container (I was wrong originally.... my camera files are MTS, not MKV). Is this possible by modifying the profile further? Hopefully it would speed the "transcode" up a bit?

Paul

Paul
09-14-2011, 08:54 AM
Please post FFmpeg information (using Mezzmo's "Get FFmpeg Information") and I'll see if they can be remuxed. Also, did you change anything else in the profile or only what I posted above?

You can have another profile file, but it needs a unique <guid> in it for Mezzmo to pick it up. Device profile changes are picked up after a server restart (if you want the new profile to appear in Mezzmo, then you also need to restart the GUI).

pgoelz
09-14-2011, 10:14 AM
Took a moment to figure out how to "get ffmpeg information ;)

Here tiz..... this is a typical MTS file I need to be able to play. The ffdshow version is as distributed with Mezzmo.

##################################################

ffmpeg version N-32348-g6dbac85, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 6 2011 16:03:56 with gcc 4.4.2
configuration: --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-mingw32- --enable-static --disable-shared --enable-zlib --disable-ffplay --prefix=/media/windows/ffmpeg --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect --pkg-config=pkg-config
libavutil 51. 16. 0 / 51. 16. 0
libavcodec 53. 13. 0 / 53. 13. 0
libavformat 53. 11. 0 / 53. 11. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 37. 0 / 2. 37. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mpegts @ 015c83a0] Continuity Check Failed

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 59.94 (60000/1001)
Last message repeated 1 times
Input #0, mpegts, from 'U:\Raw video\Buckley 2011\00000.mts':
Duration: 00:00:31.04, start: 0.766967, bitrate: 16114 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 256 kb/s
At least one output file must be specified


---> DB Level Info: 40, 100
---> Frame rate: 59.96
---> Aspect ratio: 16:9

########################################

Any issue with the "stream 0 codec frame rate differs from container frame rate: 59.94 " message? I have seen some references to this issue during my readings lately but I have not actually researched it. Could this be why the Revue (which is supposed to support MTS files per some sources) won't play mine?

EDIT: Got it re: the GUID. I can now switch profiles. Thanks.

Paul

Paul
09-14-2011, 10:36 AM
At the moment the device profile for the Revue doesn't have MTS files, because we found that none of the ones we tested actually play. I know that Logitech says it supports it, but a quick Google shows that perhaps that's not the case at the moment.

pgoelz
09-14-2011, 11:03 AM
Yeah, I read the same Googles ;) Just hoping is all. There is an update (supposedly) coming that is suspected of adding some additional file support. I'm not holding my breath, especially after they started blowing the Revues out at $99. Hence trying to get a functional and practical transcoding thing going.

Paul

Paul
09-14-2011, 11:05 AM
We bought ours at the old price just a couple of days before the reduction :( Once the update is out, we'll re-test it and see if it opens up any new formats. Is there any information on when it's coming out?

pgoelz
09-15-2011, 12:32 AM
Supposedly the HC update is end of September. But it has been impending for some time and I am a bit worried that with the huge price reduction, the Revue is not on the front burner at Logitech any more.

A shame.... it is basically a nice product. But it suffers from the same problems that a lot of current products do.... it just isn't finished and ready for prime time. If I had bought it for the original $299 price, I would have returned it. As it is, for $99 it has some functionality. I love the keyboard and how it and the Revue integrate with our Tivo (or any other cable box). Having the web on the TV is nice, and it plays some of my media. Just not the files I really want to play.

So I'm waiting eagerly but I'm not holding my breath ;)

Paul

pgoelz
09-15-2011, 10:07 AM
OK, I decided that Mezzmo is not a perfect solution for the Revue.... but it is as close as I have gotten and I'll take your word that transcoding does not work perfectly because of a limitation in the Revue. So I registered it. Thanks for the support. It is greatly appreciated.

I still wonder about the transcoding issue though.... you say that the issue is that the file size is not known until transcoding finishes. What would happen if you simply guestimated the file size and got it wrong? Would playback end when the actual served file reached the reported size? What if you always over reported the file size?

I'm also having trouble making sense of the library. I have my audio, video and photo files already organized in folders and subfolders. If I move these folders around in the library, they don't always show up in the same place when the library is viewed in the revue or in Windows Media Player. Where should entire folders be placed when added to the library?

Paul

Paul
09-15-2011, 10:19 AM
As I mentioned previously, we tried all sorts of tricks, but nothing really worked. For example, if we overestimate, the device may try and ask us for some bytes from the end of the file, but that data doesn't exist, so it aborts playback. I wish it was simple, but it's just not at the moment :)

Regarding the library layout - I've just tried it here on our Revue and everything seems in order and looks exactly as I have in my Mezzmo library. Can you please provide more details on what you move where and what happens on the device? Please note that some devices cache folders, so you may need to restart the server for changes to take effect.

pgoelz
09-15-2011, 10:36 AM
Yeah, the Revue is an unfinished work in progress.... or at least I hope it is still in progress.

Nothing is simple these days. Seems to me that lately, every time a manufacturer makes things "simpler" they get more complicated unless you happen to think exactly like the manufacturer did. File sharing worked just fine for me. I'm assuming that doing it the DLNA way has some advantages like security and playback smoothness, but it also adds a new level of complexity.

I have uninstalled and reinstalled to totally wipe and reinstate my library. So far, so good. I'll let you know when/if I run into additional inconsistencies. Here's what I have.... how should things work?

I have an MP3 folder and a Photos folder on one partition. I have two entire hard drives with videos. I originally added them each tp the library and specified what kind of files each contained. That worked OK as far as I could tell, but I would occasionally find inconsistencies trying to browse the folders (which is how I have to browse the video files since they don't have metadata and their file names are simply serially assigned). More as I find it ;)

Paul

Paul
09-15-2011, 10:42 AM
Yes, DLNA solves some issues (e.g. support for files larger than 4GBs on FAT32 USB sticks), but it does add complexity, mostly because transcoding is not well defined in the specs and thus it's up to firmware player developers and server (like Mezzmo) developers to invent things and squeeze them into an existing framework.

Your setup sounds fine, let me know if you hit any issues.

pgoelz
09-16-2011, 12:21 AM
OK, after some more experimentation, I have two possible issues but the first is possibly actually a Revue issue.

This morning I was browsing through my files on the Revue. At first, everything was where it should be. My two video drives were in the "folders" folder within the video folder on the Revue. After running into issue two (below), suddenly I had the following when browsing on the Revue.... Mezzmo > video > folders > U:, G: (my two video drives) > U: > video > folders > U:, G:. In other words, there was a second video > folders nested inside the first one. I told the Revue to re-scan after resetting the media server (see below) and everything reverted to being correct.

The second issue seems to be some sort of bug or unexpected behavior in the Mezzmo media server. If I watch the CPU usage on the server PC (Win7 Pro, x64, C2Duo, 3GHz, 4GB) as I request playback on the Revue, when I attempt to play a long file (especially AVI files) the CPU goes to 100% as expected and the file does not play (still transcoding?). I have the "complete transcoded files in the background" UNchecked, but if I abort the playback on the Revue, the CPU stays at 100% indefinitely instead of going back to zero. If I look in the transcoded files folder, there is one that is still growing in size. This then seems to corrupt the next playback (and/or causes the incorrect folder display behavior) and has resulted in the media server actually shutting down a couple times. If I stop and then restart the media server, I can usually restore proper behavior but the trouble is that unless I am watching the CPU usage, I don't know it is happening. The server is not in the same room as the Revue and I have been monitoring it using remote desktop. I have subsequently checked the "complete transcoded files in the background" checkbox and told it to use lower priority CPU.... we'll see if that cures it.

I note that the transcoded files are not as big as I would expect.... they are in the video folder and are named with a random filename that includes the string "aac" or maybe "ac3". Are these actually just audio files? Is that perhaps the only thing that Mezzmo needs to transcode? I have seen some references to the fact that it might be the audio in MTS files that makes the Revue barf..... my MTS files don't take anywhere near as long to transcode (and at lower CPU utilization) than AVI files.

Paul

Paul
09-16-2011, 08:40 AM
On a rare occasion I've seen the Revue request invalid data, and I suspect that's what's causing the strange folder display. I am not sure when the Revue starts doing that, but possibly there's something in their firmware that gets confused about something. It's hard to reproduce though...

We'll check that transcoding issue - if you have background transcoding turned off, then the file should be stopped and deleted shortly after you stop playback (within 30 seconds, I'd say, but could be up to 2 minutes).

There are several folders in the transcoding folder - one for Video, one for Audio, etc... So, if a file is in the Video folder, then it's a video. They may be larger, smaller or similar to the original, depending on the input and output formats and whether it's a remux or a full transcode. MTS are more likely to get remuxed and thus be quicker and less CPU-intensive than AVIs, which are rarely remuxed.

pgoelz
09-16-2011, 08:54 AM
Well, that explains much, I think. I'm pretty sure at least a couple times I waited at least 2 minutes after beginning a transcode and aborting to see if it stopped, but I'll make sure tonight. What I expected it to do was stop immediately. And that also explains why it is far more likely to stall on AVIs since they seem to take almost real time to transcode. Plus they are bigger to start with. I'll experiment and let you know.

Paul

Paul
09-16-2011, 09:14 AM
Transcoding doesn't stop immediately, because we don't know if the device will continue requesting the file or not (there's no indication from the device to us saying that you've stopped playback or that it can't play the file). So, we basically timeout when no requests come in after a certain period of time and move transcoding to the background (or stop it).

pgoelz
09-16-2011, 09:22 AM
Case #1
"Complete partially transcoded files in background" is CHECKED
Requested playback of 10 minute AVI file.
Transcoding started after several seconds and the CPU went to 100%.
After 10-15 seconds (playback had not yet begun) I aborted the playback attempt by hitting the HOME button on the Revue.
CPU remained at 100%.
I then used the Mezzmo GUI to stop all current transcoding and Mezzmo confirmed that all transcoding had stopped.
CPU remained at 100% until I stopped and restarted the server about 6 minutes later.


Case #2
"Complete partially transcoded files in background" is UN-CHECKED
Requested playback of 11 minute AVI file.
Transcoding started after several seconds and the CPU went to 100%.
After 10-15 seconds (playback had not yet begun) I aborted the playback attempt by hitting the HOME button on the Revue. Note that at the 5-8 second point, the CPU went to zero and then back to 100%. Not sure why.
CPU then remained at 100%.
I then used the Mezzmo GUI to stop all current transcoding and Mezzmo confirmed that all transcoding had stopped.
CPU remained at 100% until I stopped and restarted the server about 4 minutes later.

####################################

It occurred to me that if you cannot duplicate this behavior, it is very possible that the Revue does not tell the server that playback has stopped and it no longer needs the file.... so transcoding continues until it finishes? Trouble is that if you start several playbacks without letting any complete, the server can apparently get tangled up and crash or shut down. Possibly because the CPU is at 100%?

Paul

pgoelz
09-16-2011, 09:33 AM
Sorry, took so long typing that last that I got out of synch. OK, I can certainly see how transcoding might not stop if the server does not get a cancel from the player. Can I set the timeout shorter in the profile? I'll have a look.

Paul

Paul
09-16-2011, 09:42 AM
No, that timeout is set at 2 minutes and cannot be changed at the moment. We'll need to make it adjustable, really, so I'll add that as an option in a future update.

Paul
09-16-2011, 09:47 AM
Sorry, my mistake - it's already there, but well-hidden :)

You'll need to modify the MezzmoMediaServer.ini file located in the same folder as the Mezzmo.db and add



TranscodingInactivityTimeout=45


to the "[Transcoding]" section in it to set it to 45 seconds, for example.