MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server » Help on Development » Development


Development You want to code something for the TV-Server? Share it in here!

Reply
 
Thread Tools Display Modes
Old 2008-12-02, 20:53   #151 (permalink)
Portal Developer
 
misterd's Avatar
 
Join Date: Apr 2006
Posts: 1,137
Thanks: 27
Thanked 38 Times in 26 Posts

Country:


Default

Quote:
Originally Posted by Khurram View Post
I have set up an svn repo and am looking for the .cs file which controls which tv format is used for which card. But I am having trouble locating this .cs file. In pre TVServer days, there was an xml file for card definitions. But that is no longer the case. Can you please help me out here?

Thanks.
You can find the specific handling for analog card in TvCardAnalog.cs, AnalogSubChannel.cs and AnalogScanning.cs. But the feature you are looking for is planned to be included in 1.0.1, if I find enough time


Quote:
Originally Posted by Narcis View Post
Hi misterd,
This is my first time using MediaPortal and it seems that I am unlucky.
I am dealing withe the same issue like people in this thread, but now with the latest RC4 version - no channels found after scanning.
I have attached the archive log. If you can help me would be great.
Thank you very much!
http://itadvisor.ro/download/log.zip

Proccessor: Barton 2.4
Memory: 1.5GB DDR2 RAM
OS: Vista Business with SP1 and lastest updates x86
Tuner card: Leadtek TV2000 XP Expert
SQL: MySql 5.0 (before I was using MSSQL but with the same issue)
According to our definitions for the old tvengine, it seems that your card isn't supported by TvServer. The reason is that your tv card is using the soundcard as audio capture device. Probably this will be changed in 1.0.1.

Quote:
Originally Posted by hassegubben View Post
Hi misterd, any progress adding the teletext subtitles to the .ts stream? Will this be scheduled for v1.01?
It is still on my to-do list, but I had to realize that analog tv support has to be improved first. E.g. many cards aren't supported, mpg recordings don't work very well, software encoders are hard coded etc. Also some features are missing like the possibility to set the tv format, the video size etc.
So having all these things in mind, I don't expect that teletext subtiltes will be added to the .ts stream in 1.0.1. I also don't expect that all changes are ready for 1.0.1, but all mentioned things will be added step-by-step.

Quote:
Originally Posted by SilentExcept View Post
i see that many of the updates here are already marked as "IN SVN"
does that mean that they are now included in main svn tree?

so installing this on rc4, only extra function i would get is "- Added feature to define priorities for the software encoders in SetupTV", correct?

what about teletext patch mentioned (#1780563)? is it still included?
The only feature that isn't part of RC4 is the possibility to define priorities for software encoders. The reason is that it needs a db change and other changes. The mentioned patch is also part of RC4.

MisterD
misterd is offline   Reply With Quote
Old 2008-12-03, 04:34   #152 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 156
Thanks: 3
Thanked 4 Times in 4 Posts

Country:

My System

Default

Hi misterd, i've successfully installed the plugin, and then i installed the mainconcept encoder. Neither MP or TVserver can "see" that i've installed the codec.

In other words, under the priority list in the TVserver to choose which encoder should be the number 1 priority i have only my intervideo encoder, is this because i installed the mainconcept encoder after installing your patch? Or is there something i can do to make the encoder be detected.

Thanks again
5Hundred is offline   Reply With Quote
Old 2008-12-03, 17:06   #153 (permalink)
Portal Member
 
Join Date: May 2008
Posts: 72
Thanks: 9
Thanked 1 Time in 1 Post

Country:


Default

Quote:
Originally Posted by misterd View Post
Quote:
Originally Posted by Khurram View Post
I have set up an svn repo and am looking for the .cs file which controls which tv format is used for which card. But I am having trouble locating this .cs file. In pre TVServer days, there was an xml file for card definitions. But that is no longer the case. Can you please help me out here?
You can find the specific handling for analog card in TvCardAnalog.cs, AnalogSubChannel.cs and AnalogScanning.cs. But the feature you are looking for is planned to be included in 1.0.1, if I find enough time
Thanks for the information. I hope we can all get 1.0.1 soon, but since 1.0 will be christmas time, so 1.0.1 will be sometime next year. In the meantime, I am going to try this out on my own

The way I would like to do this is to force PAL video for all sources because that all my channels are in PAL. I have 2 options:

1) Call IAMAnalogVideoDecoder->put_TVFormat() to force the TV format to PAL (many thanks to sub and carpeVideo over from GBPVR forums).

2) I have read in the directshow development forums at MSDN that this call is deprecated and the current way to do this is through IAMStreamConfig.

I have looked over the .cs files and it seems the bulk (all?) of filter graph is done in TvCardAnalog.cs. I have tried both ways but my code didnt work.

1)Using IAMAnalogVideoDecoder: Iadded the following lines to AddTvCaptureFilter function:
Code:
IAMAnalogVideoDecoder _filterCaptureVideoDecoder = (IAMAnalogVideoDecoder) _filterCapture;
              hr = _filterCaptureVideoDecoder.put_TVFormat(AnalogVideoStandard.PAL_B);
              if (hr == 0)
              {
                  Log.Log.WriteFile("analog: AddTvCaptureFilter forced tv format to PAL_B");
              }
              else
              {
                  Log.Log.WriteFile("analog: AddTvCaptureFilter cannot force tv format to PAL_B");
              }
