My plug-in has has no video and audio on LG Smart TV

I created a new Channel plug-in and it plays well on Medica Center but not on my LG TV



I posted on LG Media link forum ,

but probably should posted it here, since it regards to a new Channel plug-in



LG no audio and no video



Any idea what may caused " Audio sync: dropping video packet" ?

Based on the logs in your other post, it looks like the WebKit transcoder is unable to grab the audio stream from the flash video. That is a fairly common issue with Flash-plugins on Windows machines. One possible cause is using Windows-Remote-Desktop to manage the computer as it grabs and locks the audio before Plex Media Server has a chance to transcode it. If it’s possible to get direct access to the video streams without using a site config, you’ll have much better luck on a wider variety of client platforms.



What does this mean ? I did not use Windows Remote Desktop at all.

Regarding the video streams, yes I can use a tool something like URL Snooper to find the direct link to the
media file, but since my target website has thousands video webpages, is there any tool can do batch mode
in extracting url from Flash Player? (URL Snooper has no batch mode)

In addition, I forgot to mention I had made Webkit window visible, so I can the video is actually playing on
Plex Media Server, but nothing is on LG Media Link screen.


It means that Remote Desktop does not cooperate with Plex Media Server when it comes to transcoding Webkit audio/video. If you don't use Remote Desktop, it shouldn't be a concern.



Generally speaking, most websites use a single (or at most a few) method for presenting video streams to the end user. If you can sniff out the source file for one video stream, then you should be able to discern the logical steps to do the same for all their videos. You should not need to actually go to the effort (batch processed or otherwise) of snooping out each individual video file.



Leaving the webkit window in the visible mode should not have an effect on whether or not the audio and video are properly transcoded to the client. Another thing that would be worth checking is that the computer running PMS has an audio output designated with up-to-date drivers. I've heard of situations where a missing audio driver can interfere with the audio capture necessary for transcoding.

I checked audio driver, it seems updated.

In addition, even audio driver is not up-to-date, it should not bother video transcoding, right?



But on LG TV, there is neither Video or Audio. Meanwhile on PMS, Webkit window shows the video being played.



Feels like PMS is sending audio and video to LGTV, but LG could not receive or handle properly.



Some channels, like TED Talk, MSNBC does work well on LGTV.





Is there other way or tool to debug this issue?



If PMS can't grab the audio stream, the entire audio/video transcode will fail to produce anything on the client. I'd like to offer you another way to troubleshoot/fix the issue but unfortunately, webkit channels (particularly on Windows servers) are a real PITA. The other channels you mentioned, use direct video streams rather than webkit. Most of the channels in the Channel Directory do now because webkit is such a PITA. If I were you, I would seriously look into what options there are for grabbing the video stream directly.

Sounds I have to gave up webkit.



I am not familiar with interactions between flash player and its backend content server.

Here is my guess:

  1. Webpage load flash player with centain parameter( a video id?).
  2. Flash player sends the parameter to content server,
  3. content server replied with a mp4 file link
  4. Flash player then fetches the mp4 file.



    Does it sound reasonable?



    then I just need a tool find out what the parameter (video id) is,

    and how to use video id to get mp4 file link from content server.



    URL Snooper seems not enough. Should I use a protocol analyzer like wireshark?



    Any tips on how to do this?



    I guess all channel developers have experienced the same process before,

    it would be better it there is tutorial or wiki page talked about this sniffing process.



    I appreciate your quick response and warmly help.


I usually use the developer tools in Chrome to watch the http traffic. I'm not really experienced with Wireshark but, it's likely more than capable. The HTTPFox addon for Firefox is also a decent alternative, as is Charles Proxy (another stand-alone program).

Ok, a quick update. Wireshark rocks ! I found the video ID.





Basically, I searched .mp4 in the packets captured by wireshark,

I saw a http response packet returned from the server to the client with the mp4 file link,

and there is a long random number in the mp4 file name.

When I search the source code of the webpage, the random number is one of variables

used by a piece of javascript.

so I can now use the randnum fetched from source code to construct the mp4 file link quickly.





But tricky part is, for a 20 minutes video, the flash player actually fetches four 5-minute mp4 files,

file-1.mp4

file-2.mp4

file-3.mp4

file-4.mp4

So how can I make the plug-in to play multiple mp4 files continuously without user involvement and awareness ?

(Use just click button once and saw the whole 20 minutes video without feeling interrupt)

Well, that’s a good-news/bad-news situation. Direct MP4s are great in terms of client support. Unfortunately, stacking them to play consecutively, is not well supported across all clients. I know the desktop client and iOS client support stacking but if I had to guess, the LGTV client probably does not. The URL Service for The-Daily-Show, which supports both the plugin and the PlexIt bookmarklet, is an example of using “stacked” MP4 videos to create a full-length episode. See the code on github for reference. Ideally all clients should support it. If you’re looking for something to test with before putting in the effort to change your code, the South Park plugin does the same thing.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.