INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Decoder selection by codec  (Read 5378 times)

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Decoder selection by codec
« on: April 20, 2010, 07:38:32 pm »

Hi!

I'm just wondering why the decoder selection (File type dialog) is by file extension and not detected codec. For example a Matroska file can house different codecs for both audio and video, so wouldn't filter selection by codec give better control over which decoder is used for a specific format?

Another question: Is the order the filters are presented in the Other filters line the actual order they will be applied?
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Decoder selection by codec
« Reply #1 on: April 20, 2010, 09:58:54 pm »

Yes, I agree 100% and have mentioned this before in other threads. The alternative would be to allow an override of the filters one chooses for filetypes for individual files as necessary. However, a codec-based selection would make far more sense - and would be easier too.
Logged

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Re: Decoder selection by codec
« Reply #2 on: June 06, 2010, 05:35:15 pm »

Any response or update on this?
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Decoder selection by codec
« Reply #3 on: June 06, 2010, 08:38:16 pm »

It seems to me the process of building a filter graph is a Windows function. So the option of specifying particular filters by file type is just a way to indicate a preference. I've always assumed that if "automatic" is selected, Windows will simply have more choice in how to build a graph. And in that process, it will use the codec information recorded in the file. An "automatic" setting is not available for "other filters," but any number of different filters can be specified there.

So while the connection between file types and filters may be tenuous, what else can the program do? I suppose it could offer a way to mess with filter merit scores or something, but anyone who understands how to do that is probably already using GraphEdit as a player. ;)
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Decoder selection by codec
« Reply #4 on: June 06, 2010, 09:58:56 pm »

Rick, I disagree; all other directshow players I know work by choosing codec preferences - probably by playing with merits. I'd like to be able to use CUDA acceleration (with CoreAVC) for an mkv containing h264 video. However, if it has VC-1, I want to be able to use MPC decoder with DXVA. Ideally MC would be able to override filter settings on a per file basis, which would really help with some funky encodes I have. It's becoming more and more moot recently as ffdshow improves and handles more and more stuff quite impressively.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Decoder selection by codec
« Reply #5 on: June 06, 2010, 10:24:33 pm »

I agree 100% - the current grouping are better than nothing but as pointed out, modern containers like MKV can have anything in it.  For this exact reason I try to where possible use Haali Splitter --> FFSHOW Video/Audio --> Haali Video Renderer / Reclock Audio Renderer and make any tweaks inside FFDSHOW's settings.

The good news is that thanks to a recent change, the info required to make selections by CODEC now exists in MC.  These days when you import a Video, MC tags into the "Compression" Field, 3 things:
1) File Type: eg AVI, MPG, MKV etc
2) Video Type: eg MPEG-2, X-VID, DV, WVC1, WMV, CCV1 etc
3) Audio Type: eg MPEG-1, MPEG-2, WMA, Dolby AC3, DTS, LPCM, FLAC, PCM etc etc

So, we could now in theory define a preference for each filter in the graph nice and easily by:
1) Source / Splitter preference for each File Type
2) Video filter preference for each Video Type
3) Audio filter preference for each Audio Type
4) Video Renderer preference
5) Audio Renderer preference

What we would need is a change to how the current "File Types" menu works to support preferences for each Container (File Type), Video Codec, and Audio Codec
 
Thanks
Nathan

Logged
JRiver CEO Elect

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Decoder selection by codec
« Reply #6 on: June 06, 2010, 11:17:05 pm »

What I don't understand is if it's possible to pick the "best" filters to use according to file/video/audio type, what's the purpose of the merit system? Why isn't this done by (or facilitated by) DirectShow in the first place?

I don't disagree with the idea of specifying filters by codec. But I'm curious why things are the way they are. I do wonder why, when I have to make some change, I have to make it for every container type. I don't use many, but it's still annoying.

Quote
The good news is that thanks to a recent change, the info required to make selections by CODEC now exists in MC.  These days when you import a Video, MC tags into the "Compression" Field, 3 things:

Why does it make any difference that this information is now saved in tags? It come from the files, so it's available at any time for determining how to build a graph. I'm assuming, although I don't know for sure, this is the information DirectShow uses to determine the requirements of the graph it needs to build.
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Decoder selection by codec
« Reply #7 on: June 07, 2010, 03:19:52 am »

The merit system is pretty good and at least allows the filter chain to be built as DirectShow will take the most preferred filters that claim to be compatible with the Source, Codecs, and Renderers.  The issue I've seen (especially has the number of filters installed grows) is that regardless how "good" or "poor" you may think a filter is, it probably was installed with a high merit and hence may get used.  DirectShow does not know which filters you think are the "best" just if they are compatible and what their relative merit is.

OK, so now we have a system full of filters all with high (or similar) merits, so how to manage them so you get the ones you want:
1) Use a filter mgr and change merits.  The downside of Merits is that it is not that granular, eg take FFSHOW it has a ton of CODEC support but you may think some of them are better than others yet you can only apply a merit to the overall filter (the option is you can in filters like FFDSHOW disable specific CODEC support).  All of this is pretty abstract for the average user
2) Use MC to assign preferences (on the fly merits?) in a nice GUI that hides all the above...  Working for me! The current system does it on file type, and as pointed out, while OK it would be better to assign preferences based on File Type, Audio Codec, Video Codec (but would need JR to change the approach).

