MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Main Features (talk, share your ideas, get support) » Watch / Listen Media » watch/edit Videos


watch/edit Videos General talk, support, improvement suggestions and tips & tricks

Reply
 
Thread Tools Display Modes
Old 2007-09-11, 17:08   #11 (permalink)
Portal Member
 
Join Date: Apr 2007
Location: Gouda
Age: 28
Posts: 337
Thanks: 65
Thanked 3 Times in 3 Posts

Country:

My System

Default

Quote:
Originally Posted by Marcusb View Post
I think Flip was being very polite and patient in his reply.

I also assume it was a language issue that caused the mix up
probably, but my english is quite good. I'm half english, half dutch
Quote:
Originally Posted by Marcusb View Post
but a lot of what flip said was responded to incorrectly in kkendals post, which Flip pointed out.
When somebody says an MPEG2 file contains only MPEG1/2, than I interpret that as an MPEG2 container that can only contain MPEG1/2 formats. This is just plain wrong, MPEG2 is not a container. This is probeably what Flip intended to say, but my reaction was not incorrect. If somebody says it's safer to let windows determine what codecs to use (even though sometimes that also doesn't work) than I HAVE to disagree, I'm sorry
But enough about language issues

Quote:
Originally Posted by Marcusb View Post
As for the effort required to change the code to individually select codecs, I guess this could be an easy task technically, but quite lengthy in the time it would take. As flip said, MP checks the extension not the contents of the container. This would need to be changed as well as adding in all the drop down boxes for every codec (and maintaining as new ones are made) which would take bit of time.
Whao, is this really true? But for example, an avi or mkv can contain so many formats, from h264 to mpeg2 and from vc-1 to xvid. Than how can MP determine what codec to take if it only looks at the container??
And how is it possible that it can determine h264 and mpeg2 within a container if it only looks at the extension? ...It's just really hard to swallow...
what was the thought behind this, to just look at the file extension, not the actual needed format within the container? Could somebody please explain this?
As I'm not a programmer, I know squad about interpreting source codes so I can't check it but this really changes the perspective on things...

Oh and Flip, if I offended you, I'm sorry. That's just my Dutch side acting up I guess.
kkendall is offline   Reply With Quote
Old 2007-09-11, 18:24   #12 (permalink)
Super Moderator
 
FlipGer's Avatar
 
Join Date: Apr 2004
Location: Leipzig, Germany
Age: 33
Posts: 2,238
Thanks: 31
Thanked 53 Times in 39 Posts

Country:

My System

Default

Hoi,

Quote:
Originally Posted by kkendall View Post
Whao, is this really true? But for example, an avi or mkv can contain so many formats, from h264 to mpeg2 and from vc-1 to xvid. Than how can MP determine what codec to take if it only looks at the container??
And how is it possible that it can determine h264 and mpeg2 within a container if it only looks at the extension?
MP does not determine h264 or mpeg2 within a mkv container. That's what I tried to explain. It just throws the file into direct show and lets windows decide. MP only builds the graph manually, if it recognizes the file extension mpeg. And therefore MP does not use the codec you set for mpeg, although the mkv might contain it. Thats what the initial topic was about: "MP does not use settings", remember?

Quote:
Originally Posted by kkendall View Post
what was the thought behind this, to just look at the file extension, not the actual needed format within the container? Could somebody please explain this?
Well, I do not know if the programmer is still around. So this is just guessing: He did not know better? I think its not sooo easy to look into a container and check the codec. Its much easier to program "if file extension = mpeg then do this else that". Please keep in mind that this is a OpenSource-Project. The programmers work in the spare time on this.

And as told above, your idea makes sense! So I really think this will be thought of for future releases. Just make a feature request to make sure its written down somewhere!

Flip.
FlipGer is offline   Reply With Quote
Old 2007-09-12, 09:23   #13 (permalink)
Portal Member
 
Join Date: Apr 2007
Location: Gouda
Age: 28
Posts: 337
Thanks: 65
Thanked 3 Times in 3 Posts

Country:

My System

Default

ah, ok! but...
So what you're saying is, only if the file extension is .mpeg or .h264, MP uses the codecs from the MPsettings, otherwise it feeds it to the system?
But the file extension is the 'type' of container. So you're saying that only when the container is .mpeg (I thought mpeg2 was a videoformat, not a container/file extension) or .h264 (again, I thought it was only a videoformat, not a container/file extension) MP uses the MPsettings...

