[PATCH] Improvements for analog cards (2 Viewers)

misterd

Retired Team Member
  • Premium Supporter
  • April 4, 2006
    1,597
    314
    Home Country
    Germany Germany
    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 ;)


    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.

    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.

    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
     

    5Hundred

    Portal Pro
    December 14, 2007
    166
    4
    Home Country
    New Zealand New Zealand
    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
     

    Khurram

    Portal Pro
    May 12, 2008
    211
    5
    Home Country
    Pakistan Pakistan
    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.
     

    misterd

    Retired Team Member
  • Premium Supporter
  • April 4, 2006
    1,597
    314
    Home Country
    Germany Germany
    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.

    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
     

    Khurram

    Portal Pro
    May 12, 2008
    211
    5
    Home Country
    Pakistan Pakistan
    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 :D

    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?
     

    misterd

    Retired Team Member
  • Premium Supporter
  • April 4, 2006
    1,597
    314
    Home Country
    Germany Germany
    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
     

    5Hundred

    Portal Pro
    December 14, 2007
    166
    4
    Home Country
    New Zealand New Zealand
    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
     

    juk

    MP Donator
  • Premium Supporter
  • July 11, 2008
    68
    3
    Wicklow - Ireland
    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
     

    misterd

    Retired Team Member
  • Premium Supporter
  • April 4, 2006
    1,597
    314
    Home Country
    Germany Germany
    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
     

    5Hundred

    Portal Pro
    December 14, 2007
    166
    4
    Home Country
    New Zealand New Zealand
    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.
     

    Users who are viewing this thread

    Top Bottom