NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 8 9 10 11 12 … 93 Next »
Streaming media

 
  • 0 Vote(s) - 0 Average
Streaming media
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#31
2012-12-11, 05:25 AM (This post was last modified: 2012-12-11, 05:36 AM by whurlston.)
I just retested. The NMT will not play the flv stream directly but since they are h.264/aac, I can remux them and get them to play either in NPVR or the NMT native player.

Edit: Not all flv streams on the web are h.264/aac but all the ones I've tested on YouTube were.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#32
2012-12-11, 12:04 PM
For the trailers, you seem to be able to get them in two formats: m4v and mov, and (at least) four resolutions. Not every combination is possible though.

360p: .mov only, rss feed available
480p: .mov and .m4v, rss feed available (m4v in feed)
720p: .mov and .m4v, rss feed available (m4v in feed)
1080p: .mov only, no rss feed available

They're all encoded with H264/AVC video and 2 channel AAC audio, but with some subtle differences (although I've not compared that many trailers across every file type).

Taking - for example - the 720p ones, the m4v files tend to be 1280x720 for the majority of cases, encoding the black borders for 2.35:1 ratio stuff, whereas the mov files don't encode the borders, meaning the resolution is ~1280x544 in these cases. This also has the small advantage of meaning the Apple logo is encoded into the active part of the picture rather than the black border making it less distracting. The mov files have a higher bitrate for their video, but seem to use a lower profile of AVC (main vs high) so it might balance out (ie bigger file size, but easier to decode). The movs have about half the bit rate on the audio though, ~ 128K vs 256K. Some are at 44KHz, some are at 48Khz.

Saying that, if there's any perceivable difference in video or audio quality between them, I've not really noticed it.

Compared to the youtube trailers you get nicer metadata, but the feeds only update once a week (and they still hadn't added the new Star Trek yesterday) and you have to put up with that Apple logo. I might try to add support for them eventually but I'm not sure if there's much point with the youtube plugin already handling them.

Iain
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,118
Threads: 957
Joined: May 2006
#33
2012-12-11, 12:58 PM
You might be able to scrape 1080p from this feed http://feeds.hd-trailers.net/hd-trailers It's relatively simple RSS and has direct download links.

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#34
2012-12-11, 02:34 PM
Thanks Martin, I'll look into that. Ironically a lot of the content on there seems to come from Apple anyway.

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#35
2012-12-11, 08:31 PM
Another advantage to the ffmpeg method (not that I've used it yet) is that NPVR is pointed at a local file rather than an http stream.

This means my AutoRefresh plugin can continue to work as the MediaInfo dll doesn't like http streams. Or at least my code for using it doesn't Rolleyes

My trailers plugin simultaneously writes what it downloads to disk however, so I can query on that, but the AutoRefresh plugin is designed to go on what NPVR tells it which is obviously the http stream. I've worked around it by making an EventBus notification call between the plugins so that MediaInfo queries the local file instead* (and not until it's got enough bytes in it), but it's hardly elegant.

Iain

* it actually ends up querying both the stream and the file, but what the hell...
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#36
2012-12-12, 03:20 AM (This post was last modified: 2012-12-12, 03:25 AM by whurlston.)
imilne Wrote:I've worked around it by making an EventBus notification call between the plugins so that MediaInfo queries the local file instead* (and not until it's got enough bytes in it), but it's hardly elegant.

Iain

* it actually ends up querying both the stream and the file, but what the hell...

You could set a couple of variables in your plugin and use them to override the MediaInfo.dll check with IEventNotification:

Code:
#region global variables
bool useMediaInfo = true;
double refreshRate = 59.94; [color=#006400]// I can't remember if you only take integers or not so adjust as needed.[/color]
#endregion

#region IEventNotification Members
public void Notify(string eventName, object eventArg)
{
  switch (eventName)
  {
[color=#006400] // We got the refresh rate already or we want to force it so disable the MediaInfo check.[/color]
  case "SET_REFRESH_FOR_NEXT_VIDEO":
   useMediaInfo = false;
   refreshRate = (double)eventArg;
   break;

  [COLOR="#006400"]// Get refresh rate with MediaInfo if it is not overridden. Then set the refresh rate with either the MediaInfo information or the override.
  // Better to do it while building the graph than after playback starts. You might be doing this already.[/COLOR]
  case "BUILDING_GRAPH":
   if (useMediaInfo)
   {
      refreshRate = GetRateWithMediaInfo((string)eventArg);
   }
   [color=#006400]// This function should also check to make sure that the refresh rate is "supported" before actually setting it.[/color]
   SetRefreshRate(refreshRate);
   break;

  [color=#006400]// Reset it to use MediaInfo.dll as the default for the next time.[/color]
  case "PLAYBACK_STOPPED":
   useMediaInfo = true;
   break;
  }
}
#endregion

This also gives the benefit of giving other plugins (like YouTube for example) the ability to override the defaults for any videos they launch.

Then when you want to stop MediaInfo.dll, you can just Notify("SET_REFRESH_FOR_NEXT_VIDEO", 24.00) before calling PluginHelperFactory.GetPluginHelper().PlayVideoFile()
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#37
2012-12-12, 09:21 AM
Yeah, that's pretty much what I have, although I pass through the path to the alternative file to check rather than a refresh rate. I could certainly make it work that way too, but it would need to be a framerate that gets passed in, not the refresh rate. The plugin then matches the framerate to the user's own selection of refresh rates to use for it.

Iain
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#38
2012-12-12, 01:36 PM
frame rate... refresh rate... don't bother me with technicalities. Big Grin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#39
2012-12-12, 05:51 PM
Now you just sound like my wife Big Grin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,118
Threads: 957
Joined: May 2006
#40
2012-12-13, 01:06 AM
Iain, have you already got a Mediainfo class ? I want to write info to an NFO file as follows and I'm being lazy

Code:
<fileinfo>
        <streamdetails>
          <audio>
            <channels>[b]Number of Channels (2 for Stereo, 6 for 5.1 Suround Sound)[/b]</channels>
            <codec>[b]Audio Codec[/b]</codec>
          </audio>
          <video>
            <aspect>[b]Aspect Ratio[/b]</aspect>
            <codec>[b]Video Codec[/b]</codec>
            <duration>[b]Length of Video[/b]</duration>
            <height>[b]Height of Video in Pixels[/b]</height>
            <scantype>[b]Whether its Progressive Scan or Interlaced[/b]</scantype>
            <width>[b]Width of Video in Pixels[/b]</width>
          </video>
        </streamdetails>
      </fileinfo>

Also do you install mediainfo.dll to common?

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): « Previous 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Video streaming URL and parameters? cncb 1 1,924 2021-10-22, 06:58 PM
Last Post: sub
  Looking for C# UPnP Media Server code bgowland 5 7,736 2016-12-16, 08:25 PM
Last Post: mvallevand
  Media Browser Integration lukemb3 557 157,719 2015-11-29, 05:27 PM
Last Post: UncleJohnsBand
  Media\Show Directory mvallevand 12 6,103 2014-07-02, 10:58 AM
Last Post: sub
  Advice on which streaming method to use fred250 17 6,456 2013-09-14, 11:14 AM
Last Post: fred250
  Media\Shows Metadata mvallevand 2 1,922 2013-05-22, 04:09 AM
Last Post: mvallevand
  On-the-fly transcoding for streaming recordings / videos bgowland 6 4,110 2012-06-03, 03:10 AM
Last Post: bgowland
  Building a list of files in media folders (npvr Music and Videos) bgowland 2 1,938 2012-02-05, 10:29 AM
Last Post: bgowland
  NPVR HTTP streaming bug? tmrt 3 1,921 2010-12-28, 11:48 PM
Last Post: tmrt
  Windows Media Connect - Storing stuff on a Home Server psycik 3 2,745 2009-09-29, 03:47 AM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode