PDA

View Full Version : YouTube Plugin



Pages : [1] 2 3

whurlston
2011-11-18, 05:50 AM
Version 1.0.6.3 released (This version requires NextPVR 2.3.6 or higher)

Installation:

Close all NextPVR processes.
Unzip the file to your NextPVR data folder.
Restart the NextPVR recording service.
Start NextPVR.
Go to Settings/Plugins and enable the "YouTube" plugin.
Restart NextPVR.


Usage:

Select the YouTube plugin from the main menu. (It may take a few seconds to start depending on your internet connection.)
The default list is the "Most Recent" videos.
Select the feed category you want from the top (hidden) menu by clicking "Feeds" and selecting the feed from the popup and then select a video list from that particular category.
Authors, Searches and Custom Urls will only appear in the feed categories if you have entries for those categories.
Play a video by selecting it.
If your default list is set to Authors, CustomUrls, or Searches, the default feed will be the first in the corresponding list. If there are no entries in your default list, it will revert back to the default of Videos->"Most Recent".
Settings are applied when starting the plugin so you do not need to exit NextPVR for them to take effect. Simply exit to the main menu, adjust settings in the plugin settings screen and reselect the plugin from the main menu.


Settings Screen:

You do not need to change anything in the settings screen to use the plugin. All defaults will be applied on first use.
To add Searchs, Authors or Custom URLs, just enter the values in the text fields and press "Add". Make sure to use the "v=2" parameter for custom urls.
To delete Searchs, Authors or Custom URLs, select it from the list and press "Remove".
To Sort Searchs, Authors or Custom URLs, click on an entry in the list, drag it to the position you want and drop it.


Keyboard/Remote Commands:

Press "Stop" to toggle the list sort between the default and alphabetical
Press "Play" to toggle through the default stream format (PC only).
Press "Record" to toggle through the default stream quality.


Known limitations/bugs:

NMT (ffmpeg) functionality has not been tested with this version. It may be broken.
PC clients will only check for feeds of the configured default stream type.
If you select a video for playback and select it a second time before the video starts playing, it will play two copies almost simultaneously. You will only be able to stop one copy and you will continue to hear the audio of the second playback but you will not be able to stop it. You will need to let it finish or restart NextPVR.
My skinning abilities.

whurlston
2011-11-18, 05:51 AM
Screenshots

whurlston
2011-11-18, 05:51 AM
Screenshots2

bgowland
2011-11-18, 10:21 AM
Nice - it's working for me on my PC. Just a couple of things...



Known limitations/bugs:

Crashes NextPVR on the NMT when selecting a video.
Playback starts after 30% of the video is buffered. This will be configurable in a future release. If you need to buffer longer, just press pause when the video starts playing.
On the first point - do you expect you'll be able to get this to work on the NMT? On the second point, I've tried a few videos but it buffers to 100% before starting playback.

Cheers,
Brian

whurlston
2011-11-18, 01:48 PM
NMT: The NMT is my first priority. I expect it to work, it's just starting playback before the buffering is complete for some reason. I just couldn't work on it last night after my wife went to bed because that's where my NMT is.

Buffering: the popup says "100%" but that is actually 100% of 30% of the total download. (e.ProgressPercentage * 100 / 30)

mvallevand
2011-11-18, 02:52 PM
Really nice to see YouTube in high quality mp4, much nicer than the PlayOn transcoding to Universe. Here are some points

Installing to Program works but you have to move the skins to the DataDirectory

I tried on the NMT but it crashes before playback starts because it looks like the full screen updates come very fast from what looks like multiple threads. NPVR doesn't manage this so you end up with collisions on the VNC socket.

The full screen updates with the buffering message on the NMT pretty much maximizes the throughput (3+ per second). If you want this kind of frequency maybe consider a skin which only sends the rectangle for the message text and not a message box.

Another option for the NMT is to trying passing the http://....mp4 URL and let the PCH buffer it, I've tried a few URL's to mono and the playback starts quite fast this way. I probably would need to tweak mvpmcx2 though.

Martin

whurlston
2011-11-18, 02:57 PM
Installing to Program works but you have to move the skins to the DataDirectory:facepalm: I knew better.


I tried on the NMT but it crashes before playback starts because it looks like the full screen updates come very fast from what looks like multiple threads. NPVR doesn't manage this so you end up with collisions on the VNC socket.

The full screen updates with the buffering message on the NMT pretty much maximizes the throughput (3+ per second). If you want this kind of frequency maybe consider a skin which only sends the rectangle for the message text and not a message box.I suspected it was my screen refreshes causing it. That's easy enough to fix. I'll have a new build shortly.


Another option for the NMT is to trying passing the http://....mp4 URL and let the PCH buffer it, I've tried a few URL's to mono and the playback starts quite fast this way. I probably would need to tweak mvpmcx2 though.I was going to ask if this was possible. It would be my preferred method rather than caching to the PC and then streaming back to the NMT. I'll try it and see how it works.

whurlston
2011-11-18, 05:06 PM
Martin, I get the following error when attempting to pass a url in PlayVideoFile:

