Страница 1 из 1

ffprobe не завершает работу

Добавлено: 2016-11-25 17:03:35
Abyrvalg
Привет тебе, о всемогущий All!

Пересобирал из сырцов ffmpeg 3.x и столкнулся со странностью. Всё собирается, всё ок. Запускаю потом простейшую команду, напр.:

Код: Выделить всё

ffprobe udp://234.8.3.50:1234
чтобы получить инфу о мультимедийном потоке.
ffprobe, как положено, вываливает мне инфу. А дальше по идее он должен, собственно, вернуть меня в командную строку... А вот на этом получается затык. Висит, висит, пока его не прервёшь по Ctrl+C.

Я попробовал его потрассировать:

Код: Выделить всё

sudo truss ffprobe udp://234.8.3.50:1234
Вот концовка:

Код: Выделить всё

...
write(2,"\n",1)                                  = 1 (0x1)
    Stream #0:1write(2,"    Stream #0:1",15)                     = 15 (0xf)
[0x1f6]write(2,"[0x1f6]",7)                              = 7 (0x7)
: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/swrite(2,": Audio: mp2 ([3][0][0][0] / 0x0"...,70) = 70 (0x46)

write(2,"\n",1)                                  = 1 (0x1)
recvfrom(4,"G\^A\M-u\^\\M^^H&\M^@\M-3K\M^H2"...,65536,0x0,NULL,0x0) = 1316 (0x524)
madvise(0x80dad8000,0x9000,0x5,0x2d7,0x7fffffffd780,0x80c000000) = 0 (0x0)
madvise(0x80daa5000,0x1000,0x5,0x2a4,0x7fffffffd780,0x80c000000) = 0 (0x0)
madvise(0x80d90b000,0x9000,0x5,0x10a,0x7fffffffd780,0x80c000000) = 0 (0x0)
madvise(0x80d7cf000,0x1f000,0x5,0x3ce,0x80c400000,0x7fffffffd7a0) = 0 (0x0)
madvise(0x80d248000,0x9000,0x5,0x247,0x80d400000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80c72d000,0x20000,0x5,0x32c,0x80c000000,0x7fffffffd7a0) = 0 (0x0)
madvise(0x80c702000,0x21000,0x5,0x301,0x80c000000,0x7fffffffd7a0) = 0 (0x0)
madvise(0x80daaa000,0x25000,0x5,0x2a9,0x7fffffffd7b0,0xffffffff) = 0 (0x0)
madvise(0x80d916000,0x1f000,0x5,0x115,0x7fffffffd7b0,0xffffffff) = 0 (0x0)
recvfrom(4,"G\^A\M-u\^S\^OS,\M^H\M-6\M-}\M^\"...,65536,0x0,NULL,0x0) = 1316 (0x524)
madvise(0x80d906000,0x4000,0x5,0x105,0x7fffffffd7b0,0xffffffff) = 0 (0x0)
madvise(0x80d7f7000,0x9000,0x5,0x3f6,0x80c000000,0x7fffffffd7a0) = 0 (0x0)
madvise(0x80d6e4000,0x15000,0x5,0x2e3,0x80c000000,0x7fffffffd7a0) = 0 (0x0)
madvise(0x80c724000,0x1000,0x5,0x323,0x80d400000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80c407000,0x2b000,0x5,0x7,0x80d400000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80dacf000,0x9000,0x5,0x2ce,0x7fffffffd7b0,0x1) = 0 (0x0)
madvise(0x80da85000,0x20000,0x5,0x284,0x7fffffffd7b0,0x1) = 0 (0x0)
madvise(0x80d8f7000,0xb000,0x5,0xf6,0x7fffffffd7b0,0x1) = 0 (0x0)
recvfrom(4,"G\^A\M-u\^Zt\M-h\M-C\M->\n\^?"...,65536,0x0,NULL,0x0) = 1316 (0x524)
madvise(0x80d7ef000,0x4000,0x5,0x3ee,0x80d800000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80d3fe000,0x2000,0x5,0x3fd,0x80c000000,0x7fffffffd7a0) = 0 (0x0)
madvise(0x80d3fc000,0x1000,0x5,0x3fb,0x80c000000,0x7fffffffd7a0) = 0 (0x0)
madvise(0x80c7ff000,0x1000,0x5,0x3fe,0x80d000000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80c725000,0x8000,0x5,0x324,0x80d000000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80c723000,0x1000,0x5,0x322,0x80d000000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80c3ef000,0xe000,0x5,0x3ee,0x80ac00000,0x7fffffffd790) = 0 (0x0)
madvise(0x80c3cf000,0x1e000,0x5,0x3ce,0x80ac00000,0x7fffffffd790) = 0 (0x0)
madvise(0x80dae3000,0x52000,0x5,0x2e2,0x7fffffffd7c0,0x1) = 0 (0x0)
recvfrom(4,"G\^A\M-u\^Q\^T\M^Z\M-t\M-w\M-8j"...,65536,0x0,NULL,0x0) = 1316 (0x524)
madvise(0x80c337000,0x3000,0x5,0x336,0x80ac00000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80c0af000,0x9000,0x5,0xae,0x80ac00000,0x7fffffffd7c0) = 0 (0x0)
madvise(0x80afff000,0x1000,0x5,0x3fe,0x80c000000,0x7fffffffd7e0) = 0 (0x0)
madvise(0x80affb000,0x2000,0x5,0x3fa,0x80c000000,0x7fffffffd7e0) = 0 (0x0)
madvise(0x80aff1000,0x9000,0x5,0x3f0,0x80c000000,0x7fffffffd7e0) = 0 (0x0)
munmap(0x80b800000,8388608)                      = 0 (0x0)
setsockopt(0x4,0x0,0xd,0x7fffffffe0d0,0x8,0x7fffffffd820) = 0 (0x0)
recvfrom(4,0x80aca9118,65536,0x0,0x0,0x0)        ERR#4 'Interrupted system call'
thr_kill(0x188b8,0x20,0x1,0x0,0x8,0x7fffffffd820) = 0 (0x0)
SIGNAL 32 (?)
sigreturn(0x7fffffbfdb20,0x7fffffbfdb20,0x80ac07400,0x1,0x0,0x1) ERR#4 'Interrupted system call
'
Когда жму Ctrl + C, процесс завершается:

Код: Выделить всё

^Crecvfrom(4,0x80aca9118,65536,0x0,0x0,0x0)      ERR#4 'Interrupted system call'
SIGNAL 2 (SIGINT)
process exit, rval = 0
Какой-то сигнал 32...

Пробовал пересобирать ffmpeg 3.1.3, 3.1.5, 3.2.0. Всё одно и то же.
При этом на этой же системе (FreeBSD 9.3) до вчерашнего дня всё работало ок. Ничего не менялось в системе.

Для сравнения, вот ffprobe 2.8.8, который корректно отрабатывает на другой машинке с такой же системой:

Код: Выделить всё

...
write(2,"\n",1)                                  = 1 (0x1)
    Stream #0:1write(2,"    Stream #0:1",15)                     = 15 (0xf)
: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 256 kb/swrite(2,": Audio: ac3 ([0] [0][0] / 0x200"...,68) = 68 (0x44)

write(2,"\n",1)                                  = 1 (0x1)
__sysctl(0xbfbfe06c,0x2,0xbfbfe078,0xbfbfe074,0x0,0x0) = 0 (0x0)
_umtx_op(0xbfbfdf8c,0x3,0x1,0x0,0x0,0x1a)        = 0 (0x0)
mprotect(0x0,0,PROT_NONE)                        = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)                 = 0 (0x0)
mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 671641600 (0x28087000)
mmap(0xbf8fd000,1052672,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_STACK,-1,0x0) = -1081094144 (0xbf8fd000)
mprotect(0xbf8fd000,4096,PROT_NONE)              = 0 (0x0)
thr_new(0xbfbfe010,0x34,0x297cc0eb,0x29868574,0x1dc,0x2bcf9c10) = 0 (0x0)
mmap(0xbf7fc000,1052672,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_STACK,-1,0x0) = -1082146816 (0xbf7fc000)
mprotect(0xbf7fc000,4096,PROT_NONE)              = 0 (0x0)
thr_new(0xbfbfe010,0x34,0x297cc0eb,0x29868574,0x1dc,0x2bc282a8) = 0 (0x0)
mmap(0xbf6fb000,1052672,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_STACK,-1,0x0) = -1083199488 (0xbf6fb000)
mprotect(0xbf6fb000,4096,PROT_NONE)              = 0 (0x0)
thr_new(0xbfbfe010,0x34,0x297cc0eb,0x29868574,0x1dc,0x2bc28340) = 0 (0x0)
_umtx_op(0x28087004,0xf,0x0,0x0,0x0,0x0)         = 0 (0x0)
_umtx_op(0x2bc044b0,0x15,0x1,0x0,0x0,0x2bc0f100) = 0 (0x0)
open("/usr/local/lib/gcc48/libgcc_s.so.1",O_RDONLY,05001554001) = 5 (0x5)
fstat(5,{ mode=-rw-r--r-- ,inode=7585410,size=412832,blksize=16384 }) = 0 (0x0)
close(5)                                         = 0 (0x0)
_umtx_op(0x2bc05b00,0x2,0x18c2c,0x0,0x0,0x29746d00) = 0 (0x0)
madvise(0x2c0fa000,0x3000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2bf58000,0x1000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2bed9000,0x45000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
_umtx_op(0x28087018,0xf,0x0,0x0,0x0,0x0)         = 0 (0x0)
_umtx_op(0x2bc044b0,0x15,0x1,0x0,0x0,0x2bc0f130) = 0 (0x0)
_umtx_op(0x2bc05e00,0x2,0x18c6a,0x0,0x0,0x29746d00) = 0 (0x0)
_umtx_op(0x2808702c,0xf,0x0,0x0,0x0,0x0)         = 0 (0x0)
_umtx_op(0x2bc044b0,0x15,0x1,0x0,0x0,0x2bc0f160) = 0 (0x0)
madvise(0x2bfd9000,0x1a000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2bf51000,0x6000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2bf1e000,0x32000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2c050000,0x32000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2be31000,0x32000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2c082000,0x1d000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2be89000,0x50000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
madvise(0x2bd23000,0x4c000,0x5,0x8068728,0x8068720,0x4) = 0 (0x0)
close(4)                                         = 0 (0x0)
issetugid(0x2a3a22e9,0x2a448a6c,0xbfbfeb98,0x2a37489f,0x2a434a40,0x2a448a6c) = 0 (0x0)
close(3)                                         = 0 (0x0)
process exit, rval = 0
Вот с какими параметрами я пересобирал ffmpeg:

Код: Выделить всё

sudo ./configure --prefix=/opt --mandir=/opt/man --datadir=/opt/share/ffmpeg --pkgconfigdir=/opt/libdata/pkgconfig --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --disable-libsoxr --cc=cc --extra-cflags='-I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib -L/opt/lib' --extra-libs=-lpthread --enable-memalign-hack --disable-indev=alsa --disable-outdev=alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --enable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt --disable-libdc1394 --disable-stripping --enable-htmlpages --disable-libfaac --enable-libfdk-aac --enable-ffserver --disable-libflite --disable-fontconfig --enable-libfreetype --enable-frei0r --disable-libfribidi --disable-libgme --disable-libgsm --enable-iconv --enable-libilbc --disable-indev=jack --disable-ladspa --enable-libmp3lame --disable-libbluray --enable-mmx --disable-libmodplug --disable-openal --disable-indev=openal --disable-opencl --enable-libopencv --disable-opengl --enable-libopenh264 --disable-libopenjpeg --disable-libopus --disable-libpulse --disable-indev=pulse --disable-outdev=pulse --enable-runtime-cpudetect --disable-librtmp --enable-libschroedinger --disable-ffplay --disable-outdev=sdl --enable-libsmbclient --disable-libsnappy --disable-libspeex --disable-sse --disable-libssh --enable-libtheora --disable-libtwolame --disable-libv4l2 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-vaapi --disable-vdpau --enable-libvidstab --enable-libvorbis --disable-libvo-amrwbenc --enable-libvpx --disable-libwavpack --disable-libwebp --disable-x11grab --enable-libx264 --disable-libx265 --disable-libxcb --enable-libxvid --disable-outdev=xv --disable-libzmq --disable-libzvbi --enable-gnutls --disable-openssl --enable-version3 --enable-nonfree
Где могут быть грабли? Как заставить ffprobe корректно завершаться?

ffprobe не завершает работу

Добавлено: 2016-11-29 13:04:50
Abyrvalg
Не оставьте в беде, граждане... Я уже кучу версий перепробовал...

ffprobe не завершает работу

Добавлено: 2016-11-30 21:25:11
Abyrvalg
Методом тыка установил, что зависание проявляется только при проверке мультикаста. Если проверять, к примеру, обычный файл, то всё ок.