Am 28.07.24 um 15:09 schrieb Ramiro Polla: >>      if (st->codecpar->format == AV_PIX_FMT_NONE) { >> -        av_log(s, AV_LOG_ERROR, "Unsupported VS pixel format %s\n", >> info->format->name); >> +        if(vs->vsapi->getVideoFormatName(&info->format, vsfmt)) >> +            av_log(s, AV_LOG_ERROR, "Unsupported VS pixel format >> %s\n", vsfmt); >> +        else >> +            av_log(s, AV_LOG_ERROR, "Unsupported VS pixel format\n"); >>          err = AVERROR_EXTERNAL; >>          goto done; >>      } >> -    av_log(s, AV_LOG_VERBOSE, "VS format %s -> pixfmt %s\n", >> info->format->name, >> -           av_get_pix_fmt_name(st->codecpar->format)); >> - >> -    if (info->format->colorFamily == cmYCoCg) >> -        st->codecpar->color_space = AVCOL_SPC_YCGCO; >> +    if (vs->vsapi->getVideoFormatName(&info->format, vsfmt)) >> +        av_log(s, AV_LOG_VERBOSE, "VS format %s -> pixfmt %s\n", >> +               vsfmt, av_get_pix_fmt_name(st->codecpar->format)); >> +    else >> +        av_log(s, AV_LOG_VERBOSE, "VS format -> pixfmt %s\n", >> +               av_get_pix_fmt_name(st->codecpar->format)); > > Could you change this to have a single call go av_log()? Possibly using > a %s with a string for the unknown format. Same thing for the other > av_log() above. > > [...] It now prints "(unknown)" for a video format that VapourSynth cannot resolve. "(unknown)" is also printed at other places in ffmpeg in similar cases, so it's consistent. > > Also could you give us a very minimal test script to test this? I have attached a minimal test script, it will generate 10 frames each black, red, green, blue in 640x480, RGB24 Best regards Stefan