2011-11-18 12:01:59.531 [DEBUG][3] YouTube: Playing http://o-o.preferred.insight-sdf1.v15.lscache7.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=912206%2C914055%2C900504%2C911305%2C911107&itag=45&ip=74.0.0.0&signature=AEC7FFF56673DFE639D7C3EADC21E02E1F1C4987 .96E7B1652347F6382E5FD9CD6167554A1776FA08&sver=3&ratebypass=yes&source=youtube&expire=1321660800&key=yt1&ipbits=8&cp=U0hRRlZRTl9FSkNOMV9OS1JJOkFMSlhNbVh4a2NV&id=2d48e7dd1a6470a6&quality=hd720&fallback_host=tc.v15.cache7.c.youtube.com&type=video/webm;
2011-11-18 12:01:59.531 [ERROR][3] System.ArgumentException: String cannot be of zero length.
Parameter name: oldValue
at System.String.Replace(String oldValue, String newValue)
at NextPVR.Players.VideoPlayer.PlayFiles(List`1 playQueue, Int32 playQueueIndex, String& reason)
at NextPVR.Players.VideoPlayer.PlayFile(String filename, String& reason)
at NextPVR.MVP.MVPServerForm.PlayVideoFile(String filename)
at NextPVR.YouTubePlugin.ActivateItem(ListObject selectedObject) in F:\Projects\NextPVR\YouTube\YouTube\Plugin.cs:line 184
at NUtility.Controls.ListRenderers.UiListList.OnKeyDo wn(KeyEventArgs e)
at NUtility.Controls.UiList.OnKeyDown(KeyEventArgs e)
at NUtility.Base.NewStyleButtonListPlugin.OnKeyDown(K eyEventArgs e)
at NextPVR.MVP.MVPServerForm.ControlThread()


Going to attempt without buffering updates.

mvallevand
2011-11-18, 05:50 PM
I'm not sure I just tried a similar URL in a plugin and it plays fine on the PC



2011-11-18 13:28:12.844 [DEBUG][1] Playing video file: http://o-o.preferred.rogers-yyz1.v8.lscache3.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=909340&itag=37&ip=174.0.0.0&signature=6AC6E99264C8675E73F0669169EBFAE216A7ABDA .56DF43A0A627F3B60C5DCFAE0101ED842BF648FF&sver=3&ratebypass=yes&source=youtube&expire=1321653600&key=yt1&ipbits=8&cp=U0hRRlZQUV9FSkNOMV9OSlVHOldaVkh0MW5pM19v&id=2fda0ffc2291517e&ptchn=LadyGagaVEVO&ptk=vevo


What video is that? It's hard to test because the ISP's have their localized youtube cache.

The PCH won't be able to play that file even if it is cached, if it falls back to video/webm Also that URL has another problem because they are longer than the Hauppauge protocol allows for sending to an NMT.

Martin

whurlston
2011-11-18, 05:51 PM
Ok, no luck on getting playback working on the NMT. The only way I could get it to not crash NextPVR was to wait fpr the download to complete before playing. Even then, it just returned to NextPVR without displaying the video. I even tested playing a file directly from a share and that didn't work either. Apparently my A-100 can't handle the high quality mp4?

Edit: posted before I saw yours about the video/webm. Most of the files I'm coming across are using webm. (I thought it was just an MP4 but I see now that it's not.) I guess we will need to transcode those.

I'm not sure which video that was. It might have been Katie Perry. I just selected one from the list.

mvallevand
2011-11-18, 06:12 PM
All the Katie Perry videos run fine on my PC without that error. You should be able to tell if a URL will play on the NMT by playing it via telnet

(exit NPVR to the NMT menu and then run)

killall gaya
mono -nogui -dram 1 "URL"

Martin

whurlston
2011-11-18, 07:26 PM
They play fine on the PC as long as I saved them with an mp4 extention and you have the proper codecs (all I have are LAV and Cyberlink and it works). I can successfully remux (no transcoding) them to mp4 using ffmpeg and then they play on the PCH. The remux is almost instant so that's not an issue. The only downside is that I have to wait for the full file to download.

I might have sub just add the ".webm" extension to the video list for PCs rather than naming them wrong though.

mvallevand
2011-11-18, 07:43 PM
I meant I sent the URL to PlayVideo() on the PC, there was not trace error, and it streamed fine. There was no buffer delay either, so I guess this would be preferred for me on the PC.

Martin

whurlston
2011-11-18, 08:02 PM
Really?? I tried that and it didn't work for me. That's what I originally wanted to do. I'll check it again.

whurlston
2011-11-18, 08:29 PM
Can you connect to the graph and tell me what filters you are using when playing the url?

mvallevand
2011-11-18, 08:46 PM
I don't know how, but does this help? http playback does need either the LAV or Haali splitter (the http is truncated by NPVR on the filter list)



2011-11-18 13:28:12.844 [DEBUG][1] Playing video file: http://o-o.preferred.rogers-yyz1.v8.lscache3.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=909340&itag=37&ip=174.0.0.0&signature=6AC6E99264C8675E73F0669169EBFAE216A7ABDA .56DF43A0A627F3B60C5DCFAE0101ED842BF648FF&sver=3&ratebypass=yes&source=youtube&expire=1321653600&key=yt1&ipbits=8&cp=U0hRRlZQUV9FSkNOMV9OSlVHOldaVkh0MW5pM19v&id=2fda0ffc2291517e&ptchn=LadyGagaVEVO&ptk=vevo
2011-11-18 13:28:12.943 [DEBUG][1] Adding EVR renderer
2011-11-18 13:28:15.848 [DEBUG][1] setting 'auto' aspect ratio
2011-11-18 13:28:15.861 [DEBUG][1] Source Aspect Ratio: 16x9
2011-11-18 13:28:15.862 [DEBUG][1] Setting display rect: 0.000000,0.049247,1.000000,0.950753
2011-11-18 13:28:16.560 [DEBUG][1] Graph filter list:
2011-11-18 13:28:16.561 [DEBUG][1] - Default DirectSound Device
2011-11-18 13:28:16.561 [DEBUG][1] - EVR Renderer
2011-11-18 13:28:16.561 [DEBUG][1] - ffdshow Audio Decoder
2011-11-18 13:28:16.561 [DEBUG][1] - ffdshow Video Decoder
2011-11-18 13:28:16.561 [DEBUG][1] - LAV Splitter
2011-11-18 13:28:16.561 [DEBUG][1] - http://o-o.preferred.rogers-yyz1.v8.lscache3.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cra
2011-11-18 13:28:16.568 [DEBUG][1] Source Aspect Ratio: 16x9
2011-11-18 13:28:16.568 [DEBUG][1] Setting display rect: 0.000000,0.049247,1.000000,0.950753


Pick a YouTube video and tell me the res. if you want to see the same file.

Martin

whurlston
2011-11-18, 09:52 PM
That looks like mine when I play from the drive. My source filter is the standard "FileSource (ASync)". I can manually create a graph with graphstudio if I use "Render URL" and it works but NextPVR will just not do it for me. I'll create a build later tonight that streams directly from the web and see if I'm the only one experiencing the issue.

All the Katie Perry videos are actually MP4. The Safe House trailer is Webm and it's 1920x1080

mvallevand
2011-11-19, 12:08 AM
WHurlston, I was trying to use a URL shortener to see if that would would overcome the NPVR URL length limitation to the NMT and I do get the same error as you do. I now vaguely remember asking sub if the "page" specified in the URL had to have an extension, because of errors on certain URL in UPnP. It might have been this error. It doesn't explain why my other URL works, but I'm guessing sub needs to look at it.

Martin

whurlston
2011-11-19, 12:33 AM
Ok, as long as I'm not going crazy. :D

ShiningDragon
2011-11-19, 12:41 AM
Wow, really nice plugin and a good picture quality (google tv components?) ^^

In case of buffer files: if i watch again the same movie, then the plugin redownloads all again. Perhaps you could use the unique youtube-"names" ( like this: http://www.youtube.com/watch?v= yVNVOfjxoI8 &feature=topvideos_music ) for the downloaded videos (lookup before downloading, naming, buffering), so that those buffer files could be reused.
Perhaps as an additional exchange between "delete bufferfile after watch" "delete bufferfile before NextPVR starts" "let bufferfile stay there".

But yes, i like this plugin. More remotecontrolfriendly then youtube.com/xl ! Keep up the good work. ;)

whurlston
2011-11-19, 12:58 AM
Yeah, I'm already using the naming structure you suggested because I do plan on adding support for playing already cached files. I just wanted to get the basic plugin posted.

whurlston
2011-11-19, 01:06 AM
On a whim, I tried adding "&file=null.mp4" to the end of the URL and it allows me to stream to the PC using PlayVideoFile(url). Unfortunately, we can't add that to the end of a shortened URL or the redirect fails. It's actually amazing how much overhead the website uses. Streaming a 1080p video, the buffering finished before half the video had played.

UncleJohnsBand
2011-11-19, 01:07 AM
I only use NPVR via NMT so I need to wait.... :( But this sounds really cool and I am looking forward to being able to use it. :)

whurlston
2011-11-19, 01:12 AM
Until we get the long url issue sorted out, I can cache the files to disc and play them from there. The only issue will be webm files. They will need to be transcoded to play on the NMT.

UncleJohnsBand
2011-11-19, 01:29 AM
Until we get the long url issue sorted out, I can cache the files to disc and play them from there. The only issue will be webm files. They will need to be transcoded to play on the NMT.

So I can load the build and it will work except for webm based videos?

whurlston
2011-11-19, 01:45 AM
The currently posted build won't work on the NMT but I'll have one for you within the hour that will work with everything but webm.

UncleJohnsBand
2011-11-19, 03:41 AM
The currently posted build won't work on the NMT but I'll have one for you within the hour that will work with everything but webm.

Thanks....let us know when it is posted.....

whurlston
2011-11-19, 03:46 AM
I just updated the first post with the build. It took a little longer than anticipated.

mvallevand
2011-11-19, 06:04 AM
Here is an update to whurlston's YouTube plugin that will send YouTube URLs to the NMT for playback without buffering. A change to mvpmcx2 is also included because we had to work around some limitation in NPVR that will hopefully be addressed in the a future NPVR release by sub. These mp4 videos are great quality, but you will need a good internet feed. These HD feeds are converted to SD by the NMT if you are still using a CRT.

On of these workarounds involved sending the YouTube URL to tinyurl for shortening. If you don't know about URL shortening you might want to read this comment http://en.wikipedia.org/wiki/URL_shortening#Criticism_and_problems

Martin

UncleJohnsBand
2011-11-19, 02:34 PM
got it loaded up including the above patches....trying katy perry - the one that got away and it comes in spurts... plays a few seconds...paused....then plays a few then pauses....

UncleJohnsBand
2011-11-19, 02:42 PM
Reverted to just buffering version and it seems to be running well on the NMT.

I did leave the new mvpmcx2 in place....

UncleJohnsBand
2011-11-19, 02:50 PM
The mp4 videos are excellent quality.... :)

mvallevand
2011-11-19, 02:50 PM
got it loaded up including the above patches....trying katy perry - the one that got away and it comes in spurts... plays a few seconds...paused....then plays a few then pauses....

That would be your ISP or home network bandwidth, it plays fine here.

Martin

UncleJohnsBand
2011-11-19, 03:01 PM
hmmm.....40mb ISP (Verizon FIOS)......native media server portal things on NMT stream in fine......

whurlston
2011-11-19, 03:12 PM
You should be able to pause it to let it buffer for a bit. Now that we've got it actually working, I can add settings for quality, etc.

The mp4 videos are excellent quality.... :)Yes they are! I was highly impressed. The webm is also excellent.

UncleJohnsBand
2011-11-19, 03:14 PM
You should be able to pause it to let it buffer for a bit. Now that we've got it actually working, I can add settings for quality, etc.

Ok....I'll give that a go and see if it works.....

UncleJohnsBand
2011-11-19, 03:19 PM
Ok....I'll give that a go and see if it works.....

Nope....tried pausing for 5, 10 and 15 seconds and still the same....plays for about 3 seconds...pauses for about 2 then plays for 3 then pauses.....

ACTCMS
2011-11-19, 03:22 PM
I seem to be missing an 'MP4FileLib.dll'

Alex

UncleJohnsBand
2011-11-19, 03:25 PM
I seem to be missing an 'MP4FileLib.dll'

Alex

Where is that supposed to go?

ACTCMS
2011-11-19, 03:30 PM
What I should have said...

When I select a Clip to play, I get a "This application has failed to start because MP4FileLib.dll was not found. Re-installing the application may fix the problem" error.

Alex

whurlston
2011-11-19, 03:37 PM
Nope....tried pausing for 5, 10 and 15 seconds and still the same....plays for about 3 seconds...pauses for about 2 then plays for 3 then pauses.....
I'll try to have a build for you soon that will allow you to choose a lower quality stream (720p instead of 1080p) to see if that helps.


What I should have said...

When I select a Clip to play, I get a "This application has failed to start because MP4FileLib.dll was not found. Re-installing the application may fix the problem" error.

AlexThat's not part of the plugin. It must be something to do with the decoders being used on your system. Zip and post the logs.

Does it happen if you select the Safe House trailer?

mvallevand
2011-11-19, 03:40 PM
You should be able to pause it to let it buffer for a bit. Now that we've got it actually working, I can add settings for quality, etc.
Yes they are! I was highly impressed. The webm is also excellent.

I've also noticed a lot of videos aren't picking up available mp4 streams. Safe House which you mark as webm has 8 streams including both medium and hd720 mp4 I can help with the parsing if you'd like.

Martin

whurlston
2011-11-19, 03:44 PM
Where are you finding the 8 streams?

ACTCMS
2011-11-19, 03:47 PM
Does it happen if you select the Safe House trailer?It still fails - GraphEdit couldn't create a graph from the URL either.

Alex

UncleJohnsBand
2011-11-19, 03:54 PM
Where does the large url come from? Does the URL need to be directly to the mp4 file? I see that the url (for katty perry video) is fairly short..... http://www.youtube.com/watch?v=Ahha3Cqe_fk& (pulled from my RSS reader).

whurlston
2011-11-19, 03:56 PM
@ACTCMS, Try installing the LAV filters: http://forum.doom9.org/showthread.php?t=156191 or Hoborg's SAF6

mvallevand
2011-11-19, 03:57 PM
Where are you finding the 8 streams?

In my redirect from the API result which is https://www.youtube.com/watch?v=oWzTOoOpFa8&feature=youtube_gdata there is a section <embed type="application/x-shockwave-flash" with a string flashvars=".." that has 8 streams urls in it.

Martin

whurlston
2011-11-19, 04:00 PM
Where does the large url come from? Does the URL need to be directly to the mp4 file? I see that the url (for katty perry video) is fairly short..... http://www.youtube.com/watch?v=Ahha3Cqe_fk& (pulled from my RSS reader).After you select a video, I basically use a webclient to get the source for that video's youtube page (the link you posted), then I parse it to get the link to the actual file. The link is too long to send to the NMT so for those, I have to create a tinyurl on the fly. Martin then converts that back to the long url and plays it.

UncleJohnsBand
2011-11-19, 04:00 PM
I tried playing on my PC and nothing happens...the menu flicks for a second:

Log Info:


2011-11-19 11:48:02.532 [DEBUG][1] YouTube: Playing http://o-o.preferred.iad09s10.v8.lscache1.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=908606%2C906424%2C913103&itag=37&ip=173.0.0.0&signature=3E241B9A42376D52FC5C63E0FA82A14DE0088A7F .030478BFA68163D3B30E048A8EA6A747EA0F7BB0&sver=3&ratebypass=yes&source=youtube&expire=1321743600&key=yt1&ipbits=8&cp=U0hRRldPUV9FSkNOMV9PSVVHOlZ6Z1YwbXdMMGRj&id=02185adc2a9efdf9&quality=hd1080&fallback_host=tc.v8.cache1.c.youtube.com&type=video/mp4
2011-11-19 11:48:02.533 [DEBUG][1] Playing video file: http://o-o.preferred.iad09s10.v8.lscache1.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=908606%2C906424%2C913103&itag=37&ip=173.0.0.0&signature=3E241B9A42376D52FC5C63E0FA82A14DE0088A7F .030478BFA68163D3B30E048A8EA6A747EA0F7BB0&sver=3&ratebypass=yes&source=youtube&expire=1321743600&key=yt1&ipbits=8&cp=U0hRRldPUV9FSkNOMV9PSVVHOlZ6Z1YwbXdMMGRj&id=02185adc2a9efdf9&quality=hd1080&fallback_host=tc.v8.cache1.c.youtube.com&type=video/mp4&file=null.mp4
2011-11-19 11:48:02.535 [DEBUG][1] Adding EVR renderer
2011-11-19 11:48:03.558 [DEBUG][1] restoring last aspect ratio
2011-11-19 11:48:03.559 [DEBUG][1] Graph filter list:
2011-11-19 11:48:03.559 [DEBUG][1] - Default DirectSound Device
2011-11-19 11:48:03.559 [DEBUG][1] - EVR Renderer
2011-11-19 11:48:03.613 [DEBUG][1] GetEventCode() returned: 0x000d
2011-11-19 11:48:03.613 [DEBUG][1] GetEventCode() returned: 0x0001
2011-11-19 11:48:03.613 [DEBUG][1] About to store playback position information
2011-11-19 11:48:03.613 [DEBUG][1] Stopping graph@1
2011-11-19 11:48:03.613 [DEBUG][1] Stopping graph@2
2011-11-19 11:48:03.613 [DEBUG][1] Stopping graph@3
2011-11-19 11:48:03.613 [DEBUG][1] Removing filter Default DirectSound Device
2011-11-19 11:48:03.614 [DEBUG][1] Removing filter EVR Renderer

UncleJohnsBand
2011-11-19, 04:04 PM
After you select a video, I basically use a webclient to get the source for that video's youtube page (the link you posted), then I parse it to get the link to the actual file. The link is too long to send to the NMT so for those, I have to create a tinyurl on the fly. Martin then converts that back to the long url and plays it.

Thanks.....I was curious about the process.

mvallevand
2011-11-19, 04:06 PM
I tried playing on my PC and nothing happens...the menu flicks for a second:

In Universe when I saw that after seeing "restoring last aspect ratio" installing the Haali splitter fixed the problem.

Martin

UncleJohnsBand
2011-11-19, 04:10 PM
In Universe when I saw that after seeing "restoring last aspect ratio" installing the Haali splitter fixed the problem.

Martin

Ok...that is just Greek to me.....what does that mean? :)

mvallevand
2011-11-19, 04:12 PM
Ok...that is just Greek to me.....what does that mean? :)

Here is a link http://www.videohelp.com/tools/Haali-Media-Splitter

Martin

UncleJohnsBand
2011-11-19, 04:12 PM
I have to jump off for a while.....going to early Thanksgiving dinner. I will catch up when I get back online tonight.

whurlston
2011-11-19, 04:14 PM
I tried playing on my PC and nothing happens...the menu flicks for a second:Looks like you need the LAV filters too (or any MP4 demux
)

whurlston
2011-11-19, 04:16 PM
Martin, I found the additional streams but my son just woke up. I'll get it fixed as soon as I can. Great catch!

ACTCMS
2011-11-19, 04:57 PM
@ACTCMS, Try installing the LAV filters: http://forum.doom9.org/showthread.php?t=156191 or Hoborg's SAF6OK - I installed the LAV filters from your link and it's now playing MP4s and WEBMs fine.

I'll try it out on the NMT shortly.

Alex

ACTCMS
2011-11-19, 05:26 PM
got it loaded up including the above patches....trying katy perry - the one that got away and it comes in spurts... plays a few seconds...paused....then plays a few then pauses....Just to let you know that you are not alone UJB, I get the same symptoms on the NMT... pausing for 10 seconds or so doesn't help either.

LAN is 100Mbps wired and router claims that download speed is 5,120 Kbps.

Alex

ACTCMS
2011-11-19, 06:02 PM
Not directly related but in order to play some of my old mpg recordings, I've been running with
<ForceMpgGraph>true</ForceMpgGraph>
Having done what I needed to get YouTube running on the PC, I've had to change <ForceMpgGraph> to true in order to watch these recordings.

Alex

mvallevand
2011-11-19, 07:23 PM
Alex you said the same thing twice. I recommend the Haali splitter for mpg false.

Martin

ACTCMS
2011-11-19, 07:37 PM
Having done what I needed to get YouTube running on the PC, I've had to change <ForceMpgGraph> to true in order to watch these recordings.

Alex


Alex you said the same thing twice. I recommend the Haali splitter for mpg false.

MartinOld age doesn't come alone Martin - you are correct of course - I'm now using <ForceMpgGraph>false</ForceMpgGraph>

I didn't get around to installing Haali though - YouTube started to work when I installed LAV.

Alex

whurlston
2011-11-19, 07:47 PM
Either Haali or LAV will work.

Re: NMT playback. I'll add options to limit the NMT streams differently from the PC.

mvallevand
2011-11-19, 08:03 PM
Just to let you know that you are not alone UJB, I get the same symptoms on the NMT... pausing for 10 seconds or so doesn't help either.

I have now found a couple of 1080p streams that are like this for me.

Martin

whurlston
2011-11-20, 04:25 AM
I can't test this on the NMT right now but it should work:


Properly parses the available streams so that you can play videos that were previously identified as webm if an mp4 stream is also available ("Safe House - Trailer" for example).
Sets the default stream type for the PC to "webm" and locks the NMT to "mp4" (since it can't play flv or webm).
Sets the default stream quality to 1080p for the PC and 720p for the NMT (since it seems to have trouble with some 1080p content... 720p is still excellent quality even on a 110" screen IMO).
Allows you to press {CTRL}+S (STOP) to change the default stream type on the PC. Choices are WEBM, MP4 and FLV. This is not available on the NMT.
Allows you to press {CTRL}+K (RECORD) to change the preferred stream quality. Choices are 1080p, 720p, 480p, 360p and 240p. This is available on both the PC and the NMT.
If your preferred quality is not available, it will automatically play the next highest available quality (play 720p if it is available but the prefered 1080p is not).
Changing the defaults currently does not stick (yet) once you exit NextPVR. You will need to change them again if you close and restart NextPVR.


This doesn't currently check for stream types other than the selected default. Later builds will allow fallbacks (ie: play MP4 if WEBM is not available). Of course this will only be for the PC, not the NMT.

I don't have a standard MCE remote, so if the stop/record buttons don't work just post your logs and it will give me what I need to fix it.

This is the dll/pdb files only. You will need the skin/common files from the first post and also Martin's mvpmcx2 from http://forums.gbpvr.com/showthread.php?51118-YouTube-Plugin&p=424150#post424150

Once I have confirmation of this working, I will update the first post.

mvallevand
2011-11-20, 05:08 AM
I can't test this on the NMT right now but it should work:

Works great.


Properly parses the available streams so that you can play videos that were previously identified as webm if an mp4 stream is also available ("Safe House - Trailer" for example).


The NMT now see a LOT more choices, I haven't noticed any that I want to see that don't play.

Sets the default stream quality to 1080p for the PC and 720p for the NMT (since it seems to have trouble with some 1080p content... 720p is still excellent quality even on a 110" screen IMO).

Yes it defaults to 720p nicely. The stuttering video (Drake) works fine at 720p. I can still switch to 1080p and Katy Perry plays fine I guess I am lucky.


Allows you to press {CTRL}+K (RECORD) to change the preferred stream quality. Choices are 1080p, 720p, 480p, 360p and 240p. This is available on both the PC and the NMT.

Worked fine.


Changing the defaults currently does not stick (yet) once you exit NextPVR. You will need to change them again if you close and restart NextPVR.

The defaults are good.


This doesn't currently check for stream types other than the selected default. Later builds will allow fallbacks (ie: play MP4 if WEBM is not available). Of course this will only be for the PC, not the NMT.

The NMT does play .3gp if you come across them from the mobile streams.

I don't have a standard MCE remote, so if the stop/record buttons don't work just post your logs and it will give me what I need to fix it.


Once I have confirmation of this working, I will update the first post.

I think it is definitely ready.

Martin

whurlston
2011-11-20, 05:50 AM
Great! I'll package it up and update the first post tomorrow. I'm pretty beat.

If you do happen to come across a video that does not have an MP4 stream, according to Google, you should check back later because they will be available (they transcode all videos to all formats, only quality may be limited).

re 3gp streams: I actually get the links to those when I download the list. I don't need to parse the video page to get them. I've ignored them however they are all 176x144 rtsp:// streams and not worth including IMO. http://code.google.com/apis/youtube/2.0/reference.html#formatsp

Reddwarf
2011-11-20, 02:20 PM
Great plugin! It would be nice thou with a Search function :)

UncleJohnsBand
2011-11-20, 02:25 PM
Here is a link http://www.videohelp.com/tools/Haali-Media-Splitter

Martin

Thanks Martin....now able to play on the desktop!

UncleJohnsBand
2011-11-20, 02:27 PM
Great! I'll package it up and update the first post tomorrow. I'm pretty beat.

If you do happen to come across a video that does not have an MP4 stream, according to Google, you should check back later because they will be available (they transcode all videos to all formats, only quality may be limited).

re 3gp streams: I actually get the links to those when I download the list. I don't need to parse the video page to get them. I've ignored them however they are all 176x144 rtsp:// streams and not worth including IMO. http://code.google.com/apis/youtube/2.0/reference.html#formatsp

Make sure to put a note on the page with a date or something....or post here that it is updated. :)

ACTCMS
2011-11-20, 03:57 PM
I'm still seeing the play/pause problem on the NMT even if I go to 360p.

Strangely, as I reduce the quality setting for a particular stream (I'm using 'Adele - Rolling in the Deep' from Top Favorites') the play sections get longer, but the pauses get longer too.

The same stream plays perfectly on the PC which suggests to me that it's not a broadband throttling problem... maybe a LAN problem - duff cable or port?

Alex

mvallevand
2011-11-20, 04:26 PM
I'm still seeing the play/pause problem on the NMT even if I go to 360p.

Strangely, as I reduce the quality setting for a particular stream (I'm using 'Adele - Rolling in the Deep' from Top Favorites') the play sections get longer, but the pauses get longer too.

The same stream plays perfectly on the PC which suggests to me that it's not a broadband throttling problem... maybe a LAN problem - duff cable or port?

Alex

I couldn't find it in Top Favourites but it was in Top Rated. I selected 360p and whurlston selected a 480i stream that plays fine here, it was even PAL. I can't see it being a port problem because a 480i MP4 stream is a lot less bandwidth than anything you record in NPVR.

At 1080p I did have one glitch 720p was fine.

If you are curious you can load mvpmc2 by telnet. If there is a buffering problem you will see a break in the "Internet Source Detected..." output that is written to the screen. In telnet you can also get the URL used by typing cat /tmp/connect.log If it isn't ISP specific, I can try it here.

Martin

UncleJohnsBand
2011-11-20, 04:44 PM
I'm still seeing the play/pause problem on the NMT even if I go to 360p.

Strangely, as I reduce the quality setting for a particular stream (I'm using 'Adele - Rolling in the Deep' from Top Favorites') the play sections get longer, but the pauses get longer too.

The same stream plays perfectly on the PC which suggests to me that it's not a broadband throttling problem... maybe a LAN problem - duff cable or port?

Alex

I am still seeing the same as well.....

UncleJohnsBand
2011-11-20, 04:45 PM
If you are curious you can load mvpmc2 by telnet. If there is a buffering problem you will see a break in the "Internet Source Detected..." output that is written to the screen. In telnet you can also get the URL used by typing cat /tmp/connect.log If it isn't ISP specific, I can try it here.

Martin

What is the process for starting from NMT? I have putty....

mvallevand
2011-11-20, 04:51 PM
What is the process for starting from NMT? I have putty....

1. Exit from NPVR to the main menu with the power button
2. From your PC telnet to your NMT
3. Stop the NMT software
killall gaya

4. Run either
gaya
or go right to NPVR
/etc/mvpmcx2

5. Capture output in putty for debugging if you'd like

While playing for me it looks like this over and over



Internet Source Detected...
Internet Source Detected...
Internet Source Detected...
Internet Source Detected...
Internet Source Detected...
Internet Source Detected...
Internet Source Detected...


Martin

ACTCMS
2011-11-20, 04:59 PM
If you are curious you can load mvpmc2 by telnet. If there is a buffering problem you will see a break in the "Internet Source Detected..." output that is written to the screen. In telnet you can also get the URL used by typing cat /tmp/connect.log If it isn't ISP specific, I can try it here.

MartinAh... telnet - a bit of a black art to me Martin. I do have PuTTY installed though and I copied the output from cat /tmp/connect.log to the attached.

I don't suppose you could point me at instructions for loading mvpmc2 by telnet (I run from a USB stick BTW).

I've been using the Laptop to serve the NMT for testing YouTube - it's been getting a bit sluggish recently, so this evening I'm going to install the plugin on another server and try it from there.

Alex

mvallevand
2011-11-20, 05:33 PM
My instructions where wrong it should be /etc/mvpmc/mvpmcx2 but they should work from USB or a share.

YouTube is streamed directly from YouTube, so a slow laptop shouldn't really matter.

Martin

whurlston
2011-11-20, 05:49 PM
I'm still seeing the play/pause problem on the NMT even if I go to 360p.

Strangely, as I reduce the quality setting for a particular stream (I'm using 'Adele - Rolling in the Deep' from Top Favorites') the play sections get longer, but the pauses get longer too.

The same stream plays perfectly on the PC which suggests to me that it's not a broadband throttling problem... maybe a LAN problem - duff cable or port?

Alex


I am still seeing the same as well.....Zip and attach your logs after reproducing the problem. I want to double check the stream that was selected.

whurlston
2011-11-20, 05:52 PM
I selected 360p and whurlston selected a 480i stream that plays fine here, it was even PAL.In case anyone is curious as to why 480i was selected, the options are technically hd1080, hd720, large, medium and small. I just used 480p, 360p and 240p because that is the majority of videos for the non HD streams. I just wanted consistency in the naming. 480i still uses slightly less bandwidth than 360p

mvallevand
2011-11-20, 06:01 PM
Zip and attach your logs after reproducing the problem. I want to double check the stream that was selected.

The file from the NMT that ACTCMS sent was the same 480i file I used, I can tell by the file size. Content-Length: 17117918

Martin

whurlston
2011-11-20, 06:44 PM
ACTCMS, you can place that url in your browser and it will attempt to download the file. Save it in your videos folder as an mp4 file and see if your NMT will play it from there.

whurlston
2011-11-20, 09:02 PM
Great plugin! It would be nice thou with a Search function :)I plan on adding a search function.

On another note: Is there anyone that watches purchased movies from Youtube?

UncleJohnsBand
2011-11-20, 09:34 PM
Zip and attach your logs after reproducing the problem. I want to double check the stream that was selected.

Attached....

whurlston
2011-11-20, 09:40 PM
According to that log, there were three attempts to play the 720p stream. Did you change from the default? Remember that the setting doesn't stick between sessions.

UncleJohnsBand
2011-11-20, 09:44 PM
ACTCMS, you can place that url in your browser and it will attempt to download the file. Save it in your videos folder as an mp4 file and see if your NMT will play it from there.

I did this and it played fine.

When using chrome it plays the video when the url is entered.....but I can see that the buffer comes in chunky but the point of play always has enough of a buffer to not get to the point of not having any data......

ACTCMS
2011-11-20, 09:45 PM
Apologies for the delay - I'm not only Mrs ACTCMS' personal IT Support Team, I'm also her Chief Cook and Bottle Washer so I had to break off to prepare and eat dinner :)

5. Capture output in putty for debugging if you'd like

MartinUsing telnet, I started NPVR and played the Adele stream from YouTube - it paused three times - putty log attached.


ACTCMS, you can place that url in your browser and it will attempt to download the file. Save it in your videos folder as an mp4 file and see if your NMT will play it from there.I downloaded the URL and it plays fine through Videos.

Alex

UncleJohnsBand
2011-11-20, 09:46 PM
According to that log, there were three attempts to play the 720p stream. Did you change from the default? Remember that the setting doesn't stick between sessions.

Nope....simply clicked on the file from the plugin and let it play....I think the three attempts you are seeing is the chunking I am seeing in playback....I never hit stop or pause...just let it run and let it chunk 3 times and then stopped it and sent the log.

mvallevand
2011-11-20, 09:52 PM
Nope....simply clicked on the file from the plugin and let it play....I think the three attempts you are seeing is the chunking I am seeing in playback....I never hit stop or pause...just let it run and let it chunk 3 times and then stopped it and sent the log.

No there is just one attempt. The stuttering is everytime you see

"[####] need to buffer! [####] sample size is : #### duration is : #### filesize is : ######"

Which looks to be every 10 seconds. Is your network full duplex? There is a 10 second heartbeat to the NMT server that should show like clockwork in your MVP.log file as

2011-11-20 17:41:01.532 [DEBUG][3] MVP data read: 1 (8)

Martin

Reddwarf
2011-11-20, 09:56 PM
I plan on adding a search function.

On another note: Is there anyone that watches purchased movies from Youtube?Good. I didn't even know that it was possible to purchase a video from youtube...

UncleJohnsBand
2011-11-20, 10:01 PM
No there is just one attempt. The stuttering is everytime you see

"[####] need to buffer! [####] sample size is : #### duration is : #### filesize is : ######"

Which looks to be every 10 seconds. Is your network full duplex? There is a 10 second heartbeat to the NMT server that should show like clockwork in your MVP.log file as

2011-11-20 17:41:01.532 [DEBUG][3] MVP data read: 1 (8)

Martin

Here is the mvp log.....I restarted the npvr service and then played the video via the plugin letting it chunk 3 times.....

mvallevand
2011-11-20, 10:01 PM
22 bytes?

Martin

UncleJohnsBand
2011-11-20, 10:03 PM
I see in the mvp log there were 3 incremental NMT screen updates sent to the NMT.... coincidence on chunking 3 times?

UncleJohnsBand
2011-11-20, 10:07 PM
22 bytes?

Martin

??? not sure what you are looking/asking for here....

mvallevand
2011-11-20, 10:08 PM
Using telnet, I started NPVR and played the Adele stream from YouTube - it paused three times - putty log attached.

Yes I see the stutter every minute in those. It doesn't seem random either, which is what I would expect if it was from the stream itself. Are you running the latest NMT firmware?

Martin

mvallevand
2011-11-20, 10:08 PM
??? not sure what you are looking/asking for here....

The zip file was empty.


I see in the mvp log there were 3 incremental NMT screen updates sent to the NMT.... coincidence on chunking 3 times?It shouldn't be updating during playback.

Martin

UncleJohnsBand
2011-11-20, 10:13 PM
The zip file was empty.

It shouldn't be updating during playback.

Martin

Attached...it was open when I tried to zip it.

ACTCMS
2011-11-20, 10:18 PM
Are you running the latest NMT firmware?

MartinProbably not - when I got it I upgraded to the then recommended firmware (01-17-090116-15-POP-402-000) and haven't looked at it since...

Alex

UncleJohnsBand
2011-11-20, 10:21 PM
Anyone know if the cache highlighted below is configurable?......wondering if that could be increased to 10 or 15 to see if that changes anything....



mono.c: 3323 ... open_path: [http://o-o.preferred.iad09g05.v13.lscache5.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=906717%2C902400%2C912600&itag=22&ip=173.0.0.0&signature=4F7AC928BF25EB1021E12A5B1EC350067E7AF3FD .811C2415EAC42EC47BD310BD494B757216CD68A7&sver=3&ratebypass=yes&source=youtube&expire=1321851600&key=yt1&ipbits=8&cp=U0hRRlhQT19FSkNOMV9QSlNHOjhWYWJiMTlPZV9n&id=02185adc2a9efdf9&quality=hd720&fallback_host=tc.v13.cache5.c.youtube.com&type=video/mp4]

mvallevand
2011-11-20, 10:29 PM
Attached...it was open when I tried to zip it.

The heartbeat looks excellent (<10ms variance) so nothing on the NPVR side looks like it is blocking.


2011-11-20 17:47:49.959 [DEBUG][3] MVP data read: 1 (8)
2011-11-20 17:47:59.964 [DEBUG][3] MVP data read: 1 (8)
2011-11-20 17:48:09.970 [DEBUG][3] MVP data read: 1 (8)
2011-11-20 17:48:19.978 [DEBUG][3] MVP data read: 1 (8)
2011-11-20 17:48:29.985 [DEBUG][3] MVP data read: 1 (8)
2011-11-20 17:48:39.990 [DEBUG][3] MVP data read: 1 (8)


Martin

UncleJohnsBand
2011-11-20, 10:34 PM
Martin....what does your tracert look like to youtube.com......mine is below....



Tracing route to youtube.com [72.14.204.136]
over a maximum of 30 hops:

1 2 ms 1 ms 1 ms Wireless_Broadband_Router.home [192.168.1.1]
2 3 ms 3 ms 3 ms L100.HRBGPA-VFTTP-13.verizon-gni.net [98.111.124.1]
3 4 ms 5 ms 5 ms G9-0-5-213.HRBGPA-LCR-02.verizon-gni.net [130.81.139.128]
4 17 ms 18 ms 17 ms so-12-1-0-0.RES-BB-RTR2.verizon-gni.net [130.81.28.254]
5 17 ms 20 ms 18 ms 0.so-6-0-3.XL4.IAD8.ALTER.NET [152.63.36.237]
6 22 ms 23 ms 17 ms TenGigE0-7-0-0.GW7.IAD8.ALTER.NET [152.63.32.198]
7 76 ms * 82 ms google-gw.customer.alter.net [152.179.50.62]
8 21 ms 20 ms * 216.239.46.248
9 20 ms 19 ms 18 ms 66.249.94.54
10 * 19 ms * iad04s01-in-f136.1e100.net [72.14.204.136]
11 19 ms 19 ms 19 ms iad04s01-in-f136.1e100.net [72.14.204.136]

Trace complete.

mvallevand
2011-11-20, 10:37 PM
Anyone know if the cache highlighted below is configurable?......wondering if that could be increased to 10 or 15 to see if that changes anything....


That's a youtube cache. From the NMT.log file you sent earlier, you already have a pretty code sized cache on the NMT side which I can control.

mono.c: 3696 ... [mono] app_params.play_opt->prebuf_max: 16777216

I tried doubling it yesterday and it didn't help with the 1080p problem. I think the issue is in in mono (the Syabas player) and http streaming of mp4.

Martin

mvallevand
2011-11-20, 10:55 PM
Martin....what does your tracert look like to youtube.com......mine is below....



from the NMT (using a modified busybox)
busybox traceroute youtube.com
traceroute: warning: youtube.com has multiple addresses; using 74.125.226.45
traceroute to youtube.com (74.125.226.45), 30 hops max, 38 byte packets
1 7.26.36.1 (7.26.36.1) 17.346 ms 7.327 ms 8.515 ms
2 67.231.222.29 (67.231.222.29) 17.822 ms 11.362 ms 11.774 ms
3 so-4-1-0.gw02.ym.phub.net.cable.rogers.com (66.185.83.198) 16.139 ms 15.840 ms 16.385 ms
4 69.63.251.146 (69.63.251.146) 16.229 ms 15.583 ms 14.209 ms
5 72.14.216.14 (72.14.216.14) 15.599 ms 14.956 ms 15.722 ms
6 216.239.47.114 (216.239.47.114) 16.352 ms 14.931 ms 14.520 ms
7 64.233.175.132 (64.233.175.132) 15.866 ms 15.085 ms 14.187 ms
8 yyz06s06-in-f13.1e100.net (74.125.226.45) 13.904 ms 16.513 ms 14.035 ms

and on the PC

Tracing route to youtube.com [74.125.226.36]
over a maximum of 30 hops:

1 8 ms 7 ms 7 ms 7.26.36.1
2 26 ms 11 ms 8 ms 67.231.222.37
3 17 ms 14 ms 15 ms so-4-1-0.gw02.ym.phub.net.cable.rogers.com [66.185.83.198]
4 13 ms 14 ms 15 ms gw01.mtmc.phub.net.cable.rogers.com [66.185.81.137]
5 * * * Request timed out.
6 16 ms 15 ms 19 ms 216.239.47.114
7 15 ms 14 ms 26 ms 64.233.175.132
8 17 ms 14 ms 15 ms yyz06s06-in-f4.1e100.net [74.125.226.36]

Trace complete.



Martin

UncleJohnsBand
2011-11-20, 11:32 PM
Your stats look alot better than mine.....probably why you are getting better results....

I wonder if I hook the NMT to the WAN router if that would improve anything....currently the WAN router connects to an 8 port gb switch which connects the NMT and the NPVR server and NAS and uplinks to another 8 port GB switch

mvallevand
2011-11-21, 12:34 AM
I did a quick search for FIOS and google-gw.customer.alter.net and there are lots of complaints about slow youtube. Someone suggested using an alternate DNS to see if it changes your route. For comparison I use OpenDNS (208.67.222.222 & 208.67.220.220) but Google's is pretty easy to remember 8.8.8.8

Martin

UncleJohnsBand
2011-11-21, 12:55 AM
I did a quick search for FIOS and google-gw.customer.alter.net and there are lots of complaints about slow youtube. Someone suggested using an alternate DNS to see if it changes your route. For comparison I use OpenDNS (208.67.222.222 & 208.67.220.220) but Google's is pretty easy to remember 8.8.8.8

Martin

I use opendns now.....never new google offered a dns service. :)

ACTCMS
2011-11-21, 01:31 AM
It looks like I'm just on the edge of the known universe...
Tracing route to youtube.com [74.125.230.139]
over a maximum of 30 hops:

1 <1 ms <1 ms <1 ms sbs2003.tippitt.local [192.168.16.2]
2 29 ms 99 ms 99 ms BThomehub.home [192.168.1.254]
3 32 ms 32 ms 30 ms 217.47.95.122
4 30 ms 31 ms 30 ms 217.47.207.161
5 39 ms 38 ms 39 ms 213.1.69.74
6 38 ms 39 ms 38 ms 213.120.157.26
7 39 ms 39 ms 39 ms 213.120.157.178
8 39 ms 38 ms 39 ms acc1-10GigE-10-2-0.mr.21cn-ipp.bt.net [109.159.250.74]
9 47 ms 47 ms 47 ms core1-te0-4-0-0.ealing.ukcore.bt.net [109.159.250.1]
10 45 ms 45 ms 45 ms peer1-xe2-0-0.telehouse.ukcore.bt.net [109.159.254.100]
11 46 ms 46 ms 45 ms 195.99.126.111
12 91 ms 46 ms 45 ms 66.249.94.78
13 46 ms 46 ms 46 ms 209.85.251.58
14 46 ms 46 ms 45 ms lhr14s02-in-f11.1e100.net [74.125.230.139]

Trace complete.Alex

UncleJohnsBand
2011-11-21, 01:38 AM
I did a quick search for FIOS and google-gw.customer.alter.net and there are lots of complaints about slow youtube. Someone suggested using an alternate DNS to see if it changes your route. For comparison I use OpenDNS (208.67.222.222 & 208.67.220.220) but Google's is pretty easy to remember 8.8.8.8

Martin


I use opendns now.....never new google offered a dns service. :)

Tried Google DNS.....picked up 3 more hops than I already had and no difference..... went back to openDNS

mvallevand
2011-11-21, 02:54 AM
Are you changing the DNS on your NMT? You find it with the command

cat /etc/resolv.conf

Martin

UncleJohnsBand
2011-11-21, 03:25 AM
Are you changing the DNS on your NMT? You find it with the command

cat /etc/resolv.conf

Martin

I assume I use telnet to get to the box and go to that location? what do I edit it with? Need step by step for this....

mvallevand
2011-11-21, 03:28 AM
Yes telnet and the command is cat (*nix command that is like "type")

cat /etc/resolv.conf

Martin

UncleJohnsBand
2011-11-22, 12:37 AM
Yes telnet and the command is cat (*nix command that is like "type")

cat /etc/resolv.conf

Martin

I don't think I need to change anything here......when I changed my dns server I changed it on the router not an individual PC so since the NMT is pointing to the router it would have been using the Google DNS server.




/ # cat /etc/resolv.conf
search home
nameserver 192.168.1.1
nameserver 208.67.222.222
/ #


I have continued the search on FIOS and slow youtube and there are threads out there that point to Verizon packet shaping traffic and that there are noticeable issues with youtube.

Perhaps and enhacement (not sure if possible) would to be able to config for no-cache or cache x seconds where user can plug in the x and the the video would cache for that long on the server and then pass the server url to the NMT to play the cached file?

whurlston
2011-11-22, 01:26 AM
I have continued the search on FIOS and slow youtube and there are threads out there that point to Verizon packet shaping traffic and that there are noticeable issues with youtube.I was afraid of that. I tried to stream the video via https so that it would not be affected by traffic shaping (an old Netflix trick) but Google will not serve them from a secure server.


Perhaps and enhacement (not sure if possible) would to be able to config for no-cache or cache x seconds where user can plug in the x and the the video would cache for that long on the server and then pass the server url to the NMT to play the cached file?The reason I haven't implemented this is because I have been unsuccessful in getting the NMT to play an MP4 file that is still growing. This means that you have to wait for the entire video to download. I was holding out hope that we could find another resolution but that seems unlikely at this point.

mvallevand
2011-11-22, 01:35 AM
The reason I haven't implemented this is because I have been unsuccessful in getting the NMT to play an MP4 file that is still growing. This means that you have to wait for the entire video to download. I was holding out hope that we could find another resolution but that seems unlikely at this point.

This problem is likely because of how NPVR web server responds to the request for the growing file. I have done some testing and the NMT can stream a 'live" mp4 from YouTube via SMB right after it starts getting saved to disk. One option could be to write the temp file to the "mvpmc" share which users who aren't using USB might have.

Martin

whurlston
2011-11-22, 01:38 AM
I could try that. It may be a day or two before I can have it up though. I'm just exhausted tonight.

On another note: I've almost got the settings screens completed.

UncleJohnsBand
2011-11-26, 01:05 AM
This problem is likely because of how NPVR web server responds to the request for the growing file. I have done some testing and the NMT can stream a 'live" mp4 from YouTube via SMB right after it starts getting saved to disk. One option could be to write the temp file to the "mvpmc" share which users who aren't using USB might have.

Martin


I could try that. It may be a day or two before I can have it up though. I'm just exhausted tonight.

On another note: I've almost got the settings screens completed.

Checking back to see if there has been any progress on the cache ability using the mvpmc share that Martin mentioned......

mvallevand
2011-11-26, 01:59 AM
I think whurlston was looking into writing a caching proxy aspx page rather than using the mvpmc share. The plugin is working pefectly well for me on the NMT though, I hope this can happen.

Search will be nice.

Martin

ACTCMS
2011-11-26, 02:22 AM
I think whurlston was looking into writing a caching proxy aspx page rather than using the mvpmc share. The plugin is working pefectly well for me on the NMT though, I hope this can happen.

Search will be nice.

MartinI'm hoping that might be good news for me since I'm a USBer...

It's working great for me on the PC except for finding stuff, so +1 for search...

Alex

mvallevand
2011-11-26, 03:31 AM
I'm hoping that might be good news for me since I'm a USBer...

Even if whurlston can't get the proxy working, USB users won't be excluded, there can be other shares involved, perhaps off the DataDirectory which is designated to be shared with PC clients.

Martin

whurlston
2011-11-26, 04:09 AM
I'm going to get it working for everyone. I'm just finishing up the settings first (amidst all the family get-togethers this weekend).

re NMT: I will be adding a "Record" feature (and you can specify the record folder) and NMT users that are having trouble with streaming can set it to "Always record" for the NMT. The proxy aspx will then be used for playback (we can attempt all the various methods with this to find the best option: share/http stream). NMT users not experiencing streaming issues can continue to use the current direct stream method if they prefer.

re Search: It's somewhat implemented (in my current development code). I say "somewhat" because you can create a list of "feeds" using pre-defined search phrases that you create in the settings page. This is an interim solution until I can implement a true dynamic search (and by implement, I mean get help :D). You can also create a list of authors to quickly list their videos. I'll also be adding a playlist feature.

The example search in the picture would show up in your list selection as "Funny cats in water" (like "Most Popular" does now) and would search for videos as if you typed the following into the youtube website search box:

"funny cats" water

mvallevand
2011-11-26, 04:50 AM
That looks great, since you are doing it in config (which I hoped), It would be nice to see fixed URL's like the following.

http://gdata.youtube.com/feeds/api/users/username/uploads?v=2
http://gdata.youtube.com/feeds/api/users/username/subscriptions?v=2

In lieu of a trailer plugin (which I've been contemplating based on www.hd-trailers.net) I'd add username trailer http://gdata.youtube.com/feeds/api/users/trailers/uploads?v=2&max-results=50

Martin

whurlston
2011-11-26, 09:55 AM
I do plan on adding the user specific feeds once we sort out the nmt playback. Thanks for reminding me about the trailers. I wanted to add them for the next release.

whurlston
2011-11-26, 02:32 PM
It would be nice to see fixed URL's like the following.

http://gdata.youtube.com/feeds/api/users/username/uploads?v=2
http://gdata.youtube.com/feeds/api/users/username/subscriptions?v=2
I misunderstood what you wanted here. The first link is what you will get with the "Authors" list. I just request it differently. I can add subscriptions as well.

UncleJohnsBand
2011-11-26, 03:09 PM
Great! Seems like things are coming together.

ViperDragon
2011-11-26, 03:51 PM
Nice addition to nPVR! Haven't had much time to play with it, but I like what I see. Looking forward to the updates. Keep up the good work!

UncleJohnsBand
2011-12-02, 02:05 AM
What's the latest on the proxy development?

whurlston
2011-12-02, 03:47 AM
Sorry. Gotten sidetracked with life at the moment. Started to install a new floor since my son is starting to crawl and the old floor is top nailed (with the nails all popping up within a couple of days of me hammering them back down). That of course led to having to replace the subfloor as well (why can't I just do things the easy way?). I'll have the new build out this weekend though. My wife wants to be able to search for more videos. ;)

UncleJohnsBand
2011-12-03, 03:00 PM
Sorry. Gotten sidetracked with life at the moment. Started to install a new floor since my son is starting to crawl and the old floor is top nailed (with the nails all popping up within a couple of days of me hammering them back down). That of course led to having to replace the subfloor as well (why can't I just do things the easy way?).

I have actually been where you are at with that......except when I replaced the subfloor and put the new tiles down we decided everything else needed to change as well.....so a couple day event turned into a month long kitchen remodeling event.



I'll have the new build out this weekend though. My wife wants to be able to search for more videos. ;)

Great!

mvallevand
2011-12-03, 09:42 PM
One of the features I miss from Universe is the ability to have Top Rated/Top Favorites broken done further (Day/Week/Month/All Time) for the current viral videos. Without search I wanted to watch the long Lady Gaga video, but it hasn't shown up in the categories this Plugin uses.

Martin

whurlston
2011-12-03, 11:26 PM
...so a couple day event turned into a month long kitchen remodeling event.I wish it were just the kitchen. I'm doing two bedrooms, a living room, a dining room and a kitchen.


One of the features I miss from Universe is the ability to have Top Rated/Top Favorites broken done further (Day/Week/Month/All Time) for the current viral videos. Without search I wanted to watch the long Lady Gaga video, but it hasn't shown up in the categories this Plugin uses.I'll make that happen but it may have to wait for the next build.

mvallevand
2011-12-04, 04:15 AM
I'll make that happen but it may have to wait for the next build.

No problem you shouldn't have spoiled me on the NMT, it's hard to go back.

I have had this s few time



2011-12-03 23:49:34.089 [ERROR][3] System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.String.Substring(Int32 startIndex)
at NextPVR.YouTube.VideoStream.GetVideoStreams(String videoUrl) in F:\Projects\NextPVR\YouTube\YouTube\VideoStream.cs :line 42
at NextPVR.YouTube.YouTubePlugin.ActivateItem(ListObj ect selectedObject) in F:\Projects\NextPVR\YouTube\YouTube\Plugin.cs:line 258
at NUtility.Controls.ListRenderers.UiListList.OnKeyDo wn(KeyEventArgs e)
at NUtility.Controls.UiList.OnKeyDown(KeyEventArgs e)
at NUtility.Base.NewStyleButtonListPlugin.OnKeyDown(K eyEventArgs e)
at NextPVR.YouTube.YouTubePlugin.OnKeyDown(KeyEventAr gs e) in F:\Projects\NextPVR\YouTube\YouTube\Plugin.cs:line 539
at NextPVR.MVP.MVPServerForm.ControlThread()


Also on the PC, using the defaults, if a webm files isn't found (I think) I get a message saying "Could not find a suitable stream to play." If I hit stop to change the format it plays the mp4 fine. As a heads up I have had a couple of mp4 files that wouldn't play. Copying the URL from the log into grapedit they won't play unless I strip the &file=null.mp4. I don't know why it is intermittent.

Martin

whurlston
2011-12-04, 05:05 PM
No problem you shouldn't have spoiled me on the NMT, it's hard to go back.:D


I have had this s few timeI'll check into it tonight as soon as I can look at the code. From memory though, I suspect it's an error when parsing the url with the stream list. This sometimes happens when the video has been removed from youtube but it should be handled.


Also on the PC, using the defaults, if a webm files isn't found (I think) I get a message saying "Could not find a suitable stream to play." If I hit stop to change the format it plays the mp4 fine.It should revert to the mp4 for the PC. I'll double check to see why it's doing that. Is there a particular video that I can use to reproduce the issue?


As a heads up I have had a couple of mp4 files that wouldn't play. Copying the URL from the log into grapedit they won't play unless I strip the &file=null.mp4. I don't know why it is intermittent.Is this on the PC or the NMT? It shouldn't be appending &file=null.mp4 to the url for the PC. As for GraphEdit, it won't play unless you remove that section because it is trying to resolve it to the tinyurl. Tinyurl doesn't know what to do with that parameter so it has to be stripped first. That parameter is really just a workaround for the PlayFile() issue where it has to have a file extention. If you strip the &file=null.mp4 can you get the url to play manually on the NMT?

mvallevand
2011-12-04, 05:54 PM
It should revert to the mp4 for the PC. I'll double check to see why it's doing that. Is there a particular video that I can use to reproduce the issue?

Several from "Most Recent" on separate occasions.


Is this on the PC or the NMT?

On the PC. On the NMT after I get the URL from tinyurl, I do strip it before streaming. It is not part of the URL at tinyurl


It shouldn't be appending &file=null.mp4 to the url for the PC.

Based on the NPVR.log file it seems like it there. Don't you need this hack on the PC too until sub makes a change?

Martin

whurlston
2011-12-05, 12:39 AM
Ah, yes I do need it there but it would be appended to the full url and not the tinyurl. I'll try to recreate it here and see if I can figure out a workaround in the meantime.

I won't be able to get the new build out tonight due to a family medical emergency but I will have it out in the next couple of days.

huck
2011-12-06, 03:35 PM
I understand that there is a limitation that only "standard feeds" can be viewed not "custom feeds". Can someone help clarify the difference? Right now I "subscribe" to a single YouTube channel called the DiceTower...every week I get an email that there are some videos available. I usually watch them via a browser on my laptop but with my new HTPC running the latest NextPVR I'd love to be able to watch directly from there. So, is the DiceTower considered a "standard feed" or a "custom feed". My HDTV is hooked directly to my HTPC no intermediate box. Sorry I'm kinda new at the personalized part of YouTube...until recently I've just been a search-and-view sorta guy.

whurlston
2011-12-07, 01:07 AM
It's really not much of a limitation. Basically, standard feeds/searching are ones that you don't need to log into your YouTube account to view. You can still view the DiceTower channel (well once I release the build with the customized feeds) it just wouldn't be your subscription. By this I mean that if you added a subscription in your youtube account, the plugin would not know about it. You would still need to add the feed to the plugin. I do plan to enable user specific stuff later on down the road.

huck
2011-12-07, 03:43 AM
So I cannot watch DiceTower channel with the current version? Only after you release a new version with customized feeds?

UncleJohnsBand
2011-12-17, 07:59 PM
whurlston.....what is the latest on this plugin.....getting close to having the proxy working yet?

UncleJohnsBand
2012-01-02, 10:39 PM
whurlston.....what is the latest on this plugin.....getting close to having the proxy working yet?

New Year.....new status check...... ;)

whurlston
2012-01-09, 04:48 PM
Sorry. My son and I were both sick from Thanksgiving to just before New Years. (I can't believe he's almost a year old already.) I'm back on the project now and hoping to get a few hours of dev time in today. I just need to get caught up on the state of NextPVR (in case there are any changes might affect the plugin). Tired of unproductive job hunting anyway.

UncleJohnsBand
2012-01-10, 02:54 AM
Sorry. My son and I were both sick from Thanksgiving to just before New Years. (I can't believe he's almost a year old already.) I'm back on the project now and hoping to get a few hours of dev time in today. I just need to get caught up on the state of NextPVR (in case there are any changes might affect the plugin). Tired of unproductive job hunting anyway.

Wow....hope you two are doing better.

whurlston
2012-01-10, 04:04 AM
Yup, was just too many viruses going around at the time and we got them all. Nothing major, just the kind of stuff that leaves you weak, tired and cranky. :D

johnsonx42
2012-01-10, 05:08 AM
so just an endless string of Mondays then eh?

whurlston
2012-01-10, 06:00 AM
You got it. :D

johnsonx42
2012-01-10, 06:23 AM
glad you and your son are doing better. Now... Back to work!! {whip} :D

whurlston
2012-01-10, 06:30 AM
Wow, I'm unemployed for a measly 4 months and already you're starting to sound like my wife. :p

whurlston
2012-01-20, 05:38 AM
I've updated the first post with a link to version 1.0.1.0 (finally using true versioning).

Movies and trailers are not yet implemented but I did not want to hold up the release any longer as if fixes an issue were some videos would not play (This version requires NextPVR 2.3.6 or higher).

There are a couple of minor bugs listed in the first post so be aware of them.

Keyboard/Remote commands have changed from the v2 beta to be more consistent with NextPVR's Recordings sort function.

Edit:
If you were using one of the previous builds, you can delete the following files:
Plugins\Common\Google.*.dll
Anything in the [Skin]\YouTube folder (before unzipping the new version).

You only need the skin.xml file in the skin folder and the Google dll are no longer being referenced.

Reddwarf
2012-01-20, 11:20 AM
Great work! :)

UncleJohnsBand
2012-01-20, 10:38 PM
I've updated the first post with a link to version 1.0.1.0 (finally using true versioning).

Movies and trailers are not yet implemented but I did not want to hold up the release any longer as if fixes an issue were some videos would not play (This version requires NextPVR 2.3.6 or higher).

There are a couple of minor bugs listed in the first post so be aware of them.

Keyboard/Remote commands have changed from the v2 beta to be more consistent with NextPVR's Recordings sort function.

Edit:
If you were using one of the previous builds, you can delete the following files:
Plugins\Common\Google.*.dll
Anything in the [Skin]\YouTube folder (before unzipping the new version).

You only need the skin.xml file in the skin folder and the Google dll are no longer being referenced.

Proxy?

UncleJohnsBand
2012-01-20, 10:55 PM
Now I can't get anything to run on the NMT.....it looks like it switches over and it looks like it may be getting a stream per the activity light on the front...then it flicks and goes back to NPVR. :(

McBainUK
2012-01-20, 11:05 PM
"Unzip the file to either your NextPVR data folder."
Typo?

Plugin look good. Having a play with it now.

UncleJohnsBand
2012-01-20, 11:27 PM
Ok...got it working on NMT.....had to set the default video to be MP4 in the settings on the PC. But video stick chunks when playing.

whurlston
2012-01-21, 12:09 AM
Proxy?Working on it tonight, decided to hold off on movies/trailers until we sort that out. I'm probably going to try a couple of different methods and see which gives the best results.


Ok...got it working on NMT.....had to set the default video to be MP4 in the settings on the PC. But video stick chunks when playing.Hmm... I must have flubbed up something in the code. I'll check it later. Can you post logs showing an attempt to play a file with it set to webm?

whurlston
2012-01-21, 12:10 AM
"Unzip the file to either your NextPVR data folder."
Typo?

Plugin look good. Having a play with it now.That's what I get for just editing the original post. :D

The plugin can go in the program files folder or the data folder but I was being lazy when doing that post.

mvallevand
2012-01-22, 11:03 PM
whurlston any chance you could you create a Notify Event where I could pass a url and then you could parse and play it with the default settings? When I am browsing the movie listings in SearchLite deciding what to record, the YouTube trailer is often available from themoviedb.org and it would help me with the decision.

Here is what I get for 2001: A Space Odyssey of course I'd just pass the url
<trailer>http://www.youtube.com/watch?v=E8TABIFAN4o</trailer>

SearchLite also would allow text searching for movies not in the EPG, today I wanted to see what Contagion was about typed it in SearchLite got the attached and I'd love a Trailer button. The url for it is

<trailer>http://www.youtube.com/watch?v=4sYSyuuLk5g</trailer>

It is easy to send them to you if you have the Notify covered.

EventBus.GetInstance().Notify("YOUTUBE_PLUGIN_PLAY", "http://www.youtube.com/watch?v=4sYSyuuLk5g");

Martin

whurlston
2012-01-22, 11:31 PM
I actually just implemented Notify attempting to deal with another issue. Responding to YOUTUBE_PLUGIN_PLAY would be simple. When you say that you want it played with the default settings, do you mean actual default or the user specified settings?

mvallevand
2012-01-22, 11:37 PM
I actually just implemented Notify attempting to deal with another issue. Responding to YOUTUBE_PLUGIN_PLAY would be simple. When you say that you want it played with the default settings, do you mean actual default or the user specified settings?

That would be great and easy (I think) for me too. I meant the user preference for the device that it is on PC/NMT.

Martin

whurlston
2012-01-22, 11:40 PM
Sure. I'll go ahead and implement it for the next build. I've been working on the video playback proxy and I've got a good one but it's throwing a cross thread exception when I try to call PlayFile(). As soon as I can sort that out tonight, I'll have a build for you.

whurlston
2012-01-23, 05:16 AM
I think I've got a download cache working now. I have some code cleanup and testing to do tomorrow and then I will put up a build for download. I'm afraid that if I mess with the code any longer I'll flub something up in my tired state. (And I want to try to get a couple hours sleep before the storms hit.)

mvallevand
2012-01-23, 05:20 AM
I'm just to bed myself, but I'm ready for you tomorrow. Would it be better to pass the url in a HashTable with the metadata, or should I should just use

PluginHelperFactory.GetPluginHelper().SetPlayerMet aData(metadata);

Martin

whurlston
2012-01-23, 10:41 PM
Send a hashtable with the following parameters:

@url
@name
@description
@previewImage (only send this one if you have the image and the value should be the image, not a string to the image location).

mvallevand
2012-01-23, 10:56 PM
Ok, but I found with PlayVideo(stream,metadata) @title (@name) and @coverArt (@previewImage) worked nicely during playback. Do your @'s work the same?

Martin

whurlston
2012-01-23, 11:19 PM
I'm currently using the names I listed above in my uiList and those are what I use when I parse the streams. When I call PlayFile(), I create a new hashtable and convert them to the @title/@coverart.

mvallevand
2012-01-23, 11:25 PM
If send in metadata format, you could just pass it as is. Mine test yesterday already had @url and sub ignores it.

Martin

whurlston
2012-01-23, 11:32 PM
I can't just pass it as is because it has to go through a few processes before I even get to PlayFile(). I have to download the page, parse the video streams, select the appropriate one start the proxy download if necessary, then I get to call PlayFile(). Those processes were already coded to use the names I listed above. I can change them if you want.

mvallevand
2012-01-23, 11:35 PM
No it's a five second change, here, I figured you wouldn't need them and thought I'd save you some time.

Martin

whurlston
2012-01-23, 11:40 PM
Actually, don't do the change on your end, I've already started doing it. I may be able to eliminate some of the code I have by doing it that way.

mvallevand
2012-01-24, 12:07 AM
Easy, my wife says I am very good at doing nothing. Unfortunately I think she includes anything I do related to NextPVR as "nothing"

Martin

whurlston
2012-01-24, 12:15 AM
I think I married her sister.

ACTCMS
2012-01-24, 12:20 AM
She must have had a few sisters

whurlston
2012-01-24, 02:51 AM
Ok, I'm not able to fully test this at the moment but it should work.

@ UJB/Martin: It will buffer the videos to the live tv folder and they should be playable on the NMT. It does not currently do any cleanup so you will need to delete all the youtube-* files afterwards. It's buffering for both PC and NMT and it always saves it with a .mp4 extension. This is because the default settings for LAV will not play a file with a .webm extension automatically so I had to trick it to load.

@Martin: It should respond to your YOUTUBE_PLUGIN_PLAY notifications. If it doesn't email me a build of the plugin so I can debug my end.

This is only a test to see if the above two functions are working as expected. This build is not meant for general consumption.

mvallevand
2012-01-24, 03:20 AM
Before I send it what I see in your logs is



2012-01-23 23:13:27.315 [DEBUG][1] YouTube: IEventNotification(YOUTUBE_PLUGIN_PLAY, System.Collections.Hashtable)
2012-01-23 23:13:27.440 [DEBUG][1] OnKeyDown() done. Took 129 ms
2012-01-23 23:13:33.278 [DEBUG][7] YouTube: Video Downloader: Started : Starting download of "C:\temp\youtube-E8TABIFAN4o.PC.mp4" : Filesize is 19874374
2012-01-23 23:13:33.313 [DEBUG][7] YouTube: Video Downloader: ReadyToWatch : C:\temp\youtube-E8TABIFAN4o.PC.mp4
2012-01-23 23:13:39.757 [DEBUG][7] YouTube: Video Downloader: Completed : C:\temp\youtube-E8TABIFAN4o.PC.mp4


The video doesn't ever start to play, but it is valid.

Martin

whurlston
2012-01-24, 03:25 AM
Can you "Render media file" on it in graphedit and see which source filter it uses? Also post the full NextPVR.log

mvallevand
2012-01-24, 03:34 AM
It's not a render issue, I don't see sub PlayVideo() line in the log, and the NMT acts the same way no video is sent.

Here is the log.

Martin

whurlston
2012-01-24, 03:46 AM
If you start the YouTube plugin and then switch back to searchlite, does it work then?

Send me a build of SearchLite that sends the Notify and I'll try to debug the problem.

mvallevand
2012-01-24, 04:20 AM
I can play files in the YouTube plugin fine (I liked the speed of the non-caching version better), but going back to SearchLite nothing.

I'll sent it to you in a few seconds.

Martin

UncleJohnsBand
2012-01-24, 10:07 AM
Ok, I'm not able to fully test this at the moment but it should work.

@ UJB/Martin: It will buffer the videos to the live tv folder and they should be playable on the NMT. It does not currently do any cleanup so you will need to delete all the youtube-* files afterwards. It's buffering for both PC and NMT and it always saves it with a .mp4 extension. This is because the default settings for LAV will not play a file with a .webm extension automatically so I had to trick it to load.

@Martin: It should respond to your YOUTUBE_PLUGIN_PLAY notifications. If it doesn't email me a build of the plugin so I can debug my end.

This is only a test to see if the above two functions are working as expected. This build is not meant for general consumption.

Loading it up and testing tonight......thanks!

UncleJohnsBand
2012-01-24, 09:35 PM
Gave it a go before I headed over to the in-laws....looks like it is going to start but then nothing happens and NMT returns to NPVR screen.. I can see the file in the live tv directory....

logs attached....

whurlston
2012-01-25, 12:21 AM
K. More testing to come.

UncleJohnsBand
2012-01-25, 01:53 AM
K. More testing to come.

Below is what is happening on the NMT....if I take the url that failed and plug it into vlc it works fine.....



HDMI Colorspace is now: RGB limited range
Monitor is HDMI
[HDMI] *** Clock changed, is now STABLE
Cannot insert picture inside surface 7
rm: cannot remove '/tmp/temp.jpg': No such file or directory
mono.c: 3323 ... open_path: [http://192.168.1.3:8866/stream?f=//DEN\Media\LIVETV~1\YOUTUB~1.MP4]
mp4
mono.c: 3607 ... [mono] apptype=7
mono.c: 3696 ... [mono] app_params.play_opt->prebuf_max: 16777216
mono.c: 3716 ... [mono] start play_file_app
Using app: 7
rm: cannot remove '/tmp/is_wma.txt': No such file or directory
Error opening file http://192.168.1.3:8866/stream?f=//DEN\Media\LIVETV~1\YOUTUB~1.MP4

UncleJohnsBand
2012-01-25, 01:56 AM
Below is what is happening on the NMT....if I take the url that failed and plug it into vlc it works fine.....



HDMI Colorspace is now: RGB limited range
Monitor is HDMI
[HDMI] *** Clock changed, is now STABLE
Cannot insert picture inside surface 7
rm: cannot remove '/tmp/temp.jpg': No such file or directory
mono.c: 3323 ... open_path: [http://192.168.1.3:8866/stream?f=//DEN\Media\LIVETV~1\YOUTUB~1.MP4]
mp4
mono.c: 3607 ... [mono] apptype=7
mono.c: 3696 ... [mono] app_params.play_opt->prebuf_max: 16777216
mono.c: 3716 ... [mono] start play_file_app
Using app: 7
rm: cannot remove '/tmp/is_wma.txt': No such file or directory
Error opening file http://192.168.1.3:8866/stream?f=//DEN\Media\LIVETV~1\YOUTUB~1.MP4


Do I maybe need to mount the drive via the cgi startup script?

I originally had the local drive letter for the live tv buffer then switched to the unc thinking NMT may like that better.

mvallevand
2012-01-25, 02:02 AM
Can you watch LiveTV in general? \\DEN won't typically resolve to the LocalSystem account. This is using the NPVR web server so the NMT streams the file by http.

Martin

UncleJohnsBand
2012-01-25, 02:05 AM
Can you watch LiveTV in general? \\DEN won't typically resolve to the LocalSystem account. This is using the NPVR web server so the NMT streams the file by http.

Martin

Checking.....

UncleJohnsBand
2012-01-25, 02:07 AM
Checking.....

Yes...live tv comes through just fine the way I have it currently set......

mvallevand
2012-01-25, 02:09 AM
Do you see an error in web.log?

Martin

UncleJohnsBand
2012-01-25, 02:10 AM
Do you see an error in web.log?

Martin

No....bunch of these....



2012-01-24 22:06:55.862 [DEBUG][16] about to read 200000 from location 323156512 (current length = 334218128)
2012-01-24 22:06:56.061 [DEBUG][16] RollingFile.Position returning 323356512
2012-01-24 22:06:56.061 [DEBUG][16] RollingFile.Length returning 334517540
2012-01-24 22:06:56.061 [DEBUG][16] <Files>
<Length>334517540</Length>
<File offset="0">\\DEN\Media\Live TV Buffer\live-73.1626-WPMTDT-10165.ts</File>
<Complete>0</Complete>
</Files>

2012-01-24 22:06:56.062 [DEBUG][16] about to read 200000 from location 323356512 (current length = 334469672)
2012-01-24 22:06:56.062 [DEBUG][16] RollingFile.Position returning 323556512
2012-01-24 22:06:56.062 [DEBUG][16] RollingFile.Length returning 334517540
2012-01-24 22:06:56.062 [DEBUG][16] <Files>
<Length>334517540</Length>
<File offset="0">\\DEN\Media\Live TV Buffer\live-73.1626-WPMTDT-10165.ts</File>
<Complete>0</Complete>
</Files>

mvallevand
2012-01-25, 02:20 AM
That's normal for live tv, I was thinking maybe there was an error on the open of MP4

Martin

UncleJohnsBand
2012-01-25, 02:24 AM
That's normal for live tv, I was thinking maybe there was an error on the open of MP4

Martin

logs rolled off for the \\den mapping........but below you can see what was in the log when I was using the local f: drive....


2012-01-24 17:22:35.043 [DEBUG][17] Got Web Request (192.168.1.8): /stream
2012-01-24 17:22:35.286 [DEBUG][17] SharedMemoryHelper::Open()
2012-01-24 17:22:35.288 [DEBUG][17] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:22:35.288 [DEBUG][17] Unable to find in either 'Global' or 'Local'
2012-01-24 17:22:35.290 [DEBUG][17] RollingFile(F:\Live TV Buffer\youtube-t4H_Zoh7G5A.PCH-0006DC420041.mp4)..
2012-01-24 17:22:35.290 [DEBUG][17] SharedMemoryHelper::Open()
2012-01-24 17:22:35.291 [DEBUG][17] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:22:35.291 [DEBUG][17] Unable to find in either 'Global' or 'Local'
2012-01-24 17:22:35.292 [DEBUG][17] RollingFile.Seek(0)
2012-01-24 17:22:35.292 [DEBUG][17] RollingFile.Position returning 0
2012-01-24 17:22:35.299 [DEBUG][17] about to read 200000 from location 0 (current length = 123030741)
2012-01-24 17:22:35.299 [DEBUG][17] RollingFile.Position returning 200000
2012-01-24 17:22:35.299 [DEBUG][17] about to read 200000 from location 200000 (current length = 123030741)
2012-01-24 17:22:35.300 [DEBUG][17] RollingFile.Position returning 400000
2012-01-24 17:22:35.300 [DEBUG][17] about to read 200000 from location 400000 (current length = 123030741)
2012-01-24 17:22:35.593 [DEBUG][17] RollingFile.Position returning 600000
2012-01-24 17:22:35.593 [DEBUG][17] about to read 200000 from location 600000 (current length = 123030741)
2012-01-24 17:22:35.594 [DEBUG][17] RollingFile.Position returning 800000
2012-01-24 17:22:35.594 [DEBUG][17] about to read 200000 from location 800000 (current length = 123030741)
2012-01-24 17:22:35.638 [ERROR][17] Unexpected error streaming file: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Cassini.Request.StreamFile()
2012-01-24 17:22:35.639 [DEBUG][17] RollingFile.Close()
2012-01-24 17:22:35.798 [DEBUG][18] Got Web Request (192.168.1.8): /stream
2012-01-24 17:22:35.977 [DEBUG][18] Got Web Request (192.168.1.8): /stream
2012-01-24 17:22:36.158 [DEBUG][18] Got Web Request (192.168.1.8): /stream
2012-01-24 17:22:36.338 [DEBUG][18] Got Web Request (192.168.1.8): /stream
2012-01-24 17:22:36.489 [DEBUG][18] Got Web Request (192.168.1.8): /stream
2012-01-24 17:22:36.489 [DEBUG][18] SharedMemoryHelper::Open()
2012-01-24 17:22:36.489 [DEBUG][18] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:22:36.489 [DEBUG][18] Unable to find in either 'Global' or 'Local'
2012-01-24 17:22:36.490 [DEBUG][18] RollingFile(F:\Live TV Buffer\youtube-t4H_Zoh7G5A.PCH-0006DC420041.mp4)..
2012-01-24 17:22:36.490 [DEBUG][18] SharedMemoryHelper::Open()
2012-01-24 17:22:36.490 [DEBUG][18] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:22:36.490 [DEBUG][18] Unable to find in either 'Global' or 'Local'
2012-01-24 17:22:36.490 [DEBUG][18] RollingFile.Seek(0)
2012-01-24 17:22:36.490 [DEBUG][18] RollingFile.Position returning 0
2012-01-24 17:22:36.490 [DEBUG][18] about to read 200000 from location 0 (current length = 123030741)
2012-01-24 17:22:36.490 [DEBUG][18] RollingFile.Position returning 200000
2012-01-24 17:22:36.490 [DEBUG][18] about to read 200000 from location 200000 (current length = 123030741)
2012-01-24 17:22:36.491 [DEBUG][18] RollingFile.Position returning 400000
2012-01-24 17:22:36.491 [DEBUG][18] about to read 200000 from location 400000 (current length = 123030741)
2012-01-24 17:22:36.506 [ERROR][18] Unexpected error streaming file: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Cassini.Request.StreamFile()
2012-01-24 17:22:36.506 [DEBUG][18] RollingFile.Close()
2012-01-24 17:23:09.342 [DEBUG][17] Got Web Request (192.168.1.8): /stream
2012-01-24 17:23:09.342 [DEBUG][17] SharedMemoryHelper::Open()
2012-01-24 17:23:09.342 [DEBUG][17] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:23:09.343 [DEBUG][17] Unable to find in either 'Global' or 'Local'
2012-01-24 17:23:09.343 [DEBUG][17] RollingFile(F:\Live TV Buffer\youtube-t4H_Zoh7G5A.PCH-0006DC420041.mp4)..
2012-01-24 17:23:09.343 [DEBUG][17] SharedMemoryHelper::Open()
2012-01-24 17:23:09.343 [DEBUG][17] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:23:09.343 [DEBUG][17] Unable to find in either 'Global' or 'Local'
2012-01-24 17:23:09.343 [DEBUG][17] RollingFile.Seek(0)
2012-01-24 17:23:09.343 [DEBUG][17] RollingFile.Position returning 0
2012-01-24 17:23:09.343 [DEBUG][17] about to read 200000 from location 0 (current length = 123030741)
2012-01-24 17:23:09.344 [DEBUG][17] RollingFile.Position returning 200000
2012-01-24 17:23:09.344 [DEBUG][17] about to read 200000 from location 200000 (current length = 123030741)
2012-01-24 17:23:09.344 [DEBUG][17] RollingFile.Position returning 400000
2012-01-24 17:23:09.344 [DEBUG][17] about to read 200000 from location 400000 (current length = 123030741)
2012-01-24 17:23:09.647 [DEBUG][17] RollingFile.Position returning 600000
2012-01-24 17:23:09.648 [DEBUG][17] about to read 200000 from location 600000 (current length = 123030741)
2012-01-24 17:23:09.648 [DEBUG][17] RollingFile.Position returning 800000
2012-01-24 17:23:09.648 [DEBUG][17] about to read 200000 from location 800000 (current length = 123030741)
2012-01-24 17:23:09.687 [ERROR][17] Unexpected error streaming file: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Cassini.Request.StreamFile()
2012-01-24 17:23:09.687 [DEBUG][17] RollingFile.Close()
2012-01-24 17:23:09.862 [DEBUG][17] Got Web Request (192.168.1.8): /stream
2012-01-24 17:23:10.042 [DEBUG][17] Got Web Request (192.168.1.8): /stream
2012-01-24 17:23:10.222 [DEBUG][17] Got Web Request (192.168.1.8): /stream
2012-01-24 17:23:10.403 [DEBUG][17] Got Web Request (192.168.1.8): /stream
2012-01-24 17:23:10.556 [DEBUG][17] Got Web Request (192.168.1.8): /stream
2012-01-24 17:23:10.556 [DEBUG][17] SharedMemoryHelper::Open()
2012-01-24 17:23:10.556 [DEBUG][17] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:23:10.556 [DEBUG][17] Unable to find in either 'Global' or 'Local'
2012-01-24 17:23:10.557 [DEBUG][17] RollingFile(F:\Live TV Buffer\youtube-t4H_Zoh7G5A.PCH-0006DC420041.mp4)..
2012-01-24 17:23:10.557 [DEBUG][17] SharedMemoryHelper::Open()
2012-01-24 17:23:10.557 [DEBUG][17] Unable to find in 'Global', about to check 'Local'
2012-01-24 17:23:10.557 [DEBUG][17] Unable to find in either 'Global' or 'Local'
2012-01-24 17:23:10.557 [DEBUG][17] RollingFile.Seek(0)
2012-01-24 17:23:10.557 [DEBUG][17] RollingFile.Position returning 0
2012-01-24 17:23:10.557 [DEBUG][17] about to read 200000 from location 0 (current length = 123030741)
2012-01-24 17:23:10.558 [DEBUG][17] RollingFile.Position returning 200000
2012-01-24 17:23:10.558 [DEBUG][17] about to read 200000 from location 200000 (current length = 123030741)
2012-01-24 17:23:10.558 [DEBUG][17] RollingFile.Position returning 400000
2012-01-24 17:23:10.558 [DEBUG][17] about to read 200000 from location 400000 (current length = 123030741)
2012-01-24 17:23:10.574 [ERROR][17] Unexpected error streaming file: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Cassini.Request.StreamFile()
2012-01-24 17:23:10.574 [DEBUG][17] RollingFile.Close()

mvallevand
2012-01-25, 02:26 AM
Maybe it's a WEBM file?

Martin

UncleJohnsBand
2012-01-25, 02:42 AM
Maybe it's a WEBM file?

Martin

Tried several other files....same thing....vlc shows the below codec info on the file.....
32810

mvallevand
2012-01-25, 03:01 AM
I will try myself in 1/2 an hour but can that file play from the Video Library?

Martin

mvallevand
2012-01-25, 03:27 AM
I tried 4 files from my PCH and they are all WebM

Martin

whurlston
2012-01-25, 05:33 AM
Ok. I'm missing a check somewhere. That's easy enough to fix but I will have to do it tomorrow.

UncleJohnsBand
2012-01-25, 09:47 AM
Ok. I'm missing a check somewhere. That's easy enough to fix but I will have to do it tomorrow.

Thanks!.....the overall progress and approach are great......

whurlston
2012-01-25, 06:17 PM
UJB, try this one. I fixed the issue with it playing webm for the NMT and I also defaulted it to wait for 20% of the video to buffer before playing (I'll probably make this configurable).

You will have to set it manually to perform buffering though. Start and exit the plugin at least once so that it writes the new attributes to youtube.xml. Then change the "useBufferForNMT" attribute (General settings) to "true".

Make sure you delete the old buffer files first. Still no cleanup done yet either.

You can ignore the API document. I included it for Martin for SearchLite (or any plugin can use it).

@Martin, this is the same build I emailed you.

mvallevand
2012-01-25, 09:27 PM
Nice work whurlston! Yes that's your video playing as inset video.

Martin

UncleJohnsBand
2012-01-25, 09:33 PM
UJB, try this one. I fixed the issue with it playing webm for the NMT and I also defaulted it to wait for 20% of the video to buffer before playing (I'll probably make this configurable).

You will have to set it manually to perform buffering though. Start and exit the plugin at least once so that it writes the new attributes to youtube.xml. Then change the "useBufferForNMT" attribute (General settings) to "true".

Make sure you delete the old buffer files first. Still no cleanup done yet either.

You can ignore the API document. I included it for Martin for SearchLite (or any plugin can use it).

@Martin, this is the same build I emailed you.

Now I get a please wait while video buffers dialog from NPVR.......but there is no hand-off to NMT. The pop-up goes away and I can see the file in the live tv directory but no hand-off to NMT once buffering starts.

UncleJohnsBand
2012-01-25, 09:41 PM
looked in web.log and there is nothing there concerning the start of a file stream.....

UncleJohnsBand
2012-01-25, 09:45 PM
Some ugliness in the mvp.log though....



2012-01-25 17:28:49.932 [DEBUG][111] YouTube: Video Downloader Status Change: Started : Starting download of "\\DEN\Media\Live TV Buffer\youtube-QGJuMBdaqIw.PCH-0006DC420041.mp4" : Filesize is 96798048
2012-01-25 17:28:49.991 [DEBUG][3] MVP data read: 1 (3)
2012-01-25 17:28:49.991 [DEBUG][3] MVP request processed
2012-01-25 17:28:49.991 [DEBUG][3] MVP waiting for data
2012-01-25 17:28:53.832 [DEBUG][111] YouTube: Video Downloader Status Change: ReadyToWatch : \\DEN\Media\Live TV Buffer\youtube-QGJuMBdaqIw.PCH-0006DC420041.mp4
2012-01-25 17:28:53.832 [DEBUG][111] YouTube: IEventNotification(YOUTUBE_PLUGIN_PLAY_CALLBACK, System.Collections.Hashtable)
2012-01-25 17:28:53.926 [DEBUG][3] YouTube: Closing popup.
2012-01-25 17:28:53.926 [DEBUG][3] UiStatic.Dispose()
2012-01-25 17:28:53.936 [DEBUG][3] Playing video file: http://o-o.preferred.iad09g05.v15.lscache3.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=903940%2C910104&itag=37&ip=173.0.0.0&signature=CFCB4B9D6BFEDE619B7D6CCCADA890B990B3E0D1 .12ACE1CB96BCD2E1D72FEF1817F43E6C218A7E45&sver=3&ratebypass=yes&source=youtube&expire=1327553523&key=yt1&ipbits=8&cp=U0hRTFVQUV9HTUNOMV9NSlVGOk1Zdk5MaEkxcWtQ&id=40626e30175aa88c&quality=hd1080&fallback_host=tc.v15.cache3.c.youtube.com&type=video/mp4
2012-01-25 17:28:54.016 [DEBUG][3] StartVideoPlayback: http://o-o.preferred.iad09g05.v15.lscache3.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2C itag%2Csource%2Cratebypass%2Ccp&fexp=903940%2C910104&itag=37&ip=173.0.0.0&signature=CFCB4B9D6BFEDE619B7D6CCCADA890B990B3E0D1 .12ACE1CB96BCD2E1D72FEF1817F43E6C218A7E45&sver=3&ratebypass=yes&source=youtube&expire=1327553523&key=yt1&ipbits=8&cp=U0hRTFVQUV9HTUNOMV9NSlVGOk1Zdk5MaEkxcWtQ&id=40626e30175aa88c&quality=hd1080&fallback_host=tc.v15.cache3.c.youtube.com&type=video/mp4
2012-01-25 17:28:54.018 [ERROR][3] Unexpected error in doCompositeRendering(): System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at NextPVR.MVP.MVPServerForm.StartVideoPlayback(Strin g filename, String& reason)
at NextPVR.Players.PlaybackProxyFactory.StartVideoPla ybackProxy(IntPtr window, String filename, String& reason)
at NextPVR.Players.VideoPlayer.PlayFiles(List`1 playQueue, Int32 playQueueIndex, String& reason)
at NextPVR.Players.VideoPlayer.PlayFile(String filename, String& reason)
at NextPVR.MVP.MVPServerForm.PlayVideoFile(String filename, Hashtable metadata)
at NextPVR.YouTube.YouTubePlugin.GetRenderList() in F:\Projects\NextPVR\YouTube\YouTube\NewStyleButton ListPlugin.cs:line 557
at NextPVR.MVP.MVPServerForm.DoCompositeRendering()