I'm guessing the advantage of this info being in the tags before trying to play the files, is (like with the current file type system???) MC can then dynamically change the relative merits to launch playback with the preferred filters.

Thanks
Nathan
Logged
JRiver CEO Elect

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Re: Decoder selection by codec
« Reply #8 on: July 04, 2010, 05:20:48 am »

I see the codec selection is still only available by file type. Is there a change in the works?
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Re: Decoder selection by codec
« Reply #9 on: October 12, 2010, 01:07:47 pm »

bump...any update on this? I still think the File Type dialog should be reworked to be able to select filters by codecs. So that I could select different filters for mkv or avi files containing different video and audio codecs. Yes I know I can disable/enable codecs in for example FFDShow, as well as changing the filter merits, but it would be a lot easier to have full control over filter usage in MC. Actually, I would like to see MC discarding the whole merit system and ONLY using the filters I specify and in that order, no matter what the merits are, if that's at all possible.

Also I'd like to see DVD video (vob) being treated like any other video, with the same freedom of filter selection. Any reason DVD is treated differently?
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Decoder selection by codec
« Reply #10 on: October 12, 2010, 01:30:13 pm »

This is a good idea, but also a chicken and egg problem.

For example, we can't know what is in an MKV until we use filters to analyze it.  So you end up needing to pick filters to analyze and then different filters to analyze better or play.

I'm not sure the solution.
Logged
Matt Ashland, JRiver Media Center

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver
Re: Decoder selection by codec
« Reply #11 on: October 12, 2010, 01:33:50 pm »

You can tag the file as a different file type, and setup playback options for that File Type. For example, I just setup two methods to playback mkv files. My mkv's have a File Type of mkv. I tagged one of my MKV's with a File Type of ogv (this is Ogg Vorbis Video). It really isn't Ogg Vorbis Video, but I used that File Type since I don't have any Ogg Vorbis Video files. I then set the Playback Method for ogv to use JRiver video engine (using directshow filters) and selected different filters from what I use for mkv's. Now the new file type mkv will play with one set of filters and all other mkv's will play with another set of filters. The mkvs have exactly the same codecs, but are using different filters.

Changing the File Type is what allows you to specify different filters for identical codecs. It would be nice if you could rename the File Type, but its not really necessary.

Edit:  Removed info about renaming the file. It isn't necessary.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Decoder selection by codec
« Reply #12 on: October 12, 2010, 02:12:47 pm »

For example, we can't know what is in an MKV until we use filters to analyze it.

Could you not use a tool like MediaInfo to do that?
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Decoder selection by codec
« Reply #13 on: October 12, 2010, 02:20:24 pm »

The current system works for me.

I mostly prefer to tweak the merits with Direct Show Filter Manager and use the automatic selection in MC.

I have set only some specific file types to use forced filters. For example, I have set DTS audio (.dts) to use AC3Filter with no additional processing. The DTS audio streams in video files use automatically ffdshow (I has a higher merit than AC3filter) and my preferred ffdshow settings for video audio.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

audunth

  • Citizen of the Universe
  • *****
  • Posts: 634
Re: Decoder selection by codec
« Reply #14 on: October 12, 2010, 08:35:09 pm »

Just take a look at how it's done in Zoomplayer (have a look at http://www.inmatrix.com/zplayer/options_pbsmartplay.shtml and watch the video), that's exactly how it should be done in MC too. Gives you TOTAL CONTROL over file types/codecs and exactly how the graph is built. Zoomplayer's Smart Play builds the graph instead of Windows/Directshow. You assign source filter to a file type, and then Smart Play takes it from there, using filters you specify for each codec, or automatically if you prefer that.

Also, there's a field called Compression that gets filled in with the codecs used whenever a file is imported in MC. So when playing a file, MC could just use that info to create its own graph.

As I said, you can pretty much get the same result by manipulating merits, renaming file extensions etc. But what I spent 10 minutes configuring back when I was using Zoomplayer (before MC could play video reliably), has taken me many hours and lots of frustration to accomplish in MC, and I'm still not finished setting everything up the way I want. Obviously going back to Zoomplayer is not an option for me since MC is superior in so many other ways.

I don't mean to be demanding here, I just really feel very strongly that this would make MC a much more stable video player, and would help eliminate problems of the type "why do I get an error trying to play this mkv file when all other mkv files play without problems?"
Logged
Cheers,
Audun

My system:
ASUS  P8Z68 V-PRO/GEN3, 8GB RAM, Core i5-2500K
EVGA Nvidia GTX 970 SSC, 4GB RAM
Antec P180 case w/Seasonic X460 fanless PSU, water cooled by Zalman Reserator 1+ w/extra DDC pump
Windows 7 Ultimate 64 bit
Sony VPL-HW30ES 3D projector
Yamaha RX-V3900 receiver and custom built 2Ch power amp for front/stereo speakers
Klipsch Reference/SVS 7.1 speaker system
Always running the latest available version of MC
Pages: [1]   Go Up