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
#41
2012-12-13, 01:15 AM
MediaInfo.dll is stored in common
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#42
2012-12-13, 11:07 AM
mvallevand Wrote:Iain, have you already got a Mediainfo class ? I want to write info to an NFO file as follows and I'm being lazy

I haven't got a class per se, but I can tweak the existing stuff I have so you can see how to use it (it's really easy). I'll post something later if I can...

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#43
2012-12-13, 06:53 PM
Martin,

This should be enough to get you started. It's in the NPVR plugin architecture rather than anything standalone, but there's so little code to it anyway. I've also included the .txt file from MediaInfo itself that lists all the types of things you can query on. It's probably worth grabbing the proper MediaInfo developer download too as there's load more information in that too, especially with regards to querying different streams in the same file.

Doing this has also made me think maybe I should just finish off what I started on a MediaInfo popup plugin ages ago (feelings of guilt about not releasing my videos/movie plugin aside Big Grin). I'd really like it to work by being able to intercept the Info (eg Alt+B) popup that normally appears rather than anything separate. One press for the normal popup, press it again (while it's still visible) and the MediaInfo-detected stuff could then appear. But I have a feeling that might not be possible; there's some timeline toggling going on at the very least.

Iain
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,116
Threads: 957
Joined: May 2006
#44
2012-12-13, 10:46 PM
Thanks Iain, I'll give it a try tonight. It does look easy but sometimes when you get into the implementation things change.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,116
Threads: 957
Joined: May 2006
#45
2012-12-14, 04:05 AM (This post was last modified: 2012-12-14, 04:10 AM by mvallevand.)
Thanks again, your code saved me a lot of time
Code:
<fileinfo>
    <container>MPEG-TS</container>
    <streamdetails>
      <video>
        <codec>AVC</codec>
        <aspect>16:9</aspect>
        <width>1280</width>
        <height>720</height>
      </video>
      <audio>
        <codec>AAC</codec>
        <language>en</language>
        <channels>2</channels>
      </audio>
    </streamdetails>
  </fileinfo>

The harder part was figuring how xsd seralises it

Code:
movieFileinfo fi = new movieFileinfo();
                            fi.container = mediaInfo.Get(StreamKind.General, 0, "Format", InfoKind.Text);

                            movieFileinfoStreamdetails streamdetails = new movieFileinfoStreamdetails();
                            fi.streamdetails = new movieFileinfoStreamdetails[1];
                            fi.streamdetails[0] = new movieFileinfoStreamdetails();

                            fi.streamdetails[0].audio = new movieFileinfoStreamdetailsAudio[1];
                            fi.streamdetails[0].audio[0] = new movieFileinfoStreamdetailsAudio();
                            fi.streamdetails[0].audio[0].channels = mediaInfo.Get(StreamKind.Audio, 0, "Channel(s)", InfoKind.Text);
                            fi.streamdetails[0].audio[0].codec = mediaInfo.Get(StreamKind.Audio, 0, "Format", InfoKind.Text);
                            fi.streamdetails[0].audio[0].language = mediaInfo.Get(StreamKind.Audio, 0, "Language", InfoKind.Text);

                            fi.streamdetails[0].video = new movieFileinfoStreamdetailsVideo[1];
                            fi.streamdetails[0].video[0] = new movieFileinfoStreamdetailsVideo();
                            fi.streamdetails[0].video[0].aspect = mediaInfo.Get(StreamKind.Video, 0, "DisplayAspectRatio/String", InfoKind.Text);
                            fi.streamdetails[0].video[0].codec = mediaInfo.Get(StreamKind.Video, 0, "Format", InfoKind.Text);
                            fi.streamdetails[0].video[0].height = mediaInfo.Get(StreamKind.Video, 0, "Height", InfoKind.Text);                          
                            fi.streamdetails[0].video[0].width = mediaInfo.Get(StreamKind.Video, 0, "Width", InfoKind.Text);                                                  
                            movie.fileinfo = new movieFileinfo[1];
                            movie.fileinfo[0] = fi;

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


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,632 2015-11-29, 05:27 PM
Last Post: UncleJohnsBand
  Media\Show Directory mvallevand 12 6,101 2014-07-02, 10:58 AM
Last Post: sub
  Advice on which streaming method to use fred250 17 6,453 2013-09-14, 11:14 AM
Last Post: fred250
  Media\Shows Metadata mvallevand 2 1,921 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,919 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