I have a 3.2GHz Quad Core Xeon E3-1230 CPU, Passmark CPU mark Score of 8,200, 32GB ram - and I can't do more than 4 ffmpeg commands/sessions without being overloaded. When I execute a ffmpeg session, it's telling me that it's not using muliple cores, only one. Why is that? How can I get ffmpeg to fully use all the cpu cores I have?
Thank you in advance for any kind of suggestions.
ffmpeg version:
ffmpeg version N-42487-gfedefe4-syslint Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 13 2012 23:18:33 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 37.100 / 54. 37.100
libavformat 54. 16.104 / 54. 16.104
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 2.100 / 3. 2.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Hyper fast Audio and Video encoder
Related
In docker-compose file, I set contained with chrome-standalone image and another node (named test) as test runner. Cloudbuild.yaml file triggers test and it works.
Here is the docker-compose file:
version: "3"
services:
selenium:
image: selenium/standalone-chrome:4
volumes:
- /dev/shm:/dev/shm
network_mode: host
test:
image: node:16-alpine
entrypoint:
- sh
- -c
- |-
cd /test
npm install
sleep 3
npm run test
volumes:
- .:/test
depends_on:
- selenium
network_mode: host
I cannot add selenium video recorder service.
chrome_video:
image: selenium/video:ffmpeg-4.3.1-20210804
volumes:
- /Users/videos:/videos
depends_on:
- selenium
environment:
- DISPLAY_CONTAINER_NAME=selenium
- FILE_NAME=chrome_video.mp4
Adding network_mode:host as an argument to chrome_video doesn't work. They don't get each other's ping.
After chrome_video container is initialised, the log file of it:
2021-08-20 16:23:05,910 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2021-08-20 16:23:05,913 INFO supervisord started with pid 10
2021-08-20 16:23:06,915 INFO spawned: 'video-recording' with pid 12
2021-08-20 16:23:06,920 INFO spawned: 'video-ready' with pid 13
Checking if the display is open...
2021-08-20 16:23:06,924 INFO success: video-recording entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-08-20 16:23:06,924 INFO success: video-ready entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Waiting before next display check...
Waiting before next display check...
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[x11grab # 0x55f0bf04fb80] Cannot open display selenium:99.0, error 1.
selenium:99.0: Input/output error
2021-08-20 16:23:32,692 INFO exited: video-recording (exit status 1; not expected)Waiting before next display check...
Waiting before next display check...
Waiting before next display check...
Waiting before next display check...
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[x11grab # 0x55f0bf04fb80] Cannot open display selenium:99.0, error 1.
selenium:99.0: Input/output error
2021-08-20 16:23:32,692 INFO exited: video-recording (exit status 1; not expected)
Waiting before next display check...
Waiting before next display check...
Waiting before next display check...
Waiting before next display check...
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[x11grab # 0x55f0bf04fb80] Cannot open display selenium:99.0, error 1.
selenium:99.0: Input/output error
2021-08-20 16:23:32,692 INFO exited: video-recording (exit status 1; not expected)
If I edit docker-composer as below, I get video recording in expected directory, however it seems that test cannot reach the :
version: "3"
services:
selenium:
image: selenium/standalone-chrome:4
volumes:
- /dev/shm:/dev/shm
test:
image: node:16-alpine
entrypoint:
- sh
- -c
- |-
cd /test
npm install
sleep 3
npm run test
volumes:
- .:/test
depends_on:
- selenium
chrome_video:
image: selenium/video:ffmpeg-4.3.1-20210804
volumes:
- /Users/videos:/videos # /artifacts/videos:/videos
depends_on:
- selenium
environment:
- DISPLAY_CONTAINER_NAME=selenium
- FILE_NAME=chrome_video.mp4
Error when the docker-compose file above is run:
test_1 | 1) Preliminary steps for End to End Tests test_1
| Login: test_1 | Error: ECONNREFUSED connect
ECONNREFUSED 127.0.0.1:4444 test_1 | at
ClientRequest.
(node_modules/selenium-webdriver/http/index.js:273:15) test_1
| at ClientRequest.emit (node:events:394:28) test_1 |
at Socket.socketErrorListener (node:_http_client:447:9) test_1
| at Socket.emit (node:events:394:28) test_1 | at
emitErrorNT (node:internal/streams/destroy:157:8) test_1 |
at emitErrorCloseNT (node:internal/streams/destroy:122:3) test_1
| at processTicksAndRejections
(node:internal/process/task_queues:83:21) test_1 | test_1
| 2) Preliminary steps for End to End Tests test_1 |
"after each" hook for "Login": test_1 | Error:
ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444 test_1 |
at ClientRequest.
(node_modules/selenium-webdriver/http/index.js:273:15) test_1
| at ClientRequest.emit (node:events:394:28) test_1 |
at Socket.socketErrorListener (node:_http_client:447:9) test_1
| at Socket.emit (node:events:394:28) test_1 | at
emitErrorNT (node:internal/streams/destroy:157:8) test_1 |
at emitErrorCloseNT (node:internal/streams/destroy:122:3) test_1
| at processTicksAndRejections
(node:internal/process/task_queues:83:21)
Btw, all containers are in same network (common network's name is e2e-tests_default):
e2e-tests % docker network inspect e2e-tests_default -f "{{json
.Containers }}"
{"26858f4ebf7cda76aaa100c8f3db8df14c319a6e3d4c54f839202affde72ad11":{"Name":"e2e-tests_chrome_video_1","EndpointID":"8d3beeb215b524e573db0d6f9a001c04ba9a77823b42e10f45160868af16bd4b","MacAddress":"02:42:c0:a8:70:04","IPv4Address":"192.168.112.4/20","IPv6Address":""},"972490a8a2e94adc1cb2e73daf5c0b206a89e483330e3d736fef0eca6cd5b170":{"Name":"e2e-tests_test_1","EndpointID":"abce602dc1c22ab21b760b50aeca2a77de07304c2c7cc224a7164078f8af56bd","MacAddress":"02:42:c0:a8:70:03","IPv4Address":"192.168.112.3/20","IPv6Address":""},"9ed9962e468cba1cd0fdfe1511fc23c931fd2f0dbf6d95bdb3009809ca097939":{"Name":"e2e-tests_selenium_1","EndpointID":"448b560b932501edb66204f492af8edc38a1bd5ec0c19eb217b6d51ebf48aab0","MacAddress":"02:42:c0:a8:70:02","IPv4Address":"192.168.112.2/20","IPv6Address":""}}
Is there a way to enable video recording for this setup?
Thanks in advance.
Unless you need a service running on the host, there is no need to use network_mode: host.
Moreover, the video container needs to know the name of the service/container where VNC is running record the stream. In this case, based on the docker-compose file you share, DISPLAY_CONTAINER_NAME=chrome should be actually DISPLAY_CONTAINER_NAME=selenium.
On my Linux-based QNAP NAS, I can successfully record my Loopback audio device using:
# arecord -D default:CARD=Loopback test.wav
However, FFMPEG cannot use this same audio device. It returns:
[alsa # 0x5a45880] cannot open audio device hw:default:CARD=Loopback (No such file or directory)
hw:default:CARD=Loopback: Input/output error
I've also tried any number of hw: options in FFMPEG. For what it's worth, the arecord -l command returns:
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC262 Analog [ALC262 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 1/1
Subdevice #0: subdevice #0
arecord -L returns:
[~] # arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=PCH
HDA Intel PCH, ALC262 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC262 Analog
Front speakers
sysdefault:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
front:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Front speakers
surround21:CARD=Loopback,DEV=0
Loopback, Loopback PCM
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.0 Surround output to Front and Rear speakers
surround41:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Loopback,DEV=0
Loopback, Loopback PCM
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
FFMPEG command and response is:
[~] # /share/CACHEDEV1_DATA/.qpkg/ffmpeg/ffmpeg -f alsa -i hw:default:CARD=Loopback test.mp3
ffmpeg version 4.2.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
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
ALSA lib ../../../src/pcm/pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM hw:default:CARD=Loopback
[alsa # 0x5f64800] cannot open audio device hw:default:CARD=Loopback (No such file or directory)
hw:default:CARD=Loopback: Input/output error
FFMPEG -sources alsa gives:
[~] # /share/CACHEDEV1_DATA/.qpkg/ffmpeg/ffmpeg -sources alsa
ffmpeg version 4.2.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
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
Auto-detected sources for alsa:
ALSA lib ../../../src/control/control.c:1375:(snd_ctl_open_noupdate) Invalid CTL hw:0
Cannot list sources.
Can anyone shed some light on why this is impossible in FFMPEG and suggest what I'm doing wrong here? FFMPEG includes the ALSA module, and is version 4.2.1. Thanks!
I am wanting to write a bash script on a MacOS platform that will perform different operations to m4a files with ALAC encoding, depending on whether they are stereo or mono. How can I go about the stereo/mono detection? Are there any tools/libraries that I can utilise? Thank you.
Got it using https://ffmpeg.org/ffprobe.html
if ffprobe -i the-audio-file.mp4 |& grep stereo; then
echo stereo
else
echo mono
fi
Works as ffprobe will output a result like this:
ffprobe version 3.4.2 Copyright (c) 2007-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-nonfree
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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'the-audio-file.mp4':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
creation_time : 2018-01-27T18:53:31.000000Z
track : 0
disc : 0
Duration: 04:59:13.02, start: 0.000000, bitrate: 381 kb/s
Stream #0:0(eng): Audio: alac (alac / 0x63616C61), 44100 Hz, stereo, s16p, 381 kb/s (default)
Metadata:
creation_time : 2018-01-27T18:53:31.000000Z
0 0 0
Note, this does not work for he-aac, due to this bug in ffprobe
I need to process a great quantity of mp3's files. I intend to make a BASH script to compress dynamically these audios as a batch. Ubuntu ;)
I've got everything working but the line:
ffmpeg -i test.mp3 -codec:a libmp3lame -b:a 96k -af "acompressor=threshold=-17dB:ratio=5:attack=46:release=2700" testcomp.mp3
I get the message [AVFilterGraph # 0x106dbe0] No such filter: 'acompresor'. Here it's the output of $ffmpeg:
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Hyper fast Audio and Video encoder
--------------------------------------
Any help will be appreciated
i have the next situation.
Have file on remote VPS server.
I want that this file (opus codec) can be accessible through RTP on my android phone.
I tried ffmpeg with next command:
ffmpeg -ar 44800 -i bon_jovi_loverboy.opus -acodec libopus -ac 1 -ab 96k -vn -f rtp rtp://127.0.0.1:5004 -loglevel 56
But got next error:
bon_jovi_loverboy.opus: Invalid data found when processing input
Full log:
root#cs82932:/home/rstream/rtstream/src# ffmpeg -ar 44800 -i bon_jovi_loverboy.opus -acodec libopus -ac 1 -ab 96k -vn -f rtp rtp://127.0.0.1:5004 -loglevel 56
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '44800'.
Reading option '-i' ... matched as input url with argument 'bon_jovi_loverboy.opus'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'libopus'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '1'.
Reading option '-ab' ... matched as option 'ab' (audio bitrate (please use -b:a)) with argument '96k'.
Reading option '-vn' ... matched as option 'vn' (disable video) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rtp'.
Reading option 'rtp://127.0.0.1:5004' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '56'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument 56.
Successfully parsed a group of options.
Parsing a group of options: input url bon_jovi_loverboy.opus.
Applying option ar (set audio sampling rate (in Hz)) with argument 44800.
Successfully parsed a group of options.
Opening an input file: bon_jovi_loverboy.opus.
[AVIOContext # 0x965e60] Statistics: 36389 bytes read, 0 seeks
bon_jovi_loverboy.opus: Invalid data found when processing input
What wrong? Thanks
UPD
I update ffmpeg and streaming looks successfully.
ffmpeg -stream_loop -1 -i 4a6u7-ptl2w.opus -acodec libopus -ac 1 -ab
96k -vn -f rtp rtp://95.213.195.192:5004/f.opus
ffmpeg version 3.2.4-1~16.04.york1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2~16.04.york1) 20170210
configuration: --prefix=/usr --extra-version='1~16.04.york1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, ogg, from '4a6u7-ptl2w.opus':
Duration: 00:02:34.21, start: 0.000000, bitrate: 69 kb/s
Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
Metadata:
ENCODER : Lavc57.77.100 libopus
Output #0, rtp, to 'rtp://95.213.195.192:5004/f.opus':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Audio: opus (libopus), 48000 Hz, mono, flt, 96 kb/s
Metadata:
encoder : Lavc57.64.101 libopus
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 95.213.195.192
t=0 0
a=tool:libavformat 57.56.101
m=audio 5004 RTP/AVP 97
b=AS:96
a=rtpmap:97 opus/48000/2
Stream mapping:
Stream #0:0 -> #0:0 (opus (native) -> opus (libopus))
Press [q] to stop, [?] for help
size= 44893kB time=00:52:18.12 bitrate= 117.2kbits/s speed=56.5x
But when i try to connect by rtp from local PC (VLC Player) i get the exception:
core error: socket bind error: Cannot assign requested address
core error: open of `rtp://95.213.195.192:5004/f.opus' failed
When i try ffplay on remote pc (same where ffmpeg):
ffplay rtp://95.213.195.192:5004/f.opus
ffplay version 3.2.4-1~16.04.york1 Copyright (c) 2003-2017 the FFmpeg developers
built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2~16.04.york1) 20170210
configuration: --prefix=/usr --extra-version='1~16.04.york1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Segmentation fault
Can you help me? Thanks
95.213.195.192 - IP of my remote server with file