VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Since ffmpegs noise filter is ported from mplayers noise filter.
    I was wondering if someone here can tell me how to convert some mplayer noise calls to ffmpeg?

    mplayers option to add noise:
    Code:
    noise[=luma[u][t|a][h][p]:chroma[u][t|a][h][p]]
      Adds noise.
         <0-100>
              luma noise
         <0-100>
              chroma noise
         u    uniform noise (gaussian otherwise)
         t    temporal noise (noise pattern changes between frames)
         a    averaged temporal noise (smoother, but a lot slower)
         h    high quality (slightly better looking, slightly slower)
         p    mix random noise with a (semi)regular pattern
    So for mplayer I can in example use:
    - 'noise=5t' to add temporal luma noise with a strength of 5
    - 'noise=5t:5t' to add temporal luma&chroma noise with a strength of 5
    - 'noise=11p:30u' to add random luma noise with a strength of 11 and uniform chroma noise with a strength of 30
    - 'noise=9thp:5utahp' to add temporal high quality random luma noise with a strength of 9 and uniform averaged high quality random chroma noise

    How I understood it, for both (mplayer and ffmpeg):
    The strength sets amount of noise added to pixel and amount of pixels that have noise added.
    Thus 0 for strength should return unmodified video.

    Problem is: I don't quite get how to map this to ffmpeg.

    ffmpegs option to add noise:
    Code:
    Add noise on video input frame.
    
    The filter accepts the following options:
    
    all_seed
    c0_seed
    c1_seed
    c2_seed
    c3_seed
    Set noise seed for specific pixel component or all pixel components in case of all_seed. Default value is 123457.
    
    all_strength, alls
    c0_strength, c0s
    c1_strength, c1s
    c2_strength, c2s
    c3_strength, c3s
    Set noise strength for specific pixel component or all pixel components in case all_strength. Default value is 0. Allowed range is [0, 100].
    
    all_flags, allf
    c0_flags, c0f
    c1_flags, c1f
    c2_flags, c2f
    c3_flags, c3f
    Set pixel component flags or set flags for all components if all_flags. Available values for component flags are:
    
        a
            averaged temporal noise (smoother) 
        p
            mix random noise with a (semi)regular pattern 
        t
            temporal noise (noise pattern changes between frames) 
        u
            uniform noise (gaussian otherwise)
    atm. I would guess that
    - mplayer "noise=5t:5t", would map to ffmpeg "noise=alls=5:allf=t"
    but I don't quite get how the luma&chroma differentiation and different strength can be translated into the ffmpeg syntax.


    -> Does someone know how to do this?

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  2. Originally Posted by Selur View Post
    Since ffmpegs noise filter is ported from mplayers noise filter.
    I was wondering if someone here can tell me how to convert some mplayer noise calls to ffmpeg?

    mplayers option to add noise:
    Code:
    noise[=luma[u][t|a][h][p]:chroma[u][t|a][h][p]]
      Adds noise.
         <0-100>
              luma noise
         <0-100>
              chroma noise
         u    uniform noise (gaussian otherwise)
         t    temporal noise (noise pattern changes between frames)
         a    averaged temporal noise (smoother, but a lot slower)
         h    high quality (slightly better looking, slightly slower)
         p    mix random noise with a (semi)regular pattern
    So for mplayer I can in example use:
    - 'noise=5t' to add temporal luma noise with a strength of 5
    - 'noise=5t:5t' to add temporal luma&chroma noise with a strength of 5
    - 'noise=11p:30u' to add random luma noise with a strength of 11 and uniform chroma noise with a strength of 30
    - 'noise=9thp:5utahp' to add temporal high quality random luma noise with a strength of 9 and uniform averaged high quality random chroma noise

    How I understood it, for both (mplayer and ffmpeg):
    The strength sets amount of noise added to pixel and amount of pixels that have noise added.
    Thus 0 for strength should return unmodified video.

    Problem is: I don't quite get how to map this to ffmpeg.

    ffmpegs option to add noise:
    Code:
    Add noise on video input frame.
    
    The filter accepts the following options:
    
    all_seed
    c0_seed
    c1_seed
    c2_seed
    c3_seed
    Set noise seed for specific pixel component or all pixel components in case of all_seed. Default value is 123457.
    
    all_strength, alls
    c0_strength, c0s
    c1_strength, c1s
    c2_strength, c2s
    c3_strength, c3s
    Set noise strength for specific pixel component or all pixel components in case all_strength. Default value is 0. Allowed range is [0, 100].
    
    all_flags, allf
    c0_flags, c0f
    c1_flags, c1f
    c2_flags, c2f
    c3_flags, c3f
    Set pixel component flags or set flags for all components if all_flags. Available values for component flags are:
    
        a
            averaged temporal noise (smoother) 
        p
            mix random noise with a (semi)regular pattern 
        t
            temporal noise (noise pattern changes between frames) 
        u
            uniform noise (gaussian otherwise)
    atm. I would guess that
    - mplayer "noise=5t:5t", would map to ffmpeg "noise=alls=5:allf=t"
    but I don't quite get how the luma&chroma differentiation and different strength can be translated into the ffmpeg syntax.


    -> Does someone know how to do this?

    Cu Selur

    noise=alls=5:allf=t works for all planes - set separate planes (channels) assuming that Y is firsts channel, Cb and Cr next second and third.

    noise=c0s=5:c0f=t:c1s=5:c1f=t:c2s=5:c2f=t
    Quote Quote  
  3. Okay, that is what I first thought too:

    all... = all channels

    c0 = Y = luma channel
    c1+c2 = chroma channel
    c1 = Cb
    c2 = Cr
    but what about c3 ?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Originally Posted by Selur View Post
    Okay, that is what I first thought too:

    all... = all channels

    c0 = Y = luma channel
    c1+c2 = chroma channel
    c1 = Cb
    c2 = Cr
    but what about c3 ?
    alpha
    generalized way is 3 channels for video + additional channel for alpha (transparency) (it works for every known to me component video representation)
    Quote Quote  
  5. Doh,... alpha,... totally forgot about alpha

    Thanks!
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. Originally Posted by Selur View Post
    Doh,... alpha,... totally forgot about alpha

    Thanks!
    NP, glad to help, even if on ffmpeg: "I am only an egg"*

    Stranger in a Strange Land, author Robert A. Heinlein.
    Quote Quote  



Similar Threads