LinHES Forums
http://forum.linhes.org/

changing (ivtv) variables in the PVR-150 card?
http://forum.linhes.org/viewtopic.php?f=17&t=19823
Page 1 of 1

Author:  neutron68 [ Mon Apr 27, 2009 2:04 pm ]
Post subject:  changing (ivtv) variables in the PVR-150 card?

This question has come out of the discussion on page 3 of this thread:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=16505
I suspect this deserves a new thread since it is about video and the referenced thread is about audio...

tjc wrote:
neutron68 wrote:
Does the PVR-150 have a SHARPNESS variable that can be set?

Not that I'm aware of. Possibly one of the filter options or decimation but you'll need to do your own research. Start with:
Code:
v4l2-ctl --help | more
v4l2-ctl --list-ctrls-menus | more

TJC,

Thanks for the suggestion. I'm still hunting for a way to change the various video variables in the PVR-150 card.

I see in my /var/log/mythtv/changer1.log file that there are MANY video settings that are mentioned. One I am particularly interested in changing is temporal_filter. That setting determines how much time-smear is added to your video recordings. The smear shows up as a trails behind a moving object. If you watch carefully, you will see them. On my machine temporal_filtering is getting set to an 8. I'd rather have it at a 0 or 1.

Here is a sample from my changer1.log file so you can see all the video variables that are there.
Code:
Called as: /usr/local/bin/change1.sh 355
Setting channel to 355
Called as: /usr/local/bin/delayed_settings.sh 1 128 0 64 64 52428
At: Wed Apr  8 21:54:40 CDT 2009

Settings before:

User Controls

                     brightness (int)  : min=0 max=255 step=1 default=128 value=128 flags=slider
                       contrast (int)  : min=0 max=127 step=1 default=64 value=63 flags=slider
                     saturation (int)  : min=0 max=127 step=1 default=64 value=63 flags=slider
                            hue (int)  : min=-128 max=127 step=1 default=0 value=0 flags=slider
                         volume (int)  : min=0 max=65535 step=655 default=58880 value=58880 flags=slider
                        balance (int)  : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                           bass (int)  : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                         treble (int)  : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                           mute (bool) : default=0 value=0

MPEG Encoder Controls

                    stream_type (menu) : min=0 max=5 default=0 value=0 flags=update
              stream_vbi_format (menu) : min=0 max=1 default=0 value=0
       audio_sampling_frequency (menu) : min=0 max=2 default=1 value=1
           audio_encoding_layer (menu) : min=1 max=1 default=1 value=1 flags=update
         audio_layer_ii_bitrate (menu) : min=9 max=13 default=10 value=12
              audio_stereo_mode (menu) : min=0 max=3 default=0 value=0 flags=update
    audio_stereo_mode_extension (menu) : min=0 max=3 default=0 value=0 flags=inactive
                 audio_emphasis (menu) : min=0 max=2 default=0 value=0
                      audio_crc (menu) : min=0 max=1 default=0 value=0
                     audio_mute (bool) : default=0 value=0
                 video_encoding (menu) : min=0 max=1 default=1 value=1 flags=readonly
                   video_aspect (menu) : min=0 max=3 default=1 value=1
                 video_b_frames (int)  : min=0 max=33 step=1 default=2 value=2 flags=update
                 video_gop_size (int)  : min=1 max=34 step=1 default=12 value=15
              video_gop_closure (bool) : default=1 value=1
             video_bitrate_mode (menu) : min=0 max=1 default=0 value=0 flags=update
                  video_bitrate (int)  : min=0 max=27000000 step=1 default=6000000 value=4000000
             video_peak_bitrate (int)  : min=0 max=27000000 step=1 default=8000000 value=5500000
      video_temporal_decimation (int)  : min=0 max=255 step=1 default=0 value=0
                     video_mute (bool) : default=0 value=0
                 video_mute_yuv (int)  : min=0 max=16777215 step=1 default=32896 value=32896
            spatial_filter_mode (menu) : min=0 max=1 default=0 value=0 flags=update
                 spatial_filter (int)  : min=0 max=15 step=1 default=0 value=0 flags=slider
       spatial_luma_filter_type (menu) : min=0 max=4 default=0 value=1
     spatial_chroma_filter_type (menu) : min=0 max=1 default=0 value=1
           temporal_filter_mode (menu) : min=0 max=1 default=0 value=0 flags=update
                temporal_filter (int)  : min=0 max=31 step=1 default=0 value=8 flags=slider
             median_filter_type (menu) : min=0 max=4 default=0 value=0 flags=update
     median_luma_filter_minimum (int)  : min=0 max=255 step=1 default=0 value=0 flags=inactive slider
     median_luma_filter_maximum (int)  : min=0 max=255 step=1 default=255 value=255 flags=inactive slider
   median_chroma_filter_minimum (int)  : min=0 max=255 step=1 default=0 value=0 flags=inactive slider
   median_chroma_filter_maximum (int)  : min=0 max=255 step=1 default=255 value=255 flags=inactive slider
      insert_navigation_packets (bool) : default=0 value=0

Settings after:

User Controls

                     brightness (int)  : min=0 max=255 step=1 default=128 value=128 flags=slider
                       contrast (int)  : min=0 max=127 step=1 default=64 value=63 flags=slider
                     saturation (int)  : min=0 max=127 step=1 default=64 value=63 flags=slider
                            hue (int)  : min=-128 max=127 step=1 default=0 value=0 flags=slider
                         volume (int)  : min=0 max=65535 step=655 default=58880 value=58880 flags=slider
                        balance (int)  : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                           bass (int)  : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                         treble (int)  : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
                           mute (bool) : default=0 value=0

