Page 1 of 2

Save Directshow decoder option (PAL/NTSC)

Posted: 17 Jul 2008 11:34
by MrB
Hi all...

This relates to these posts:
Directshow and PAL as default
VLC code modifying a DLL to configure options?

Basically, if I change the DirectShow decoder option to PAL, or any thing else, this change is lost on reboot.
After monitoring the system, no registry or file changes are made when I change to PAL leaving me to believe that a DLL or similar is being modified once loaded in memory. Since it is in memory, the changes are lost on reboot.

Would it be possible to save the change into the VLCRC and then load it through the normal method (modify the DLL/memory) when VLC loads next time? I don't think it should be very tricky...


Thanks.

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 20 Jul 2008 19:04
by BackEMF
I second this!

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 25 Jul 2008 20:26
by Jean-Baptiste Kempf
You can do so in the preferences.

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 27 Jul 2008 15:41
by BackEMF
Hi j-b,

I've tried storing the PAL / NTSC setting in Preferences /Input Codecs / Access Modules / DirectShow / then select 'Configure' and select PAL and I save these settings, but the next time I restart it reverts to the default NTSC. Am I doing it right?

Is there anyway a feature could be added so you can select PAL from the command line as an option?

Thanks...

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 14 Aug 2008 20:39
by BackEMF
Has nobody any idea for a workaround / possible implementation of this in the near future?

Please ask if you want any more information.

Thanks

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 17 Aug 2008 04:09
by Jean-Baptiste Kempf
IN fact, this dialog is external to VLC, so we cannot save it.

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 11 Sep 2008 20:36
by secaro
that means that it is unpossible to capture anything from a tv card using command line or activeX ? You have to set it manually each time.

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 12 Sep 2008 22:13
by MrB
IN fact, this dialog is external to VLC, so we cannot save it.
Apparently the directshow settings dialog is in the same coding format as VLC.
In fact, it should just be some sort of extra tweaking to the filter (you can set the regular filter settings from the command line, so an extra function should be able to be used from the command line too?)

This document shows the AnalogVideoStandard Enumeration and allows the DSHOW to be set; I'm sure it can be applied somehow to VLC. Does anyone know how?

Code: Select all

Dshow.h
This header is already being used in VLC code, so this can be enumerated:

Code: Select all

typedef enum tagAnalogVideoStandard { AnalogVideo_None = 0x00000000 AnalogVideo_NTSC_M = 0x00000001, AnalogVideo_NTSC_M_J = 0x00000002, AnalogVideo_NTSC_433 = 0x00000004, AnalogVideo_PAL_B = 0x00000010, AnalogVideo_PAL_D = 0x00000020, AnalogVideo_PAL_H = 0x00000080, AnalogVideo_PAL_I = 0x00000100, AnalogVideo_PAL_M = 0x00000200, AnalogVideo_PAL_N = 0x00000400, AnalogVideo_PAL_60 = 0x00000800, AnalogVideo_SECAM_B = 0x00001000, AnalogVideo_SECAM_D = 0x00002000, AnalogVideo_SECAM_G = 0x00004000, AnalogVideo_SECAM_H = 0x00008000, AnalogVideo_SECAM_K = 0x00010000, AnalogVideo_SECAM_K1 = 0x00020000, AnalogVideo_SECAM_L = 0x00040000, AnalogVideo_SECAM_L1 = 0x00080000, AnalogVideo_PAL_N_COMBO = 0x00100000 } AnalogVideoStandard;
If dshow.h is already being referenced in code, surely there can be an extra combo box to select this?
Since there is an external dialogbox which settings "remain in memory", then a function can be called at any time to edit this setting.
There must be some keen coder to assist?? :P

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 13 Sep 2008 19:47
by VLC_help
If I understand this correctly, OleCreatePropertyFrame opens the dialog which has these options that are device/driver specific. Problem is that device drivers can store data to there any way they want so it is near impossible to add command line options for it. But it should be possible to store IUnknown objects for example to registry but I don't know how.

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 18 Sep 2008 13:00
by MrB
If I understand this correctly, OleCreatePropertyFrame opens the dialog which has these options that are device/driver specific.
Ahh, I wasn't aware that they were device specific; are you sure? I thought that setting DirectShow settings to PAL_I (or otherwise) would apply these settings to all devices that use DirectShow. Is there anyway someone can test that? I only have one device that I could try on any one machine at the moment. It would be interesting if we set PAL_I on one device, and it was the same on another. If so, then a (presumabley) simple script to modify general DirectShow settings would be possible as either a stand alone piece of code, or built into VLC...
But it should be possible to store IUnknown objects for example to registry but I don't know how.
It seems that the DirectShow options are not stored anywhere, and hence reset to default on reboot. I guess if settings were stored (by VLC) then VLC would have to set them each time VLC was run... That would be ideal.

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 18 Sep 2008 14:13
by VLC_help
I don't have any capture devices, but I assumed it opens something like that http://starizona.com/acb/ccd/webcam/expset02.jpg

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 20 Sep 2008 12:42
by BackEMF
I think the dialog box that is opened is part of DirectShow? Here is the one that is opened on my computer:

