Opened 6 years ago

Closed 6 years ago

#7387 closed defect (fixed)

FFmpeg 4.0+ blocks for Samba URLs

Reported by: boris-petrov Owned by:
Priority: important Component: avformat
Version: git-master Keywords: smb regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When FFmpeg is compiled with libsmb support, the following command works fine for FFmpeg 3.4.x:

ffprobe -of csv -show_entries format=duration:stream=codec_type,width,height,sample_rate,r_frame_rate "smb://192.168.88.182/sample.mp4"

The same command for FFmpeg 4.0.x blocks indefinitely.

Change History (9)

comment:1 by Carl Eugen Hoyos, 6 years ago

Keywords: smb regression added
Priority: criticalimportant

Is this issue only reproducible with ffprobe or also with ffmpeg -i smb://192.168.88.182/sample.mp4? Please test current FFmpeg git head and provide the command line together with the complete, uncut console output to make this a valid ticket.
And please run git bisect to find the commit introducing the regression.

comment:2 by boris-petrov, 6 years ago

The same issue can be reproduced with ffmpeg -i, yes. The master branch has the same bug and does not work.

Here is the command line for ffprobe 3.4.2:

%  ffprobe3.4 -of csv -show_entries format=duration:stream=codec_type,width,height,sample_rate,r_frame_rate "smb://192.168.88.182/sample.avi"
ffprobe version 3.4.2 Copyright (c) 2007-2018 the FFmpeg developers
  built with gcc 8.2.0 (GCC)
  configuration: --prefix=/usr --incdir=/usr/include/ffmpeg3.4 --libdir=/usr/lib/ffmpeg3.4 --shlibdir=/usr/lib/ffmpeg3.4 --disable-rpath --enable-gpl --enable-version3 --enable-nonfree --enable-shared --disable-static --enable-gray --enable-avresample --enable-alsa --enable-avisynth --enable-bzlib --enable-chromaprint --enable-frei0r --enable-gcrypt --enable-gmp --enable-gnutls --enable-iconv --enable-jack --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfdk-aac --enable-libflite --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libilbc --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencv --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-librtmp --enable-libshine --enable-libsmbclient --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lzma --enable-decklink --enable-libmysofa --enable-openal --enable-opencl --enable-opengl --enable-openssl --enable-sndio --enable-sdl2 --enable-xlib --enable-zlib --enable-libdrm --enable-libmfx --enable-nvenc --enable-omx --enable-omx-rpi --enable-rkmpp --enable-vaapi --enable-vdpau
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[mp3 @ 0x5594217307a0] Header missing
    Last message repeated 6 times
Input #0, avi, from 'smb://192.168.88.182/sample.avi':
  Metadata:
    encoder         : GOM Encoder (GAviWriter 1.0)
  Duration: 01:41:39.28, start: 0.000000, bitrate: 963 kb/s
    Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 624x404 [SAR 1:1 DAR 156:101], 825 kb/s, 25 fps, 25 tbr, 25 tbn, 30k tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
stream,video,624,404,25/1
stream,audio,48000,0/0
format,6099.280000

This is for 4.0.2:

%  ffprobe -of csv -show_entries format=duration:stream=codec_type,width,height,sample_rate,r_frame_rate "smb://192.168.88.182/sample.avi"
ffprobe version 4.0.2 Copyright (c) 2007-2018 the FFmpeg developers
  built with gcc 8.2.0 (GCC)
  configuration: --prefix=/usr --extra-cflags=-I/opt/cuda/include --extra-ldflags=-L/opt/cuda/lib64 --disable-rpath --enable-gpl --enable-version3 --enable-nonfree --enable-shared --disable-static --enable-gray --enable-avresample --enable-alsa --enable-avisynth --enable-bzlib --enable-chromaprint --enable-frei0r --enable-gcrypt --enable-gmp --enable-gnutls --enable-iconv --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdc1394 --enable-libfdk-aac --enable-libflite --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libilbc --enable-libjack --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-libopencv --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-librtmp --enable-libshine --enable-libsmbclient --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtesseract --enable-libtheora --disable-libtls --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-lzma --enable-decklink --enable-libndi_newtek --enable-libmysofa --enable-openal --enable-opencl --enable-opengl --disable-openssl --enable-sndio --enable-sdl2 --enable-xlib --enable-zlib --enable-cuda-sdk --enable-cuvid --enable-ffnvcodec --enable-libdrm --enable-libmfx --enable-libnpp --enable-nvdec --enable-nvenc --enable-omx --enable-omx-rpi --enable-rkmpp --enable-v4l2-m2m --enable-vaapi --enable-vdpau
  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
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100

(in this case ffprobe has blocked).

I'll need time for the bisect. Will post here when/if I manage to do it.

comment:3 by boris-petrov, 6 years ago

Bisecting is hard because all commits before c6558e8840fbb2386bf8742e4d68dd6e067d262e can't be compiled with my version of x264 (it says libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’?. I tried commit 2f96190732d15510ba29471fa45d66841c0c3df1 (which is a couple after the one that fixes x264 compilation) and it was broken. So the issue appears somewhere before that.

comment:4 by Carl Eugen Hoyos, 6 years ago

You could remove --enable-libx264 for the bisect.

comment:5 by boris-petrov, 6 years ago

@cehoyos - obviously. Sorry for me being silly!

So the offending commit is 858db4b01fa2b55ee55056c033054ca54ac9b0fd. I guess that should be enough to pinpoint the problem? Please tell me if I can help more (apart from debugging myself :D)!

Last edited 6 years ago by Carl Eugen Hoyos (previous) (diff)

comment:7 by boris-petrov, 6 years ago

Wow, thanks for the immediate support, guys! This patch does fix the issue. It will be in 4.0.3 I guess?

comment:8 by Cigaes, 6 years ago

It has been pushed.

Including to branch/4.0, so it should be in the next release. But unless you manage a software distribution, you should not be using releases anyway.

comment:9 by Carl Eugen Hoyos, 6 years ago

Component: undeterminedavformat
Resolution: fixed
Status: newclosed
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.