But this has no effect.

2) Using IAMStreamConfig: I added the following lines to the SetupCaptureFormat function:
Code:
setStreamConfigSetting(_interfaceStreamConfigVideoCapture, "VideoStandard", AnalogVideoStandard.PAL_B);
Log.Log.Info("SetupCaptureFormat: set VideoStandard to PAL_B");
But this doesnt do anything. Btw, where is the output from Log.Log.WriteFile and Log.Log.Info stored? I cant find any logs in the TV Server installation folder.
Khurram is offline   Reply With Quote
Old 2008-12-03, 22:40   #154 (permalink)
Portal Developer
 
misterd's Avatar
 
Join Date: Apr 2006
Posts: 1,137
Thanks: 27
Thanked 38 Times in 26 Posts

Country:


Default

Quote:
Originally Posted by 5Hundred View Post
Hi misterd, i've successfully installed the plugin, and then i installed the mainconcept encoder. Neither MP or TVserver can "see" that i've installed the codec.

In other words, under the priority list in the TVserver to choose which encoder should be the number 1 priority i have only my intervideo encoder, is this because i installed the mainconcept encoder after installing your patch? Or is there something i can do to make the encoder be detected.

Thanks again
The TvServer has only a list of supported encoders. It doesn't search for other encoders. But you can add every encoder to this list with this patch. You just have to add the specific name of the video and audio encoder to the new table SoftwareEncoder. The TvServer can only detect them, if the name fits exactly to the one in the DB.

Quote:
Originally Posted by Khurram View Post
Thanks for the information. I hope we can all get 1.0.1 soon, but since 1.0 will be christmas time, so 1.0.1 will be sometime next year. In the meantime, I am going to try this out on my own

The way I would like to do this is to force PAL video for all sources because that all my channels are in PAL. I have 2 options:

1) Call IAMAnalogVideoDecoder->put_TVFormat() to force the TV format to PAL (many thanks to sub and carpeVideo over from GBPVR forums).

2) I have read in the directshow development forums at MSDN that this call is deprecated and the current way to do this is through IAMStreamConfig.

I have looked over the .cs files and it seems the bulk (all?) of filter graph is done in TvCardAnalog.cs. I have tried both ways but my code didnt work.

1)Using IAMAnalogVideoDecoder: Iadded the following lines to AddTvCaptureFilter function:
Code:
IAMAnalogVideoDecoder _filterCaptureVideoDecoder = (IAMAnalogVideoDecoder) _filterCapture;
              hr = _filterCaptureVideoDecoder.put_TVFormat(AnalogVideoStandard.PAL_B);
              if (hr == 0)
              {
                  Log.Log.WriteFile("analog: AddTvCaptureFilter forced tv format to PAL_B");
              }
              else
              {
                  Log.Log.WriteFile("analog: AddTvCaptureFilter cannot force tv format to PAL_B");
              }
But this has no effect.

2) Using IAMStreamConfig: I added the following lines to the SetupCaptureFormat function:
Code:
setStreamConfigSetting(_interfaceStreamConfigVideoCapture, "VideoStandard", AnalogVideoStandard.PAL_B);
Log.Log.Info("SetupCaptureFormat: set VideoStandard to PAL_B");
But this doesnt do anything. Btw, where is the output from Log.Log.WriteFile and Log.Log.Info stored? I cant find any logs in the TV Server installation folder.
All thos log lines are written to tv.log. To find them start SetupTv and click on "Open log directory".

Also using the IAMStreamConfig interface is a little bit more complicated than you thought. When you want to use the IAMAnalogVideoDecoder than you should add it to the RunGraph() method after starting the graph, because probably starting the graph resets your setting.

MisterD
misterd is offline   Reply With Quote
This User Say Thank You:
Old 2008-12-05, 12:37   #155 (permalink)
Portal Member
 
Join Date: May 2008
Posts: 72
Thanks: 9
Thanked 1 Time in 1 Post

Country:


Default

Quote:
Originally Posted by misterd View Post
All thos log lines are written to tv.log. To find them start SetupTv and click on "Open log directory".

Also using the IAMStreamConfig interface is a little bit more complicated than you thought. When you want to use the IAMAnalogVideoDecoder than you should add it to the RunGraph() method after starting the graph, because probably starting the graph resets your setting.
Yes, IAMStreamConfig is very complicated as compared to the older way. I have added the put_TVFormat in RunGraph() and it is successfully setting the capture device to PAL. Thanks again

Now I have 2 more problems:

1) The window doesnt seem to be correct; more precisely the height seems be incorrect as the picture is truncated towards the bottom. Using GetFrameSize() returns a size of 720x576. This looks ok, yet the picture problem is there. What else could be the problem?

2) I am getting no sound. Do I have to make a call to some other function other than set_TVFormat?
Khurram is offline   Reply With Quote
Old 2008-12-05, 19:39   #156 (permalink)
Portal Developer
 