Image


I'm glad this is still being worked on, I think it should definately be possible to at least create some stand alone application as MrB suggests. Without this you effectively cannot capture from the command line unless your situation happens to match the default settings.

Thanks...

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 20 Sep 2008 17:10
by Mercury048
Yep, I get exactly that for my TV tuner. (Video device listed as "ATI Rage Theater Video Capture")

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 20 Sep 2008 17:14
by VLC_help
Not all DirectShow devices have PAL/NTSC option. For example webcams. Anyone with webcam want to paste screenshot?

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 20 Sep 2008 17:19
by Mercury048
Well, you have a dshow-tuner-channel option for the command line. Not all DIrectShow devices have tuners but VLC can obviously set this option correctly. I imagine it can set PAL/NTSC option in a similar way.

Then just save it. :roll:

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 20 Sep 2008 22:12
by BackEMF
Ok, this is taken from my laptop with built in webcam. The dialog is indeed different, but it doesn't look proprietary.

Image

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 24 Oct 2008 21:23
by MrB
I have the same screen as shown on the first page.
Not all DirectShow devices have PAL/NTSC option.
I don't think this should cause a problem...
Although this dialog box is DS box, it is using C++ code to set (albeit from the DS program).
Another program should be able perform the same task, using simple logic.
- Enumerate the possible settings (i.e. PAL_I/PAL_B/NTSC_M).
- Show drop down menu of those possible settings.
- Save setting in registry so that when a DS feed is used in the future, this setting is automatically set on the VLC page.
- If a setting is chosen that is not enumerated (i.e. if a command line is used), then use default.

Basically, directshow settings for a particular device can be modified; you currently do so in the VLC properties when you choose to use DS as the input, however currently the PAL/NTSC part of the DS settings are not available from the VLC console (hence these posts). They appear to be using similar code as the other properties you can set to interact, therefore we only need to add these extra properties to the VLC console.

At the end of the day, VLC is using code to interact with DS; this is just more code that should be able to be added. It's all about trying to find someone who can play with the DS code properties I guess! I'm still not able to, although maybe I'll try and find time to learn it properly one day! Any other takers until then?

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 09 Feb 2009 23:11
by BackEMF
I'm just wondering if there has been any progress on this?

Video LAN is perfect for my needs apart from this one thing making it useless! I will help anyway I can...

(Apologies for the bump...)

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 17 Sep 2010 04:43
by d3x0r
Uhmm in the dshow code there is a list ppsz_standards_list_text that has things like "NTSC_M", "PAL_D", etc... it also defines an option ...

add_integer( CFG_PREFIX "tuner-standard", 0, NULL, STANDARD_TEXT, STANDARD_LONGTEXT,
false )
change_integer_list( i_standards_list, ppsz_standards_list_text, NULL )

which should be dshow-tuner-standard that can be set in the vlc.cfg (or on a command line?) and I think the last 'false' there is what keeps it from being written back out into vlc.cfg.

it does read the option back in and use it to apply to the dshow filter being created...

It looks like it might work... even if there isn't a way to configure it in the settings ( would there be, if it was enabled?)

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 17 Sep 2010 23:39
by d3x0r
it looks like this revision http://git.videolan.org/?p=vlc.git;a=co ... 7e12842faf ( 9 Aug 2010) added the support to set tuner-standard; but it looks like 1.1.4 was built aug 27,2010; however if I search in vlc directory there is no reference of 'NTSC' which is a literal string, and should exist somewhere.... any idea why a build from aug 27 didn't include the new code? Is there a more recent build?

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 17 Sep 2010 23:42
by Jean-Baptiste Kempf
It is for 1.2.0-git, not 1.1.x

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 17 Sep 2010 23:46
by d3x0r
Hmm okay it's in 1.2.0 - so I guess it's not in the branch...
I'm also not seeing tags like 1.1.4 for releases in Git... where should I find those?

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 17 Sep 2010 23:49
by Jean-Baptiste Kempf
vlc/vlc-1.1.git , not in vlc.git

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 17 Sep 2010 23:56
by d3x0r
Well, although the option exists and saves a value (in 1.2.0 nightly git build), it doesn't actually work....

Re: Save Directshow decoder option (PAL/NTSC)

Posted: 28 Oct 2011 20:36
by AeitZean
Has anybody found a way to do this yet? I really want to change the mode automatically and its driving me up the wall