mvallevand
2012-01-25, 09:50 PM
Yes whurlston is passing the URL not the proxy filename, and for the NMT to support it he would need tinyurl.

Martin

UncleJohnsBand
2012-01-25, 09:54 PM
Yes whurlston is passing the URL not the proxy filename, and for the NMT to support it he would need tinyurl.

Martin

Probably a bug? Since I have cache true for NMT I would think it would pass the filename...... if I had it set to false I could see it trying to pass the URL......

whurlston
2012-01-25, 09:55 PM
Nice work whurlston! Yes that's your video playing as inset video.

MartinAwesome. I'll have a new release as soon as I sort out the buffer issue.


Some ugliness in the mvp.log though....



Yes whurlston is passing the URL not the proxy filename, and for the NMT to support it he would need tinyurl.

Martin

Argh! I can only blame this on moving too much stuff around. I'll have a fix soon.

whurlston
2012-01-26, 02:08 AM
Ok, let's try this again. This should fix the problem with playing from the web instead of the proxy.

mvallevand
2012-01-26, 03:16 AM
Sorry whurlston, I still get back the direct URL in both the plugin and the API.

Martin

whurlston
2012-01-26, 03:19 AM
For both PC and NMT? I only tested the PC but it works as expected here for me. I can't test on the NMT at the moment because my wife is sleeping.