MPEG Encoder Controls

                    stream_type (menu) : min=0 max=5 default=0 value=0 flags=update
              stream_vbi_format (menu) : min=0 max=1 default=0 value=0
       audio_sampling_frequency (menu) : min=0 max=2 default=1 value=1
           audio_encoding_layer (menu) : min=1 max=1 default=1 value=1 flags=update
         audio_layer_ii_bitrate (menu) : min=9 max=13 default=10 value=12
              audio_stereo_mode (menu) : min=0 max=3 default=0 value=0 flags=update
    audio_stereo_mode_extension (menu) : min=0 max=3 default=0 value=0 flags=inactive
                 audio_emphasis (menu) : min=0 max=2 default=0 value=0
                      audio_crc (menu) : min=0 max=1 default=0 value=0
                     audio_mute (bool) : default=0 value=0
                 video_encoding (menu) : min=0 max=1 default=1 value=1 flags=readonly
                   video_aspect (menu) : min=0 max=3 default=1 value=1
                 video_b_frames (int)  : min=0 max=33 step=1 default=2 value=2 flags=update
                 video_gop_size (int)  : min=1 max=34 step=1 default=12 value=15
              video_gop_closure (bool) : default=1 value=1
             video_bitrate_mode (menu) : min=0 max=1 default=0 value=0 flags=update
                  video_bitrate (int)  : min=0 max=27000000 step=1 default=6000000 value=5000000
             video_peak_bitrate (int)  : min=0 max=27000000 step=1 default=8000000 value=7000000
      video_temporal_decimation (int)  : min=0 max=255 step=1 default=0 value=0
                     video_mute (bool) : default=0 value=0
                 video_mute_yuv (int)  : min=0 max=16777215 step=1 default=32896 value=32896
            spatial_filter_mode (menu) : min=0 max=1 default=0 value=0 flags=update
                 spatial_filter (int)  : min=0 max=15 step=1 default=0 value=0 flags=slider
       spatial_luma_filter_type (menu) : min=0 max=4 default=0 value=1
     spatial_chroma_filter_type (menu) : min=0 max=1 default=0 value=1
           temporal_filter_mode (menu) : min=0 max=1 default=0 value=0 flags=update
                temporal_filter (int)  : min=0 max=31 step=1 default=0 value=8 flags=slider
             median_filter_type (menu) : min=0 max=4 default=0 value=0 flags=update
     median_luma_filter_minimum (int)  : min=0 max=255 step=1 default=0 value=0 flags=inactive slider
     median_luma_filter_maximum (int)  : min=0 max=255 step=1 default=255 value=255 flags=inactive slider
   median_chroma_filter_minimum (int)  : min=0 max=255 step=1 default=0 value=0 flags=inactive slider
   median_chroma_filter_maximum (int)  : min=0 max=255 step=1 default=255 value=255 flags=inactive slider
      insert_navigation_packets (bool) : default=0 value=0

I just found this page "http://ivtvdriver.org/index.php/V4l2-ctl_(Examples)"
Copy everything inside the quotes into your web browser address line.

It seems to show an example of giving a value to the temporal_filter variable.
Quote:
v4l2-ctl --set-ctrl temporal_filter=0 ( Picture ghosting problems )

Can we insert this command line into the delayed_settings.sh script and have this parameter set to our liking? Like this?
Code:
/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl temporal_filter=0 >/dev/null

Or, is there a better place/file to make this change?

Eric

Author:  cecil [ Mon May 04, 2009 1:13 am ]
Post subject: 

What are you trying/want to do w/ the changes? You could put it in ~/.fluxbox/apps. That way it makes the changes you want when Fluxbox is started.

Author:  neutron68 [ Mon May 04, 2009 12:46 pm ]
Post subject:  video variables - goal

cecil wrote:
What are you trying/want to do w/ the changes? You could put it in ~/.fluxbox/apps. That way it makes the changes you want when Fluxbox is started.

My goal is to be able to tweak those video variables in the PVR-150 card. That temporal filtering creates a smearing effect I can detect in my PVR-150 recordings, so I really want it turned off (set to zero). When the value is above zero, the picture detail is reduced by the smearing effect. My goal is to see/record as much detail as possible.

I see that ~/.fluxbox/apps is a text file that resides in a user's /home directory.
Which user's apps file would I use? The mythtv user or root?

Would I just insert the video command line into that file and it will auto execute? Like this?
Code:
#[startup] {xscreensaver}
[startup] {xset -dpms s off}
[startup] {/usr/bin/x11vnc -nap -wait 50 -passwd mythtv -display :0 -forever -o$
[startup] {xvattr -a XV_COLORKEY -v 0}
[startup] {gnome-volume-manager}
[startup] {KnoppMyth-run}
[startup] {launch_irx.sh}
[app] (SDL_App)
  [Layer]       {2}
  [Deco]        {NONE}
[end]

/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl temporal_filter=0 >/dev/null

Eric

Author:  cecil [ Mon May 04, 2009 5:34 pm ]
Post subject: 

Code:
[startup] {/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl temporal_filter=0 >/dev/null}
Add that before KnoppMyth-run.

Author:  neutron68 [ Mon May 04, 2009 8:17 pm ]
Post subject:  thanks

cecil wrote:
Code:
[startup] {/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl temporal_filter=0 >/dev/null}
Add that before KnoppMyth-run.

Thanks for the direction. I will do that.

Is the ~/.fluxbox/apps like an autoexec.bat file which is specific to the specific user?

Eric

Author:  cecil [ Tue May 05, 2009 9:17 pm ]
Post subject: 

I suppose that would be an easy way to explain it. :)

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/