GithubHelp home page GithubHelp logo

Comments (4)

low-batt avatar low-batt commented on September 22, 2024

It is desirable to capture evidence of what is going wrong before attempting to fix the problem by clearing settings.

IINA stores settings using the macOS defaults system. Settings can be accessed using the defaults command in Terminal. Open Terminal and run this command:

defaults read com.colliderli.iina savedVideoFilters

And this command:

defaults read com.colliderli.iina savedAudioFilters

Capture the output and post it here. This is what it looks like when I run these commands:

Video filters:
low-batt@gag ~$ defaults read com.colliderli.iina savedVideoFilters
(
        {
        filterString = "format=colormatrix=auto:colorlevels=full:convert=no:primaries=auto";
        name = format;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "crop=1024:720:0:0";
        name = crop;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "lavfi=[unsharp=5:5:0.18171875:5:5:0.18171875]";
        name = sharp;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "lavfi=[delogo=w=1:x=1:y=1:h=1]";
        name = delogo;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = vflip;
        name = flip;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "lavfi=[format=yuv444p,split=4[a][b][c][d],[a]waveform[aa],[b][aa]vstack[V],[c]waveform=m=0[cc],[d]vectorscope=color4[dd],[cc][dd]vstack[V2],[V][V2]hstack]";
        name = format2;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "lavfi=[lut3d=interp=trilinear:file=/Users/low-batt/Documents/builds/iina/issue-3620/35 Free LUTs/Faded 47.CUBE]";
        name = faded;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "oscilloscope=y=0:x=%3%0.5:s=1";
        name = oscilloscope;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "@iina_flip:vflip";
        name = vflip;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "crop=200:200::";
        name = "custom crop";
        shortcutKey = T;
        shortcutKeyModifiers = s;
    },
        {
        filterString = "lavfi=[unsharp=5:5:0.159375:5:5:0.159375]";
        name = "issue-4930";
        shortcutKey = "";
        shortcutKeyModifiers = "";
    }
)
low-batt@gag ~$ 
Audio filters:
low-batt@gag ~$ defaults read com.colliderli.iina savedAudioFilters
(
        {
        filterString = "scaletempo=stride=8:overlap=1:search=10:scale=%3%0.4:speed=pitch";
        name = scaletempo;
        shortcutKey = "N";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "scaletempo=speed=pitch:scale=2:overlap=1:stride=8:search=10";
        name = scaletempo;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "@iina_aeq9:lavfi=[anequalizer=c0 f=16000.0 w=13063.945299020566 g=0.0|c1 f=16000.0 w=13063.945299020566 g=0.0]";
        name = eq;
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "lavfi=[rubberband=pitch=1.05946]";
        name = "Pitch +1";
        shortcutKey = "";
        shortcutKeyModifiers = "";
    },
        {
        filterString = "scaletempo2=max-speed=16";
        name = "mute-at-16x";
        shortcutKey = "";
        shortcutKeyModifiers = "";
    }
)
low-batt@gag ~$ 

Before attempting to clear the problem it would be good to collect log files, especially the mpv log file. To enable logging follow these instructions:

  • Start IINA
  • Click on Settings… under the IINA menu
  • The settings panel appears
  • On the left side of the panel click on Advanced
  • Slide the Enable advanced settings toggle button to be on (blue)
  • Click on the checkbox Enable logging to file
  • Restart IINA to activate logging

Once IINA has restarted, reproduce the problem. Then:

  • Click on Settings… under the IINA menu
  • The settings panel appears
  • On the left side of the panel click on Advanced
  • Click on Open log directory
  • A new Finder window appears containing the logs for this session
  • Quit IINA to complete the log files

The Finder window contains two files, iina.log and mpv.log. To attach the log files to this issue, drag-n-drop them from the Finder window to the Leave a comment section below. Include both the iina.log and the mpv.log

The log files can also be accessed using Terminal as shown here:

low-batt@gag com.colliderli.iina$ pwd
/Users/low-batt/Library/Logs/com.colliderli.iina
low-batt@gag com.colliderli.iina$ ls
2022-10-04-17-57-15_jVrbWy
low-batt@gag com.colliderli.iina$ cd 2022-10-04-17-57-15_jVrbWy
low-batt@gag 2022-10-04-17-57-15_jVrbWy$ ls
iina.log	mpv.log
low-batt@gag 2022-10-04-17-57-15_jVrbWy$ 

With logging enabled IINA creates a new log directory each time it is started. If accessing the logs using Terminal be sure to obtain them from the latest log directory.

DO NOT FORGET to disable logging once you have obtained log files for the problem being investigated. IINA does not restrict the size of log files or delete old logs. If you leave logging enabled the logs will continue to accumulate.

Saved filters can be cleared by deleting the assocated setting:

defaults delete com.colliderli.iina savedVideoFilters

As we don't know what is going wrong, I can't say if that will fix the problem.

Attempting to add a mpv filter with the name sharpen and a value of 4 fails because mpv does not provide a filter named sharpen. The available filters can be found here.

A value of 4 is accepted by the mpv sharpen option:

--sharpen=<value>
If set to a value other than 0, enable an unsharp masking filter. Positive values will sharpen the image (but add more ringing and aliasing). Negative values will blur the image.

I believe that option merely provides an easy way of adding a FFmpeg unsharp filter.

from iina.

low-batt avatar low-batt commented on September 22, 2024

Another place filter setting are retained is in the Watch Later file for the video being played. This mpv feature is used by IINA's somewhat deceptively named Resume last playback position setting. That setting is enabled by default. It saves more than the playback position.

With that setting enabled, I played a file, applied a filter and quit IINA before reaching the end of the video. I then checked what option values were saved:

low-batt@gag ~$ md5 -qs '/Users/low-batt/Movies/big_buck_bunny.mp4' | xargs -I % cat ~/Library/Application\ Support/com.colliderli.iina/watch_later/%
start=3.350000
pause=yes
volume=42.000000
vf=format=convert=no:colorlevels=full:colormatrix=auto:primaries=auto
low-batt@gag ~$ 

You can see the video filter (vf) was saved and will be restored if I play this video again.

The easiest way to clear such files is to disable the Resume last playback position setting. It is found on the General tab of IINA's settings in the Behavior section.

from iina.

zexcster avatar zexcster commented on September 22, 2024

Thank you for answering,

Found the cause, it's the Pixel Format and might be the inbuilt FFmpeg version

yuv420p10 this one ignores sharpening (I have several different files with this code all of them ignores sharpening)

yuv420p this one is ok

2 workarounds

  1. a long one

to convert the same file with either

ffmpeg -i in_file -filter:v "format=yuv420p" out_file
ffmpeg -i in_file -pix_fmt yuv420p out_file

But it's a realtime process per file, so not really helpful

  1. a working one

to add a custom FFmpeg filter

Name:
format
Value:
pix_fmts=yuv420p

result:
lavfi=[format=pix_fmts=yuv420p]

you need to activate the "pixels" first and only then any FFmpeg filter affected by Pixel Format

so a temp solution is above

from iina.

hooke007 avatar hooke007 commented on September 22, 2024

I believe that option merely provides an easy way of adding a FFmpeg unsharp filter.

No. --sharpen is a hook shader. Not a ffmpeg filter.

See
https://github.com/mpv-player/mpv/blob/8e7d442f08b0e509ff2ee4ad5c9b71dbce8b3598/video/out/gpu/video_shaders.c#L1019

from iina.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.