misterd's Avatar
 
Join Date: Apr 2006
Posts: 1,137
Thanks: 27
Thanked 38 Times in 26 Posts

Country:


Default

Normally the set_TVFormat should be enough, but everything must be supported by your card. I mean the tv format, resolution, refresh rate etc.
ATM I have no clue why the picture is malformed and you have no sound.

MisterD
misterd is offline   Reply With Quote
Old 2008-12-05, 20:47   #157 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 156
Thanks: 3
Thanked 4 Times in 4 Posts

Country:

My System

Default

Hi misterd and thanks for your last advice, i was able to get my encoders working.

Interestingly this did not solve my problem, i'll explain what it is and maybe you know the answer.

My Pinnacle 7010ix has dual hybrid dvb-t / analogue, i believe i have it set up correctly with default settings for the most part in TVserver and using the Intervideo encoders.

When i start watching or recording channels via the analogue part they always start perfectly, after almost exactly 10 seconds there is a sort of a stutter heard in the audio and then thereafter the audio wobbles just a little, most evident when music like a piano is playing. The picture also appears less smooth from this point on.

The CPU seems to be runnin at 30%, hard drives are newish SATA and 2gb of RAM installed, so i think the hardware should cope.

Do you have any idea what event happens after 10 seconds which would change the analogue signal in this way?

Thanks
5Hundred is offline   Reply With Quote
Old 2008-12-12, 00:12   #158 (permalink)
juk
Portal Member
 
Join Date: Jul 2008
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts


Question questions

Hi,
just came across this thread and have a few questions:
- do I understand correctly that this patch should allow an Analog card with no hardware encoder to be used in MP (like the Blackgold 6in1 I am using - BlackGold Technology Ltd :: TV Tuner Products :: BGT3540 :: 6 in 1 :: Dual digital satellite, Dual digital terrestrial, Dual analogue terrestrial :: PCI express card), the drivers are installed and all tuners are seen by TVServer Config but I can't scan for channels or view already found channels from another card?
- I see there is a version for R4 - is there a version for RC3 (the release I am currently running) ?
- what is the best way to get encoders for this to work
- is there anything else that needs to be set for this work
and on the off chance, has anybody got this working with the Blackgold 6in1?

Thanks
juk is offline   Reply With Quote
Old 2008-12-12, 19:59   #159 (permalink)
Portal Developer
 
misterd's Avatar
 
Join Date: Apr 2006
Posts: 1,137
Thanks: 27
Thanked 38 Times in 26 Posts

Country:


Default

Quote:
Originally Posted by juk View Post
Hi,
just came across this thread and have a few questions:
- do I understand correctly that this patch should allow an Analog card with no hardware encoder to be used in MP (like the Blackgold 6in1 I am using - BlackGold Technology Ltd :: TV Tuner Products :: BGT3540 :: 6 in 1 :: Dual digital satellite, Dual digital terrestrial, Dual analogue terrestrial :: PCI express card), the drivers are installed and all tuners are seen by TVServer Config but I can't scan for channels or view already found channels from another card?
- I see there is a version for R4 - is there a version for RC3 (the release I am currently running) ?
- what is the best way to get encoders for this to work
- is there anything else that needs to be set for this work
and on the off chance, has anybody got this working with the Blackgold 6in1?

Thanks
The Tv-Server supports out-of-the-box analog cards without hardware encoders. The problem is that some cards require a specific software encoder. You should look at the SoftwareEncoder section in SetupTv (General settings -> Software encoder). If there no software encoder is marked as installed than your can't work and you have to install one or add an existing MPEG2 software encoder to the db table (only for advanced users).
There was a version for RC3, but I don't provide it anymore as RC4 is out now and I can't help anymore if you get any problems with it.
If you have installed the right encoder than normally everything should work, but there are some analogs cards that are currently not supported by the TvServer.

MisterD
misterd is offline   Reply With Quote
Old 2008-12-12, 21:10   #160 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 156
Thanks: 3
Thanked 4 Times in 4 Posts

Country:

My System

Default

@misterd It appears that my analog card when being used by MP is trying to record at 60HZ, (an NTSC RR) which is causing my issues as all TV here is PAL, this occurs with all the encoders that i have available to me. Is there a way to force MP to use PAL i.e. 50HZ only? The card functions fine with windvr and other TV software.
5Hundred is offline   Reply With Quote
Reply

Bookmarks

Tags
analog, cards, improvements, patch

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
Problems with several HW-encoding analog tuner cards pbb Development 3 2007-11-07 14:07
Are hardware-encoding analog cards supported? pbb Get Support 18 2007-07-01 22:16
Analog Channels Patch Italy!!! fenomeno83 General Support 0 2006-10-17 02:17
Which analog capture cards does the mediaportal team use? Richthofen Hardware Selection Help 5 2006-09-08 22:41
[Patch] MultiTuner Bug with different PVR cards FlipGer General Development (no feature request here!) 12 2006-01-06 08:21


All times are GMT +1. The time now is 11:47.


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