I've never seen or heard of a .h264 containerfile before and I think some files can be renamed to .mpeg and still play, but it's not official. Most mpegs are in .ts, .avi or .mkv or .VOB containers. So MP practically never uses the MPsettings the way you explain it... EDIT: just heard .VOB files are generally seen by MP as .mpeg and handled that way.

That's why I think it's not the whole story how MP works... Maybe some of the devs can explain how all of this works in laymans terms.

(oh, I've made a feature request like you advised Flip!)

Last edited by kkendall; 2007-09-14 at 15:10.
kkendall is offline   Reply With Quote
Old 2007-09-14, 23:19   #14 (permalink)
Super Moderator
 
FlipGer's Avatar
 
Join Date: Apr 2004
Location: Leipzig, Germany
Age: 33
Posts: 2,238
Thanks: 31
Thanked 53 Times in 39 Posts

Country:

My System

Default

Hi,

Quote:
Originally Posted by kkendall View Post
So what you're saying is, only if the file extension is .mpeg or .h264,
I never mentioned .h264...
Quote:
Originally Posted by kkendall View Post
MP uses the codecs from the MPsettings, otherwise it feeds it to the system?
Yes.
Quote:
Originally Posted by kkendall View Post
I've never seen or heard of a .h264 containerfile before
I never mentioned .h264...
Quote:
Originally Posted by kkendall View Post
That's why I think it's not the whole story how MP works... Maybe some of the devs can explain how all of this works in laymans terms.
You do not trust my words, right?
Code from MP:
Code:
if (extension.Equals(".dvr-ms") || extension.Equals(".mpg") || extension.Equals(".mpeg") || extension.Equals(".bin") || extension.Equals(".dat"))
        {
          if (strVideoCodec.Length > 0) videoCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strVideoCodec);
          if (strAudioCodec.Length > 0) audioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAudioCodec);
        }
        // doesn't help for Music Videos to start..
        //if (extension.Equals(".wmv"))
        //{
        //  videoCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, "WMVideo Decoder DMO");
        //  audioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, "WMAudio Decoder DMO");
        //}
        if (extension.Equals(".mp4") || extension.Equals(".mkv"))
        {
          if (strH264VideoCodec.Length > 0) h264videoCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strH264VideoCodec);
          if (strAudioCodec.Length > 0) audioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAudioCodec);
        }
Although not knowing C# I hope you can see that MP sets the Codecs depending on the file extension. MP takes the h264 settings, if the extension is "mkv" or "mp4". Please note, that this code example, is from the "Videos" section. Afaik it differs a littlebit in the DVD and TV section, but I did not take a look into that code.

Another remark to your question "Why is it programmed that way". This code section is rather old. More than 3 years I think. At this time it was only necessary to take care about the mpeg codec. All upcomming other codecs were just added the easiest way: By adding its most common extension.

Quote:
Originally Posted by kkendall View Post
(oh, I've made a feature request like you advised Flip!)
Jupp. Saw it. Hopefully it will taken care off. I will add my thoughts there too. So it might get more attention.

Best regards,
Flip.
FlipGer is offline   Reply With Quote
Old 2007-09-15, 23:23   #15 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 220
Thanks: 0
Thanked 2 Times in 2 Posts


Default

windows a perfect job of selecting codecs for media

it wont do a perfect job of selecting codecs for media if you install codec packs or weird software

what have we learned?

dont install codec packs or weird software.

i personally only use the following on all my windows computers:
ffdshow (everything -mpeg2 -h264)
powerdvd (mpeg2, h264)

add haali splitter to that and avoid software that installs codecs on its own and youre set

dont blame the system if you cant manage your codecs, codec packs and bundled tv card software usually install conflicting decoders that get higher merit than the actual working codecs, and thats when you run into trouble.
__________________
amd BE2350 / 2GB / 8500gt / terratec diversity / xp sp2
deebo is offline   Reply With Quote
Reply

Bookmarks

Tags
configuration, graphedit, settings, testing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
After My TV configuration from MP Config MP and MP Config crashes GetWell 0.2.3.0 RC1 and SVN Builds 4 2007-08-31 16:37
K-World DVB-T 100 Graphedit settings wilksj01 MediaPortal 1 Talk 0 2007-08-16 14:01
Can't play FullHD in MP, will play in WMP and GraphEdit... ThaClown Installation, configuration support 5 2007-07-18 08:41
MP Not Starting, Both configuration and MP .exes crashes on start. KalasMannen pre 1.0 RC1 5 2007-03-03 22:04
Installed MP 02. MP shutdown after settings(solved) thedge Codecs, External Players 6 2006-07-19 08:38


All times are GMT +1. The time now is 03:50.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden