I'm trying to run the VideoPose3D model on a compute cluster at my university, but I've run into an issue where the infer_video.py script (run inside Detectron) breaks due to ffprobe. The command in question is:
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 filename_here
It's supposed to return a tuple of width,height of the input video. This script worked fine in the past, but on the videos I'm using now, I get a segfault. For context, here is the output of running it on the compute cluster (Ubuntu):
$ ffprobe data/test/00001/00001.mp4
ffprobe version 4.0.3 Copyright (c) 2007-2018 the FFmpeg developers
built with gcc 8.1.0 (GCC)
configuration: --prefix=/share/pkg.7/ffmpeg/4.0.3/install --enable-gpl --enable-libx264 --enable-hardcoded-tables --enable-pic --enable-shared --enable-lto
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Segmentation fault
Here's the output of the same command on my local machine (Windows 10):
$ ffprobe data\test\00001\00001.mp4
ffprobe version 4.2.1 Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
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
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'data\test\00001\00001.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:02:52.18, start: 0.000000, bitrate: 1643 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1512 kb/s, 24 fps, 24 tbr, 90k tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
This leads me to believe it has something to do with the version of ffprobe, but I have no control over the version installed on the compute cluster. It also doesn't explain why it worked once on a video previously. Does anyone have any insight? I also have the full debug output of running ffprobe on the compute cluster in a gist, here.
EDIT: Further context that may be useful, and leads me to believe it's a version issue, the videos that populate my data directory are acquired with youtube-dl. When I try to use youtube-dl on the compute cluster, it fails because ffmpeg throws an error when attempting to mux the audio and video streams. No such error happens when I run the script locally (with a newer version of ffmpeg).
The one time ffmpeg worked on the compute cluster, the video in question didn't have an audio stream, just video. Is this a known issue with older versions of ffmpeg? Should I get around this by just using a docker container with a higher version of ffmpeg, or are there any other workarounds people suggest?