Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error getting snapshop from AVI file #492

Open
mikevbaker opened this issue Dec 11, 2023 · 0 comments
Open

Error getting snapshop from AVI file #492

mikevbaker opened this issue Dec 11, 2023 · 0 comments

Comments

@mikevbaker
Copy link

I have a really simple project that's supposed to create an image snapshot from each of the AVI files found in a folder.

private async void BtnProcess_Click(object sender, EventArgs e)
{
    if (Directory.Exists(TbFolderName.Text))
    {
        string[] files = Directory.GetFiles(TbFolderName.Text, "*.avi");

        foreach (string file in files)
        {
            await ProcessFile(file);
        }
    }
}

private async Task ProcessFile(string file)
{
    Debug.WriteLine(file);

    var mediaInfo = await FFProbe.AnalyseAsync(file);
    try
    {
        bool result = await FFMpeg.SnapshotAsync(file, file.Replace("avi", "png"));
        Debug.WriteLine($"{file.Replace("avi", "png")} {result}");
    }
    catch (Exception ex)
    {
        Debug.WriteLine(ex);
    }
}

I'm getting a really long error - the important part (I believe) is this
[swscaler @ 0000019edefcdf40] deprecated pixel format used, make sure you did set range correctly

With the Snapshot[Async] functions I don't see the option to set the pixel format. Can anyone tell me how I can deal with these files?

More info from the error output...

ffmpeg exited with non-zero exit-code (69 - ffmpeg version 4.4.1-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.0 (Rev1, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[avi @ 0000019edeafc880] non-interleaved AVI
[h264 @ 0000019edeafe880] missing picture in access unit with size 20
[h264 @ 0000019edeafe880] no frame!
[h264 @ 0000019edeafe880] missing picture in access unit with size 8
[h264 @ 0000019edeafe880] no frame!
[h264 @ 0000019edeafe880] missing picture in access unit with size 10
[h264 @ 0000019edeafe880] no frame!
[h264 @ 0000019edeafe880] missing picture in access unit with size 20
[h264 @ 0000019edeafe880] no frame!
[h264 @ 0000019edeafe880] missing picture in access unit with size 8
[h264 @ 0000019edeafe880] no frame!
[h264 @ 0000019edeafe880] missing picture in access unit with size 10
[h264 @ 0000019edeafe880] no frame!
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'D:\PathToVideo\VideoFileSample.avi':
  Duration: 00:00:12.52, start: 0.000000, bitrate: 1496 kb/s
  Stream #0:0: Video: h264 (Baseline) (h264 / 0x34363268), yuvj420p(pc, bt470bg/bt470bg/bt709, progressive), 1280x720, 1461 kb/s, 29 fps, 29 tbr, 29 tbn, 58 tbc
  Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s16p, 32 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[NULL @ 0000019edeafe880] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0000019edeb2b3c0] non-existing PPS 0 referenced
[h264 @ 0000019edeb2b3c0] decode_slice_header error
[h264 @ 0000019edeb2b3c0] no frame!
[NULL @ 0000019edeafe880] non-existing PPS 0 referenced
[h264 @ 0000019edeb25d40] non-existing PPS 0 referenced

that last part repeats for about 1500 lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant