magdesign / Vidifold

Wiki and Bug report repo for https://vidifold.com
3 stars 0 forks source link

Can not import movies #26

Closed magdesign closed 1 year ago

magdesign commented 2 years ago

when importing a movie, I always get following error and it crashes:

[swscaler @ 0x56273c444340] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/home/magdesign/VIDIFOLD/convert/frame-%08d.jpg':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf58.29.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2022-05-15T00:58:48.000000Z
      handler_name    : VideoHandler
      timecode        : 01:00:00:00
      encoder         : Lavc58.54.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=   77 fps=0.0 q=1.0 Lsize=N/A time=00:00:02.56 bitrate=N/A speed=6.47x    
video:1298kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
terminate called after throwing an instance of 'std::runtime_error'
  what():  Library get-create bank should never be passed an empty label
Aborted (core dumped)
ghost commented 2 years ago

the "deprecated pixel format used, make sure you did set range correctly" can be ignored

"Lavf mjpeg" mmmm.... I think this means your trying to import a mjpeg clip? not tried that before. Ideally, I'd like to get my hands on the actual file you are trying to import to be sure, but if not, can you confirm the codec 'eg. via VLC > tools > video codec information' or however you would normally do it. In the mean time I'll see if I can reproduce. Cheers.

ghost commented 2 years ago

had success downloading and importing some mjpegs here. Looking again at the error, it looks like its more to do with ffmpeg then anything I'm doing.

ghost commented 2 years ago

I could do with a file like this, so I can improve recovery from the ffmpeg crash, any chance you could point me at an offending file? could send a link to vidifold@gmail. cheers.

magdesign commented 2 years ago

sorry for the late replay, was busy producing our exhibition (with using vidifold!), the workaround I used was converting the movie to matroska format and then importing worked.

Here a file which is causing vidifold to crash on import: https://www.swisstransfer.com/d/9df801e2-a491-4aed-86e4-5df08f56e092 The file is made with DaVinci Resolve, AVC CABAC MPEG-4, they say its a h264 mp4, on Linux.

ghost commented 2 years ago

Hi, cool, hope it all works out. Big thank you for the file. Unfortunately, it just loaded in with no problems here. Must be some difference in the ffmpeg versions :( I haven't done anything special with mine, just went with what was default.

ffmpeg -version

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100

do you want to post yours here, or shall we close this ticket for now?

ghost commented 2 years ago

I've just twigged that the metadata you sent over is from the frame extraction, which does indeed map h264 > mjpeg. This was the source of my confusion with the file type. Anyway, no idea yet why it fails for you.

magdesign commented 2 years ago

My ffmpeg version:

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)

I have one proprietary mpeg video codec (RVA) installed, maybe this is causing the issue...

thanks for looking into it!

magdesign commented 2 years ago

I will close this issue since I can not figure out if its an issue on vidifold, ffmpeg or the RVA codec.

If someone else have the same trouble, please re-open.

ghost commented 2 years ago

Hi again, apologies, but I think I've twigged the problem.

It was me, I didn't see the error at all as it was a new check I'd forgotten I'd added recently after seeing a blank 'Bank' label (which could cause a lot of problems). I'm not 100% sure why, but I suspect it's to do with character encodings in the file path. I've put a 'Default' option rather than this exception.

Funnily enough, I've just been researching encoding problems in C++, and it's starting to look like a nightmare, it seems that a lot of the basic string functions are not safe! Silly me thinking that string manipulation would be simple and robust by now.

I mostly use PHP at work where this is so much easier.

Anyway,

New version uploaded to site, v0.31.10, hopefully that should help.

magdesign commented 2 years ago

Great, I will test with the new version and report...