I am adding video stream capture functionality to a Xamarin Forms project. I am trying to use VLC's LibVLCSharp.Forms (https://github.com/videolan/libvlcsharp) package and the Mobile ffmpeg Xamarin wrapper package, Laerdal.Xamarin.FFmpeg.* (https://github.com/Laerdal/Laerdal.Xamarin.FFmpeg.iOS). However, the internal ffmpeg library from VLC is conflicting with the ffmpeg wrapper and is built with different flags which exclude functionality that I need.
For native development, it looks like you can configure a preferred library with the OTHER_LDFLAGS flag in the Pods-<Your App>.debug.xcconfig file but I don't see where to do that with Xamarin.Forms.
Source: https://github.com/tanersener/mobile-ffmpeg/wiki/Using-Multiple-FFmpeg-Implementations-In-The-Same-iOS-Application
How can I configure Xamarin iOS builds to prefer the mobile ffmpeg library over the VLC ffmpeg library? If I am able to use the mobile ffmpeg library, will it cause issues with VLC?
Here is a log message when I try to run commands with ffmpeg. As you can see, ffmpeg's internal library paths reference "vlc":
FFmpegExecute: Command: -vsync 1 -i 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:bigbuckbunny_115k.mov' -force_key_frames "expr: gte(t, n_forced * 2)" -strict experimental -f segment -segment_time 00:00:02 -segment_start_number 0 -reset_timestamps 1 -c:v copy -c:a copy '[path to temp]/tmp/VideoStream/%01d-record-temp.mp4'
Loaded mobile-ffmpeg-full-gpl-x86_64-4.4-lts-20200725
INFO: ffmpeg version v4.4-dev-416
INFO: Copyright (c) 2000-2020 the FFmpeg developers
INFO:
INFO: built with Apple LLVM version 7.3.0 (clang-703.0.31)
INFO: configuration: --sysroot=/Applications/Xcode-v7.3.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk --prefix=/Users/taner/Projects/mobile-ffmpeg/prebuilt/ios-x86_64/ffmpeg --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --ar=/Applications/Xcode-v7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='clang -arch x86_64 -target x86_64-ios-darwin -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DMOBILE_FFMPEG_LTS -DMOBILE_FFMPEG_BUILD_DATE=20200725 -isysroot /Applications/Xcode-v7.3.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -O2 -mios-simulator-version-min=9.3 -I/Applications/Xcode-v7.3.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/include' --ranlib=/Applications/Xcode-v7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode-v7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --disable-neon --enable-cross-compile --enable-pic --disable-asm --enable-inline-asm --enable-optimizations --enable-swscale --enable-static --disable-shared --enable-small --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-outdev=audiotoolbox --disable-indev=v4l2 --disable-indev=fbdev --disable-openssl --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-audiotoolbox --enable-bzlib --enable-videotoolbox --disable-avfoundation --enable-iconv --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-audiotoolbox --enable-bzlib --enable-videotoolbox --disable-avfoundation --enable-iconv --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-audiotoolbox --enable-bzlib --enable-videotoolbox --disable-avfoundation --enable-iconv --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-audiotoolbox --enable-bzlib --enable-videotoolbox --disable-avfoundation --enable-iconv
INFO: WARNING: library configuration mismatch
INFO: avutil configuration: --extra-ldflags='-arch x86_64 -v -Wl,-ios_simulator_version_min,8.4 -L/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/lib -Wl,-ios_simulator_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=x86_64 --target-os=darwin --disable-lzma --cpu=core2 --enable-pic --extra-ldflags='-arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include -g -O2 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64 --enable-static --disable-shared
INFO: avcodec configuration: --extra-ldflags='-arch x86_64 -v -Wl,-ios_simulator_version_min,8.4 -L/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/lib -Wl,-ios_simulator_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=x86_64 --target-os=darwin --disable-lzma --cpu=core2 --enable-pic --extra-ldflags='-arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include -g -O2 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64 --enable-static --disable-shared
INFO: avformat configuration: --extra-ldflags='-arch x86_64 -v -Wl,-ios_simulator_version_min,8.4 -L/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/lib -Wl,-ios_simulator_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=x86_64 --target-os=darwin --disable-lzma --cpu=core2 --enable-pic --extra-ldflags='-arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include -g -O2 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64 --enable-static --disable-shared
INFO: swscale configuration: --extra-ldflags='-arch x86_64 -v -Wl,-ios_simulator_version_min,8.4 -L/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/lib -Wl,-ios_simulator_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=x86_64 --target-os=darwin --disable-lzma --cpu=core2 --enable-pic --extra-ldflags='-arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -arch x86_64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -arch x86_64 -O3 -g -miphoneos-version-min=8.4 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include -g -O2 -I/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/Martz/Projects/vlckit/libvlc/vlc/contrib/iPhone-x86_64-apple-darwin14-x86_64 --enable-static --disable-shared
INFO: libavutil 56. 55.100 / 56. 5.100
INFO: libavcodec 58. 96.100 / 58. 6.103
INFO: libavformat 58. 48.100 / 58. 3.100
INFO: libavdevice 58. 11.101 / 58. 11.101
INFO: libavfilter 7. 87.100 / 7. 87.100
INFO: libswscale 5. 8.100 / 5. 0.101
INFO: libswresample 3. 8.100 / 3. 8.100
ERROR: Unrecognized option 'segment_time'.
FATAL: Error splitting the argument list:
FATAL: Option not found
The solution is in one of the link you shared
For native development, it looks like you can configure a preferred library with the OTHER_LDFLAGS flag in the Pods-.debug.xcconfig file but I don't see where to do that with Xamarin.Forms. Source: https://github.com/tanersener/mobile-ffmpeg/wiki/Using-Multiple-FFmpeg-Implementations-In-The-Same-iOS-Application
Xamarin.Forms is still native development, so you can do this the same way a Swift iOS developer would.
You need to open your native iOS app project in XCode (not the shared project one).
Create a xcconfig file. This guide looks good enough with screenshots to help you navigate XCode.
A xcconfig look like this. You want to put the mobile-ffmpeg frameworks before the mobilevlckit one.
Xamarin.iOS might require some framework as well, so before all this I'd build your app in verbosity diagnostics mode to see what the current OTHER_LDFLAGS value is.
Related
I am getting an error in installing passenger nginx in MAC 10.14.
here are the logs:
src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp:408:16: error:
address argument to atomic builtin cannot be const-qualified
('const volatile
boost::atomics::detail::gcc_dcas_x86_64::storage_type *' (aka
'const volatile unsigned __int128 *') invalid)
return __sync_val_compare_and_swap(&storage, value, value);
^ ~~~~~~~~
1 error generated.
rake aborted!
Command failed with status (1): [c++ -o buildout/support-binaries/AgentFundamentals.o -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Wno-ambiguous-member-template -Isrc/cxx_supportlib/vendor-copy/libuv/include -Isrc/cxx_supportlib/vendor-copy/websocketpp -I/usr/local/opt/openssl/include -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-ambiguous-member-template -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -g -fno-limit-debug-info -std=gnu++11 -Wno-unused-local-typedefs -Wno-format-nonliteral -DHAS_UNORDERED_MAP -c src/agent/Shared/Fundamentals/Implementation.cpp]
/Users/narendrakumawat/.rvm/gems/ruby-2.2.5#rails4115/gems/passenger-6.0.2/build/support/cplusplus.rb:53:in `run_compiler'
/Users/narendrakumawat/.rvm/gems/ruby-2.2.5#rails4115/gems/passenger-6.0.2/build/support/cplusplus.rb:104:in `compile_cxx'
/Users/narendrakumawat/.rvm/gems/ruby-2.2.5#rails4115/gems/passenger-6.0.2/build/support/cplusplus.rb:162:in `block in define_cxx_object_compilation_task'
/Users/narendrakumawat/.rvm/gems/ruby-2.2.5#rails4115/bin/ruby_executable_hooks:24:in `eval'
/Users/narendrakumawat/.rvm/gems/ruby-2.2.5#rails4115/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => nginx => nginx_without_native_support => buildout/support-binaries/PassengerAgent => buildout/support-binaries/AgentFundamentals.o
(See full trace by running task with --trace)
I already tried this also :
https://github.com/phusion/passenger/issues/2199
I have a file sample.aif on which I want to apply the below filters :
Trim sample to a maximum duration of 2 seconds
Compression applied with settings : threshold 0.1,ratio=2,attack=5
20 milliseconds fade out at end .
I am running the below ffmpeg command : ffmpeg -i kick.aif -af atrim=0:120 -af acompressor=threshold=0.1:ratio=2:attack=5 -af afade=d=0.02 kick.ogg 2>error.out
When I check the return code I see it is 0 however my error. Out file has the below output :
cat error.out
ffmpeg version 2.8.14-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 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
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, aiff, from 'kick.aif':
Duration: 00:00:01.54, start: 0.000000, bitrate: 3072 kb/s
Stream #0:0: Audio: pcm_f32be (fl32 / 0x32336C66), 48000 Hz, 2 channels, flt, 3072 kb/s
Output #0, ogg, to 'kick.ogg':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Audio: vorbis (libvorbis), 48000 Hz, stereo, fltp
Metadata:
encoder : Lavc56.60.100 libvorbis
Stream mapping:
Stream #0:0 -> #0:0 (pcm_f32be (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
size= 6kB time=00:00:01.52 bitrate= 33.9kbits/s
video:0kB audio:2kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 175.053040%
I am absolutely new to ffmpeg. Can someone tell me where I am going wrong ?
Many thanks in advance.
Multiple filters acting on a single input should be specified in the same filterchain, so
ffmpeg -i kick.aif -af atrim=0:120,acompressor=threshold=0.1:ratio=2:attack=5,afade=out:st=119.8:d=0.02 kick.ogg 2>error.out
Note that atrim is keeping the first two minutes. The afade needs to be set of type out, else it will fade-in, and its start time should be set to 20 ms before the end.
I have a tested code I did in a "bash" file. It works perfect on shell. I change only params to get it to work with nginx rtmp module, but ffmpeg says always and understandable error. This is the code:
exec_push ffmpeg -re -y -i rtmp://localhost:1935/live/$name \
-c:v libx264 -c:a aac \
-g 24 -keyint_min 24 -preset veryfast -tune zerolatency -movflags +faststart -vsync passthrough \
-filter_complex '[0:v]format=pix_fmts=yuv420p,split=3[in1][in2][in3];[in1]scale=320:-2[320x];[in2]scale=640:-2[HQ640x];[in3]scale=1280:-2[HD1280x];[0:a]aresample=44100[audio]' \
-map '[320x]' -profile:v baseline -level 3.0 -crf 31 -maxrate 170k -bufsize 170k -f mp4 rtmp://localhost:1935/rtmp_hls/$name_320x \
-map '[HQ640x]' -profile:v baseline -level 3.1 -crf 25 -maxrate 1000k -bufsize 1000k -f mp4 rtmp://localhost:1935/rtmp_hls/$name_HQ640x \
-map '[HD1280x]' -profile:v main -level 3.1 -crf 19 -maxrate 4000k -bufsize 4000k -f mp4 rtmp://localhost:1935/rtmp_hls/$name_HD1280x \
-map '[audio]' -b 128k -f mp4 rtmp://localhost:1935/rtmp_hls/$name_audio 2>>/var/www/html/ffmpeg-live-output-$name.log;
And this is the error launched by mmpeg
ffmpeg version 3.2.4-1~bpo8+1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-version='1~bpo8+1' --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 --disable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --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
[flv # 0x55e430547740] video stream discovered after head already parsed
[flv # 0x55e430547740] audio stream discovered after head already parsed
Input #0, flv, from 'rtmp://localhost:1935/live/directo':
Metadata:
Server : NGINX RTMP (github.com/sergey-dryabzhinsky/nginx-rtmp-module)
displayWidth : 1280
displayHeight : 720
fps : 24
profile :
level :
Duration: 00:00:00.00, start: 26.023000, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 24.42 fps, 24 tbr, 1k tbn, 48 tbc
Stream #0:1: Audio: aac (LC), 44100 Hz, mono, fltp
[NULL # 0x55e4305e0b40] Unable to find a suitable output format for '
'
: Invalid argument
Does anyone could help me?
Thank you
There's no need for line breaks \. Nginx usess regular expressions to parse the configuration:
exec_push ffmpeg line 1
line 2
...
line n;
I am trying to make qTuio(https://github.com/x29a/qTUIO) on my windows machine. However, when I try to run make, it reports: "<< was unexpected at this time"
The full output is:
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICO
DE -DWIN32 -DQT_LARGEFILE_SUPPORT -DOSC_HOST_LITTLE_ENDIAN -DQT_DLL -DQT_GUI_LIB
-DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT
_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\OSGeo4W\include\qt4\QtCore
" -I"c:\OSGeo4W\include\qt4\QtNetwork" -I"c:\OSGeo4W\include\qt4\QtGui" -I"c:\OS
Geo4W\include\qt4" -I"..\..\tmp\debug" -I"..\..\tmp" -I"..\3rdparty\oscpack" -I"
..\3rdparty\tuio" -I"c:\OSGeo4W\include\qt4\ActiveQt" -I"..\tmp\debug" -I"." -I"
c:\OSGeo4W\apps\qt4\mkspecs\win32-msvc2008" -Fo..\tmp\debug\ #<<
<< was unexpected at this time.
make[1]: *** [{..}.cpp{..\tmp\debug\}.obj] Error 1
make: *** [debug] Error 2
Any help is appreciated
I installed QT 5.1 VS2012 release and installed successfuly.
I get error while compilng the project in QT Creator with the 'jom' thingy saying:
"jom: F:\tmp2\build-testprj-Desktop_Qt_5_1_0_MSVC2012_32bit-Debug\Makefile.Debug [debug\mainwindow.obj] Error 2
jom: F:\tmp2\build-testprj-Desktop_Qt_5_1_0_MSVC2012_32bit-Debug\Makefile.Debug [debug\moc_mainwindow.obj] Error 2
jom: F:\tmp2\build-testprj-Desktop_Qt_5_1_0_MSVC2012_32bit-Debug\Makefile [debug] Error 2
17:30:06: The process "C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project testprj (kit: Desktop Qt 5.1.0 MSVC2012 32bit)
When executing step 'Make'"
"17:56:29: Running steps for project untitled...
17:56:29: Configuration unchanged, skipping qmake step.
17:56:29: Starting: "C:\Qt\Qt5.0.0\Tools\QtCreator\bin\jom.exe"
C:\Qt\Qt5.0.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtPrintSupport" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtSql" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ #C:\Users\BAHADI~1.AYD\AppData\Local\Temp\main.obj.2740.16.jom
jom: F:\tmp2\untitled-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\Makefile.Debug [debug\main.obj] Error 2
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtPrintSupport" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtSql" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ #C:\Users\BAHADI~1.AYD\AppData\Local\Temp\qcustomplot.obj.2740.16.jom
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtPrintSupport" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtSql" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ #C:\Users\BAHADI~1.AYD\AppData\Local\Temp\dbhelper.obj.2740.16.jom
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtPrintSupport" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtSql" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ #C:\Users\BAHADI~1.AYD\AppData\Local\Temp\mainwindow.obj.2740.32.jom
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtPrintSupport" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtSql" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ #C:\Users\BAHADI~1.AYD\AppData\Local\Temp\moc_mainwindow.obj.2740.32.jom
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtPrintSupport" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtSql" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ #C:\Users\BAHADI~1.AYD\AppData\Local\Temp\moc_qcustomplot.obj.2740.32.jom
jom: F:\tmp2\untitled-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\Makefile.Debug [debug\qcustomplot.obj] Error 2
jom: F:\tmp2\untitled-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\Makefile.Debug [debug\mainwindow.obj] Error 2
jom: F:\tmp2\untitled-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\Makefile.Debug [debug\moc_mainwindow.obj] Error 2
jom: F:\tmp2\untitled-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug\Makefile.Debug [debug\moc_qcustomplot.obj] Error 2"