mvallevand
2012-01-26, 03:29 AM
Yes on the PC too, it plays fine.



2012-01-25 23:24:43.682 [DEBUG][1] Graph filter list:
2012-01-25 23:24:43.682 [DEBUG][1] - Default DirectSound Device
2012-01-25 23:24:43.682 [DEBUG][1] - EVR Renderer
2012-01-25 23:24:43.682 [DEBUG][1] - ffdshow Audio Decoder
2012-01-25 23:24:43.682 [DEBUG][1] - LAV Video Decoder
2012-01-25 23:24:43.682 [DEBUG][1] - LAV Splitter
2012-01-25 23:24:43.682 [DEBUG][1] - http://o-o.preferred.rogers-yyz1.v1.lscache6.c.youtube.com....


Martin

whurlston
2012-01-26, 03:30 AM
Did you remember to change youtube.xml?

<Settings>
<General hqThumbs="true" useBufferForNMT="true" useBufferForPC="true" sticky="true">
...
</Settings>

It's defaulted to false.

I did forget to pass the tinyUrl though (which I've now fixed in my code) but that won't affect buffering.

mvallevand
2012-01-26, 03:33 AM
Nevermind I missed the attributes in YouTube.xml.

Edit: As you just wrote!

Martin

whurlston
2012-01-26, 03:33 AM
Whew. I thought my mind had finally gone.

mvallevand
2012-01-26, 04:01 AM
I'm finding it a bit hit and miss on the NMT some files that are mp4 keep saying "Could not play" from the plugin. I added 5 more seconds on the callback and it seems to be better in SearchLite.

Also you don't handle this message http://www.youtube.com/watch?v=rBSbHInLQ3c on the PC it is 404 on the NMT it crashes.

Also on the NMT I get the please wait buffering but the ShowMessage doesn't disappear on it's own, I have to hit a key when I think it should be ready.


Martin

whurlston
2012-01-26, 04:20 AM
I'm finding it a bit hit and miss on the NMT some files that are mp4 keep saying "Could not play" from the plugin. I added 5 more seconds on the callback and it seems to be better in SearchLite.

Also you don't handle this message http://www.youtube.com/watch?v=rBSbHInLQ3c on the PC it is 404 on the NMT it crashes.Is this with or without buffering? Can you post the logs showing them so I can try to reproduce them.

I have some more work to do on teh buffering in regards to error handling. If buffering is not used, I have no way to know which streams are valid and which are not. I'm just passing the stream URL youtube gives me in that case.

Also on the NMT I get the please wait buffering but the ShowMessage doesn't disappear on it's own, I have to hit a key when I think it should be ready.


Martin
I'll look into it.

mvallevand
2012-01-26, 04:34 AM
Is this with or without buffering? Can you post the logs showing them so I can try to reproduce them.

With buffering on the PC and PCH. Nothing in the logs for the PC for the URL above (which is "A Passage to India")



************** Exception Text **************
System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback( IAsyncResult result)


and the NMT



[1676] <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>NextPVR.exe</AppDomain><Exception><ExceptionType>System.Reflection.TargetInvocationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>An exception occurred during the operation, making the result invalid. Check InnerException for exception details.</Message><StackTrace> at System.ComponentModel.AsyncCompletedEventArgs.Rais eExceptionIfNecessary()
[1676] at NextPVR.YouTube.VideoStream.GetVideoStreamsComplet edEventArgs.get_Result() in F:\Projects\NextPVR\YouTube\YouTube\VideoStream.cs :line 166
[1676] at NextPVR.YouTube.YouTubePlugin.thisVs_GetVideoStrea msCompleted(Object sender, GetVideoStreamsCompletedEventArgs e) in F:\Projects\NextPVR\YouTube\YouTube\NewStyleButton ListPlugin.cs:line 416
[1676] at NextPVR.YouTube.VideoStream.OnGetVideoStreamsCompl eted(GetVideoStreamsCompletedEventArgs e) in F:\Projects\NextPVR\YouTube\YouTube\VideoStream.cs :line 178
[1676] at NextPVR.YouTube.VideoStream.wc_DownloadStringCompl eted(Object sender, DownloadStringCompletedEventArgs e) in F:\Projects\NextPVR\YouTube\YouTube\VideoStream.cs :line 52
[1676] at System.Net.WebClient.OnDownloadStringCompleted(Dow nloadStringCompletedEventArgs e)
[1676] at System.Net.WebClient.DownloadStringOperationComple ted(Object arg)
[1676] at System.Threading._ThreadPoolWaitCallback.WaitCallb ack_Context(Object state)
[1676] at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
[1676] at System.Threading._ThreadPoolWaitCallback.PerformWa itCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
[1676] at System.Threading._ThreadPoolWaitCallback.PerformWa itCallback(Object state)</StackTrace><ExceptionString>System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---&amp;gt; System.Net.WebException: The remote server returned an error: (404) Not Found.
[1676] at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
[1676] at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
[1676] at System.Net.WebClient.DownloadBitsResponseCallback( IAsyncResult result)
[1676] --- End of inner exception stack trace ---
[1676] at System.ComponentModel.AsyncCompletedEventArgs.Rais eExceptionIfNecessary()
[1676] at NextPVR.YouTube.VideoStream.GetVideoStreamsComplet edEventArgs.get_Result() in F:\Projects\NextPVR\YouTube\YouTube\VideoStream.cs :line 166
[1676] at NextPVR.YouTube.YouTubePlugin.thisVs_GetVideoStrea msCompleted(Object sender, GetVideoStreamsCompletedEventArgs e) in F:\Projects\NextPVR\YouTube\YouTube\NewStyleButton ListPlugin.cs:line 416
[1676] at NextPVR.YouTube.VideoStream.OnGetVideoStreamsCompl eted(GetVideoStreamsCompletedEventArgs e) in F:\Projects\NextPVR\YouTube\YouTube\VideoStream.cs :line 178
[1676] at NextPVR.YouTube.VideoStream.wc_DownloadStringCompl eted(Object sender, DownloadStringCompletedEventArgs e) in F:\Projects\NextPVR\YouTube\YouTube\VideoStream.cs :line 52
[1676] at System.Net.WebClient.OnDownloadStringCompleted(Dow nloadStringCompletedEventArgs e)
[1676] at System.Net.WebClient.DownloadStringOperationComple ted(Object arg)
[1676] at System.Threading._ThreadPoolWaitCallback.WaitCallb ack_Context(Object state)
[1676] at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
[1676] at System.Threading._ThreadPoolWaitCallback.PerformWa itCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
[1676] at System.Threading._ThreadPoolWaitCallback.PerformWa itCallback(Object state)</ExceptionString><InnerException><ExceptionType>System.Net.WebException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The remote server returned an error: (404) Not Found.</Message><StackTrace> at Sy
[1676] stem.Net.HttpWebRequest.EndGetResponse(IAsyncResul t asyncResult)
[1676] at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
[1676] at System.Net.WebClient.DownloadBitsResponseCallback( IAsyncResult result)</StackTrace><ExceptionString>System.Net.WebException: The remote server returned an error: (404) Not Found.
[1676] at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
[1676] at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
[1676] at System.Net.WebClient.DownloadBitsResponseCallback( IAsyncResult result)</ExceptionString></InnerException></Exception></TraceRecord>


For the cannot play error on the NMT, basically without a few more seconds most files don't play for me.

Martin

whurlston
2012-01-26, 04:48 AM
Ah, the error is occuring when trying to get the streams, not the buffering. I should be handling that but apparently not. I can fix it.

Re: the few more seconds buffering. Not a problem. I'm currently buffering 20% before reporting it as watchable. I can bump that up.

It will have to wait until tomorrow night or Friday though. I've got a long day tomorrow.

mvallevand
2012-01-26, 05:31 AM
No problem whurlston, it's looking pretty good now.

Martin

UncleJohnsBand
2012-01-26, 09:47 PM
Not working for me either.....starts to hand off to NMT but flicks back to NPVR. Below are the logs...waited for list to load.....selected video.....buffering....then it looks like it tries to switch over to NMT.......but then if flicks back to NPVR....

MVP Log:


[...startup]
2012-01-26 17:22:51.225 [DEBUG][3] MVP Service Locator will resolve media port: 6337
2012-01-26 17:22:51.231 [INFO][4] ServiceLocatorThread() Hostname: Den
2012-01-26 17:22:51.231 [INFO][4] ServiceLocatorThread() Hostname: Den
2012-01-26 17:22:51.231 [INFO][3] MVP Control thread Listening on port: 5917
2012-01-26 17:22:51.232 [INFO][6] BOOTPWorkerThread() Hostname: Den
2012-01-26 17:22:51.244 [INFO][4] IP Address 192.168.1.3
2012-01-26 17:22:51.244 [INFO][4] IP Address 169.254.195.187
2012-01-26 17:22:51.245 [INFO][6] BOOTPWorkerThread IP Address 192.168.1.3
2012-01-26 17:22:51.245 [INFO][6] BOOTPWorkerThread IP Address 169.254.195.187
2012-01-26 17:22:51.246 [INFO][7] MVP Streaming thread Listening on port: 8338
2012-01-26 17:22:51.246 [DEBUG][7] MVP Service Locator will resolve media port: 8338


Web Log


[...startup]
2012-01-26 17:24:01.912 [DEBUG][15] Got Web Request (192.168.1.8): /stream
2012-01-26 17:24:02.145 [DEBUG][15] SharedMemoryHelper::Open()
2012-01-26 17:24:02.147 [DEBUG][15] Unable to find in 'Global', about to check 'Local'
2012-01-26 17:24:02.148 [DEBUG][15] Unable to find in either 'Global' or 'Local'
2012-01-26 17:24:02.150 [DEBUG][15] RollingFile(//DEN\Media\Live TV Buffer\youtube-qrO4YZeyl0I.PCH-0006DC420041.mp4)..
2012-01-26 17:24:02.150 [DEBUG][15] SharedMemoryHelper::Open()
2012-01-26 17:24:02.150 [DEBUG][15] Unable to find in 'Global', about to check 'Local'
2012-01-26 17:24:02.150 [DEBUG][15] Unable to find in either 'Global' or 'Local'
2012-01-26 17:24:02.152 [DEBUG][15] RollingFile.Seek(0)
2012-01-26 17:24:02.152 [DEBUG][15] RollingFile.Position returning 0
2012-01-26 17:24:02.159 [DEBUG][15] about to read 200000 from location 0 (current length = 16728514)
2012-01-26 17:24:02.159 [DEBUG][15] RollingFile.Position returning 200000
2012-01-26 17:24:02.159 [DEBUG][15] about to read 200000 from location 200000 (current length = 16728514)
2012-01-26 17:24:02.160 [DEBUG][15] RollingFile.Position returning 400000
2012-01-26 17:24:02.160 [DEBUG][15] about to read 200000 from location 400000 (current length = 16728514)
2012-01-26 17:24:02.447 [DEBUG][15] RollingFile.Position returning 600000
2012-01-26 17:24:02.448 [DEBUG][15] about to read 200000 from location 600000 (current length = 17498690)
2012-01-26 17:24:02.448 [DEBUG][15] RollingFile.Position returning 800000
2012-01-26 17:24:02.448 [DEBUG][15] about to read 200000 from location 800000 (current length = 17502786)
2012-01-26 17:24:02.491 [ERROR][15] Unexpected error streaming file: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Cassini.Request.StreamFile()
2012-01-26 17:24:02.492 [DEBUG][15] RollingFile.Close()
2012-01-26 17:24:02.571 [DEBUG][15] Got Web Request (192.168.1.8): /stream
2012-01-26 17:24:02.749 [DEBUG][4] Got Web Request (192.168.1.8): /stream
2012-01-26 17:24:02.929 [DEBUG][4] Got Web Request (192.168.1.8): /stream
2012-01-26 17:24:03.110 [DEBUG][15] Got Web Request (192.168.1.8): /stream
2012-01-26 17:24:03.260 [DEBUG][15] Got Web Request (192.168.1.8): /stream
2012-01-26 17:24:03.268 [DEBUG][15] SharedMemoryHelper::Open()
2012-01-26 17:24:03.268 [DEBUG][15] Unable to find in 'Global', about to check 'Local'
2012-01-26 17:24:03.268 [DEBUG][15] Unable to find in either 'Global' or 'Local'
2012-01-26 17:24:03.268 [DEBUG][15] RollingFile(//DEN\Media\Live TV Buffer\youtube-qrO4YZeyl0I.PCH-0006DC420041.mp4)..
2012-01-26 17:24:03.268 [DEBUG][15] SharedMemoryHelper::Open()
2012-01-26 17:24:03.268 [DEBUG][15] Unable to find in 'Global', about to check 'Local'
2012-01-26 17:24:03.268 [DEBUG][15] Unable to find in either 'Global' or 'Local'
2012-01-26 17:24:03.269 [DEBUG][15] RollingFile.Seek(0)
2012-01-26 17:24:03.269 [DEBUG][15] RollingFile.Position returning 0
2012-01-26 17:24:03.269 [DEBUG][15] about to read 200000 from location 0 (current length = 19606258)
2012-01-26 17:24:03.269 [DEBUG][15] RollingFile.Position returning 200000
2012-01-26 17:24:03.270 [DEBUG][15] about to read 200000 from location 200000 (current length = 19606258)
2012-01-26 17:24:03.270 [DEBUG][15] RollingFile.Position returning 400000
2012-01-26 17:24:03.270 [DEBUG][15] about to read 200000 from location 400000 (current length = 19606258)
2012-01-26 17:24:03.284 [ERROR][15] Unexpected error streaming file: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at Cassini.Request.StreamFile()
2012-01-26 17:24:03.284 [DEBUG][15] RollingFile.Close()


NMT Putty Log:


c ss timeout 285212672 mode 65 un1 5c un2 20
20 ss timeout 0 mode 0 un1 0 un2 0
Starting mvp timer
Starting mvp media writer
Starting mvp key reader
Changing server width 1220
Changing server height 712
(*) em86remote: received command 0xA8
f002 f000 12
(*) em86remote: received command 0xA8
f002 f000 12
(*) em86remote: received command 0x0D
f00c f000 d
(*) em86remote: received command 0xAB
f001 f000 11
(*) em86remote: received command 0xA9
f003 f000 13
(*) em86remote: received command 0x0D
f00c f000 d
-1 -1
Crap
bps 6500 length 123030741 dropoff 5000000
Starting to play audio file '\\DEN\Media\LIVETV~1\YOUTUB~1.MP4'
is universe 0
check file .MP4
(*) SMP863x: ------------------------ em86_free_layer_surface layer=0 scaler=6 ------------------------
(*) SMP863x: ------------------------ em86_free_layer_surface layer=1 scaler=1 ------------------------
(*) SMP863x: ------------------------ em86_free_layer_surface layer=3 scaler=4 ------------------------
(*) SMP863x: em86_main_video_scaler_deinterlace: mode=0
(*) Deinterlacing config: Discard/Bob; using_xlacing_motion_scaler=0
[src/mem_mngr.c:699] MRUA memory map ID MMAP_DirectFB_BASE (0xfc800e) released
[src/mem_mngr.c:699] MRUA memory map ID MMAP_VIDEO_2_BASE (0x80000a) released
[src/mem_mngr.c:856] DCC-HD MRUA memory allocator uninitalized
(!) System is going down !!
(!) System is down!!
Fork Child 25705
Fork Parent -1 25705
Ignoring yuv2 data
mono.c: 1956 ...
Starting mono with command >> [/bin/mono] [-nogui] [http://192.168.1.3:8866/stream?f=//DEN\Media\LIVETV~1\YOUTUB~1.MP4] [-dram] [1] [-single]

mono.c: 2742 ... ===> repeat mode: 0
mono.c: 2821 ... ===> subtitle: 0
apply_tvmode >> 11 [HDMI 1080p 60Hz]
tvmode param: [-f HDMI_1080p60 -o dvi_24 -asp 16 9 -dvi_hdmi siI9030 -hdmi2c 2 -cs rgb_16_235]

[HDMI] ========================== creating pDH ==========================
[HDMI] Detected part at I2C device address 0x72: vendor 0x0001, device 9253, rev.0x02 (Silicon Image)
[HDMI] Using the part: SiI9030 (4), Vendor ID is 0x0001 / 0x9253
[HDMI] *** HotPlug changed, is now ON
[HDMI] *** Rx changed, is now ON
[HDMI] *** Clock changed, is now STABLE
[HDMI] DHCancelHDCP()

HH HH HHHHH HH HH HHHH HHHH HH HH
HH HH HH HH HHH HHH HH HH HH HHH HH
HHHHHH HH HH HH H HH HH HH HH HH H HH
HH HH HH HH HH HH HH HH HH HH HHH
HH HH HHHHH HH HH HHHH HHHH HH HH

[HDMI] DHGetVideoModeFromEDID(): Looking for 16:9 mode in YCbCr
Monitor is HDMI
[HDMI] DHSetHDMIMode(TRUE)
[HDMI] Sending blank AudioInfoFrames
[HDMI] Sending null packet
[HDMI] DHUpdateVideoPixelClock(148500000)
[HDMI] Setting the HDMI Audio Clock, PixClk=148500000, SampleClk=44100
HDMI Colorspace is now: RGB limited range
Monitor is HDMI
[HDMI] *** Clock changed, is now STABLE
Cannot insert picture inside surface 7
rm: cannot remove '/tmp/temp.jpg': No such file or directory
mono.c: 3323 ... open_path: [http://192.168.1.3:8866/stream?f=//DEN\Media\LIVETV~1\YOUTUB~1.MP4]
mp4
mono.c: 3607 ... [mono] apptype=7
mono.c: 3696 ... [mono] app_params.play_opt->prebuf_max: 16777216
mono.c: 3716 ... [mono] start play_file_app
Using app: 7
rm: cannot remove '/tmp/is_wma.txt': No such file or directory
Error opening file http://192.168.1.3:8866/stream?f=//DEN\Media\LIVETV~1\YOUTUB~1.MP4
mono.c: 4196 ... MONO cleanup done and exit...
Child exit |65280|
Last key was -1
(*) DirectFB/Config: Active DTV signal 1080p
hdtv60 1280x720

=======================| DirectFB 1.0.0 |=======================
(c) 2001-2007 The DirectFB Organization (directfb.org)
(c) 2000-2004 Convergence (integrated media) GmbH
------------------------------------------------------------

mvallevand
2012-01-26, 09:54 PM
Those are similar to mine, it needs more time to grow.

Martin

UncleJohnsBand
2012-01-26, 09:55 PM
Lowering the resolution to 720p for some and 420p for most allows playing on NMT.....with no chunking! I would like to be able to get up to the 1080P...... :)

whurlston
2012-01-27, 02:43 AM
Here's two for you to test:

50percent.zip will buffer half the video before attempting to play.
100percent.zip will complete the download before attempting to play.

mvallevand
2012-01-27, 03:52 AM
I tried the 50 percent solution but I lost the attributes in YouTube.xml and it doesn't write them anymore so I can't test http streaming

On the PC it is fine but on the NMT still hit and miss (here I am playing the same file first one worked second didn't. Deleting from temp didn't help



2012-01-26 23:32:03.539 [DEBUG][3] YOUTUBE_PLUGIN_PLAY
2012-01-26 23:32:03.539 [DEBUG][3] YouTube: IEventNotification(YOUTUBE_PLUGIN_PLAY, System.Collections.Hashtable)
2012-01-26 23:32:04.567 [DEBUG][13] YouTube: Video Downloader Status Change: Started : Starting download of "C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4" : Filesize is 41352902
2012-01-26 23:32:58.566 [DEBUG][13] YouTube: Video Downloader Status Change: ReadyToWatch : C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4
2012-01-26 23:32:58.566 [DEBUG][13] YOUTUBE_PLUGIN_PLAY_CALLBACK
2012-01-26 23:32:58.566 [DEBUG][13] YouTube: IEventNotification(YOUTUBE_PLUGIN_PLAY_CALLBACK, System.Collections.Hashtable)
2012-01-26 23:32:58.650 [DEBUG][3] Playing video file: C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4
2012-01-26 23:32:58.809 [DEBUG][3] StartVideoPlayback: C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4


2012-01-26 23:34:38.508 [DEBUG][3] YOUTUBE_PLUGIN_PLAY
2012-01-26 23:34:38.508 [DEBUG][3] YouTube: IEventNotification(YOUTUBE_PLUGIN_PLAY, System.Collections.Hashtable)
2012-01-26 23:34:39.838 [DEBUG][14] YouTube: Video Downloader Status Change: Started : Starting download of "C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4" : Filesize is 41352902
2012-01-26 23:34:48.620 [DEBUG][14] YouTube: Video Downloader Status Change: ReadyToWatch : C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4
2012-01-26 23:34:48.620 [DEBUG][14] YOUTUBE_PLUGIN_PLAY_CALLBACK
2012-01-26 23:34:48.620 [DEBUG][14] YouTube: IEventNotification(YOUTUBE_PLUGIN_PLAY_CALLBACK, System.Collections.Hashtable)
2012-01-26 23:34:48.663 [DEBUG][3] Playing video file: C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4
2012-01-26 23:34:48.663 [DEBUG][3] StartVideoPlayback: C:\temp\youtube-WcN392H2jx0.PCH-0006DC41CE68.mp4




On a positive note I do get back the YOUTUBE_PLUGIN_PLAY_CALLBACK_ERROR

Martin

whurlston
2012-01-27, 04:04 AM
I tried the 50 percent solution but I lost the attributes in YouTube.xml and it doesn't write them anymore so I can't test http streamingCan you post the full log? I didn't change anything that should have affected that.

On a positive note I do get back the YOUTUBE_PLUGIN_PLAY_CALLBACK_ERROR

Martin

Great.

Edit:

The plugin will only write the youtube.xml settings to disc when you exit the YouTube plugin itself (if sticky settings are enabled) or when clicking "OK" on the NextPVR settings screen. It does not save them when called from another plugin, it only reads them in that case.

mvallevand
2012-01-27, 04:15 AM
I found YouTube.xml in the the data folder, I was looking in plugins\YouTube I must have found it by accident yesterday.

Changing to streaming PC is great definitely I would recommend this. On the NMT no luck. On both PC/NMT I get the ShowMessage() about buffering even in streaming mode I assume is just connecting On the NMT it never losses this message but I do get a callback error in the log.

Martin

whurlston
2012-01-27, 04:44 AM
Yeah, I much prefer streaming to buffering myself. It's so much faster. The "please wait ... buffering" message is the same whether buffering or streaming.

I'll look into why the popup isn't going away tomorrow. I should get some time to test on the NMT then. It's just hard to do it at night while my wife is sleeping.

mvallevand
2012-01-27, 05:10 AM
Whurlston, it's looking really good from SearchLite. Here is a star-rating listing with playback followed by an exact title search http://www.youtube.com/watch?v=4mTl6F0zqgk

Martin

whurlston
2012-01-27, 05:27 AM
Excellent! I'm pretty pleased with that response time.

UncleJohnsBand
2012-01-28, 03:53 PM
With 50% @ 1080P I was still not getting the hand-off to NMT......using the 100% it is working.....looking great! Are you planning on making the % configurable?

UncleJohnsBand
2012-01-28, 04:15 PM
Is there anyway when the buffering starts to detect if there is already a file there and if it's length matches what is to be buffered don't rebuffer? Basically....if a full file exists already don't rebuffer just hand over the location to NMT to play....

UncleJohnsBand
2012-01-29, 12:27 AM
Are movies and trailers to be available on NMT? I can't seem to get to them.......

mvallevand
2012-01-29, 12:36 AM
Are movies and trailers to be available on NMT? I can't seem to get to them.......

Are you going from SearchLite? If so upload the MVP.log and I will see what is going wrong. I am still waiting for whurlston to fix streaming, I haven't had any luck with 50% either and I can't be bothered with 100%

Martin

whurlston
2012-01-29, 01:14 AM
With 50% @ 1080P I was still not getting the hand-off to NMT......using the 100% it is working.....looking great! Are you planning on making the % configurable?
I can do a test build for you where you can play with the percentage. At this point though, we may end up going with just complete buffering or none.

Is there anyway when the buffering starts to detect if there is already a file there and if it's length matches what is to be buffered don't rebuffer? Basically....if a full file exists already don't rebuffer just hand over the location to NMT to play....Yes, I just hadn't done it yet for the tests.



Are movies and trailers to be available on NMT? I can't seem to get to them.......Not yet. I was trying to sort out the buffering before implementing those.

UncleJohnsBand
2012-01-29, 07:01 PM
I can do a test build for you where you can play with the percentage. At this point though, we may end up going with just complete buffering or none.

I used this a lot yesterday......I did notice that on most videos it took about 30 seconds or so to cache the whole video......but on some others it could take up to 5-10 minutes.....I watched the cache file and it would steadily grow but just few thousand bytes at a time. I don't think that is the plugin.....I am thinking it may be the source from where the video is coming from.

mvallevand
2012-01-29, 07:05 PM
I can do a test build for you where you can play with the percentage. At this point though, we may end up going with just complete buffering or none.

Before going the 100% route, I'd suggest, at least for the NMT calling the file GBnetradio- instead of youtube- The web server buffers and responds differently with these files.

Martin

whurlston
2012-01-29, 07:18 PM
I tried with "live-*" but there was no difference. I'll try with "gbnetradio-*" but I didn't because I figured NPVR would block the video on the PC.

I also have one other thing I'm going to try, but so far, I've simply not had any luck getting the NMT to play a file that is still growing.

mvallevand
2012-01-29, 07:31 PM
I tried with "live-*" but there was no difference. I'll try with "gbnetradio-*" but I didn't because I figured NPVR would block the video on the PC.

I use GBnetradio.ts with WebRadio to play QAM channels that I scan and watch dynamically, (for temporary On Demand programming) and there is no problem passing it to PlayVideo()

Martin

Reddwarf
2012-01-29, 07:48 PM
I don't think that is the plugin.....I am thinking it may be the source from where the video is coming from.I also se very varying times before the video starts to play, I agree that it is most likely the source causing delay. I use the plugin only on pc and I would hate to wait for the whole video to buffer.

mvallevand
2012-01-29, 08:33 PM
I also se very varying times before the video starts to play, I agree that it is most likely the source causing delay. I use the plugin only on pc and I would hate to wait for the whole video to buffer.

I don't think the problem is the source as much as the ISP, I haven't seen any delay with streaming mode on the PC which is set in [DataDirectory]\youtube.xml with useBufferForPC="false" In fact on the older version on the NMT I had fast streaming too, with the normal 6-10 second NMT player (required from mp4) delay.

Martin

whurlston
2012-01-29, 11:50 PM
I use GBnetradio.ts with WebRadio to play QAM channels that I scan and watch dynamically, (for temporary On Demand programming) and there is no problem passing it to PlayVideo()

MartinNo luck with using gbnetradio-*. Maybe it works because it was a .ts file and not an mp4.


I also se very varying times before the video starts to play, I agree that it is most likely the source causing delay. I use the plugin only on pc and I would hate to wait for the whole video to buffer.There will be 2 modes:

Direct streaming
Local caching/buffering


Direct streaming will always be the default and you will only need to wait for the source filter (PC) or Mono player (NMT) to buffer what it needs. This will always be the fastest method. Local buffering is for those having issues with direct streaming.


I don't think the problem is the source as much as the ISP, I haven't seen any delay with streaming mode on the PC which is set in [DataDirectory]\youtube.xml with useBufferForPC="false" In fact on the older version on the NMT I had fast streaming too, with the normal 6-10 second NMT player (required from mp4) delay.

MartinI agree. It all depends on the ISP. Sometimes a video will start instantly for me and other times there is a wait. It all depends on how saturated my connection is at the time.

For the other idea I had:

I'm able to remux the files into an H.264 .ts file using ffmpeg but I have to transcode the audio to mp2. This does create a larger filesize but it is extremely fast. If I try to keep the AAC audio, there is no audio stream in the resulting file (ffmpeg bug). "-absf aac_adtstoasc" might overcome that but that bitstream filter is missing in the ffmpeg build included with NPVR so I can't test it.

But even the aac audio issue aside, I can't pass the url to ffmpeg as the infile or it errors. I've tried with the full url and the tiny url and neither work. So I need ffmpeg to work on a file that is still growing and I cannot find a way to do that.

mvallevand
2012-01-30, 12:03 AM
To bad about the filename, perhaps the NMT depends upon a real Content-Type video/mp4 for this streaming.

When you use PlayVideo(filename) with your cache filename sub takes care of the passing the proper filename, there is no url or tinyurl involved.

Martin

whurlston
2012-01-30, 12:14 AM
When you use PlayVideo(filename) with your cache filename sub takes care of the passing the proper filename, there is no url or tinyurl involved.

I was talking about for the ffmpeg conversion command line. For instance, this does not work:


ffmpeg.exe -i http://tinyurl.com/757cn5h -f mpegts -vcodec copy -acodec mp2 -vbsf h264_mp4toannexb youtube-DhdbWpiv5cQ.ts

mvallevand
2012-01-30, 02:06 AM
I don't think that is going to do it, my instinct tells me that NRecord.exe might need to change to send the video/mp4 mime type so that mono know what to do with the file.

Martin

whurlston
2012-01-30, 05:50 AM
I can now buffer mp4 videos locally and play them on the NMT with only 25% buffering. I can probably even cut the percentage down to almost nothing but I haven't tested it.

I am remuxing the video and audio into an MPEGTS container on the fly (including AAC audio) so the NMT does not even drop out to Mono to play them.

I have some code cleanup to do and add a couple of settings to youtube.xml (everything is hardcoded at the moment) but I should have a build out tomorrow.

mvallevand
2012-01-30, 12:09 PM
I can now buffer mp4 videos locally and play them on the NMT with only 25% buffering. I can probably even cut the percentage down to almost nothing but I haven't tested it.

I am remuxing the video and audio into an MPEGTS container on the fly (including AAC audio) so the NMT does not even drop out to Mono to play them.

I have some code cleanup to do and add a couple of settings to youtube.xml (everything is hardcoded at the moment) but I should have a build out tomorrow.

Fantastic news! The software demux in my player does choke at BluRay 1080p, I'm not sure about YouTube, but 720p will be sweet. I need just over 1MB to start to get the pids and audio/video types and then about 2MB to play.

Martin

whurlston
2012-01-30, 12:39 PM
I tested again last night and I can send the callback with as early as 32K buffered. I am having a couple of small issues:


I keep getting a "Connection closed unexpectedly" error from the servers.
Only every other download works because the second gets the above error almost instantly.
Video timelines are a bit messed up.


The first two are problems with the webrequest and I'm not sure what's causing it (but I'll figure it out). Not sure what to do about the second. I'll probably make the ffmpeg commandline a user setting. Maybe someone who is better with ffmpeg than I am can sort it out.

These streams are well below Bluray 1080p.

whurlston
2012-01-30, 04:18 PM
I keep getting a "Connection closed unexpectedly" error from the servers.
Only every other download works because the second gets the above error almost instantly.
Video timelines are a bit messed up.



Solved. I had a "while (...)" statement instead of "if (...)" that was causing the it to attempt to read the download stream after it had completed.
Solved. The "every other download" was a red herring. I was not giving HD streams enough time to buffer before playback. Increasing the preplay buffer to 256KB seems to be enough to buffer even 1080 streams.
Unsolved. Have to live with this one for now.


I need to try to get some things done before I have to pick up my son so I'll package it up later tonight.

mvallevand
2012-01-30, 04:50 PM
#3 Unsolved. Have to live with this one for now.

Excellent progress. For this one I suspect sub would need to now more about the expected duration or length so that he could approximate a work-in progress recording.

Martin

whurlston
2012-01-30, 04:56 PM
That's what I was thinking. I'll get him to take a look when he has a chance after I package it up.

Sheik Yerbouti
2012-01-30, 07:31 PM
I am remuxing the video and audio into an MPEGTS container on the fly (including AAC audio) so the NMT does not even drop out to Mono to play them.

This sounds brilliant! When I'm watching youtube I usually watch a lot of short videos. Not having to leave the npvr gui for mono would be great. Can't wait to try it out.

Chris

mvallevand
2012-01-30, 10:08 PM
Not having to leave the npvr gui for mono would be great.

Because that is six seconds per file that you will never get back!

Martin

whurlston
2012-01-30, 11:28 PM
I won't call this a release until I can implement the new settings in the settings screen, but if anyone wants to play with the new buffering technique, here it is.

You will need to open the plugin and exit (or save from the settings screen) for the new values to be written to youtube.xml.

This includes a new build of ffmpeg that is needed for the buffering to work. You only need the executable but I need to include the licenses with the download. Do not overwrite the existing ffmpeg in the NextPVR program folder. I don't know if the new build will affect anything with NextPVR or the web interface.


<General hqThumbs="true" useBufferForNMT="false" useBufferForPC="false" sticky="true">
<FFmpegPath>C:\ffmpeg\ffmpeg.exe</FFmpegPath>
<FFmpegCommandLine>-f mpegts -vcodec copy -acodec copy -vbsf h264_mp4toannexb</FFmpegCommandLine>
<BufferLocation>D:\YouTube</BufferLocation>
<NMTBufferKB>1024</NMTBufferKB>
<PCBufferKB>256</PCBufferKB>

Explanation of new settings (you need to at least set the FFmpegPath):


useBufferForNMT/useBufferForPC: Download the video to the hard drive before playing. There is no cleanup yet on the downloaded files.
FFmpegPath: The location where the included build of ffmpeg is stored. You must include the executable name ("ffmpeg.exe").
FFmpegCommandLine: The commandline used for remuxing to mpegts. Play with it if you want but the output will be in a .ts file. If you mess it up, delete the line from youtube.xml and it will revert to the default. Do not include the input/output file options, they will be supplied automatically.
BufferLocation: Where the downloaded videos will be stored. By default, it is "[LiveTV]\YouTube" (I may change this to the recordings location.)
NMTBufferKB/PCBufferKB: Wait for the downloaded file to reach this size before asking NextPVR to play it. Note that this is in KB. The default value for the NMT is 1MB and the default value for the PC is 256KB.


If you set useBufferForPC to "true", it will always download an MP4 stream. These can easily be remuxed to mpegts and the NMT can play the same buffered file.

If a video has been downloaded already, the existing file will be played.

Download: http://www.oshinetworks.com/NPVR/youtube-ffmpeg.zip

mvallevand
2012-01-30, 11:53 PM
Thanks I am about to give it a try (I had to use .zip for the above URL)

Martin

whurlston
2012-01-31, 12:06 AM
Right you are. Fixed.

No changes the the API by the way. I haven't tested but it should still function as normal.

UncleJohnsBand
2012-01-31, 12:16 AM
I won't call this a release until I can implement the new settings in the settings screen, but if anyone wants to play with the new buffering technique, here it is.

You will need to open the plugin and exit (or save from the settings screen) for the new values to be written to youtube.xml.

This includes a new build of ffmpeg that is needed for the buffering to work. You only need the executable but I need to include the licenses with the download. Do not overwrite the existing ffmpeg in the NextPVR program folder. I don't know if the new build will affect anything with NextPVR or the web interface.


<General hqThumbs="true" useBufferForNMT="false" useBufferForPC="false" sticky="true">
<FFmpegPath>C:\ffmpeg\ffmpeg.exe</FFmpegPath>
<FFmpegCommandLine>-f mpegts -vcodec copy -acodec copy -vbsf h264_mp4toannexb</FFmpegCommandLine>
<BufferLocation>D:\YouTube</BufferLocation>
<NMTBufferKB>1024</NMTBufferKB>
<PCBufferKB>256</PCBufferKB>

Explanation of new settings (you need to at least set the FFmpegPath):


useBufferForNMT/useBufferForPC: Download the video to the hard drive before playing. There is no cleanup yet on the downloaded files.
FFmpegPath: The location where the included build of ffmpeg is stored. You must include the executable name ("ffmpeg.exe").
FFmpegCommandLine: The commandline used for remuxing to mpegts. Play with it if you want but the output will be in a .ts file. If you mess it up, delete the line from youtube.xml and it will revert to the default. Do not include the input/output file options, they will be supplied automatically.
BufferLocation: Where the downloaded videos will be stored. By default, it is "[LiveTV]\YouTube" (I may change this to the recordings location.)
NMTBufferKB/PCBufferKB: Wait for the downloaded file to reach this size before asking NextPVR to play it. Note that this is in KB. The default value for the NMT is 1MB and the default value for the PC is 256KB.


If you set useBufferForPC to "true", it will always download an MP4 stream. These can easily be remuxed to mpegts and the NMT can play the same buffered file.

If a video has been downloaded already, the existing file will be played.

Download: http://www.oshinetworks.com/NPVR/youtube-ffmpeg.zip

All excited....but I am at the in-laws......I am going to log on remote and set things up for when I get home..... :-)

mvallevand
2012-01-31, 12:35 AM
No changes the the API by the way. I haven't tested but it should still function as normal.

It is superb whurlston, and the speed is great. I did have trouble after I got a callback error from SearchLite, I got several in a row, but it could be momentary connectivity. On other advantage over the NMT player is being able to display the OSD on top, definitely a cleaner interface.

If the intent is to keep them for later play, perhaps the name should be youtube-title-id.ts, just a thought.

Martin.