Send updating image to rtmp with ffmpeg in flutter app - flutter

I have a JPG image in a directory that I update each time I got a new one and I have to send this image to a rtmp server.
I fond that ffmpeg can do that but I thougt -loop 0 is suppose to loop over the image and see if it is refreshed but when I start my command inside my app it seem to start well and end with good Return Code (0) but don't seem to loop.
Here is my ffmpeg command : '-re -loop 0 -i $pathToFile -preset ultrafast -tune zerolatency -c:v libx264 -f flv $streamUrl'
This code execute the command :
FFmpegKit.executeAsync(command, (session) async {
if (ReturnCode.isSuccess(await session.getReturnCode())) {
log('FFmpeg process exited with rc ${await session.getReturnCode()} in ${await session.getDuration()} milliseconds');
} else if (ReturnCode.isCancel(await session.getReturnCode())) {
log('FFmpeg process cancelled');
} else {
log('FFmpeg process failed with rc ${await session.getReturnCode()} in ${await session.getReturnCode()} milliseconds');
}
}, (session) {
log('Message ${session.getMessage()}');
}, (session) {
log('Statistics ${session.toString()}');
});
And finally I got those logs :
[log] Message [libx264 # 0x7ccd0b6400] 264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=7 lookahead_threads=7 sliced_threads=1 slices=7 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
[log] Message Output #0, flv, to 'rtmp://stream.stream.url.com':
[log] Message Metadata:
[log] Message encoder :
[log] Message Lavf59.27.100
[log] Message
[log] Message Stream #0:0
[log] Message : Video: h264 ([7][0][0][0] / 0x0007), yuvj422p(pc, bt470bg/unknown/unknown, progressive), 640x480, q=2-31
[log] Message ,
[log] Message 25 fps,
[log] Message 1k tbn
[log] Message
[log] Message Metadata:
[log] Message encoder :
[log] Message Lavc59.37.100 libx264
[log] Message
[log] Message Side data:
[log] Message
[log] Message cpb:
[log] Message bitrate max/min/avg: 0/0/0 buffer size: 0
[log] Message vbv_delay: N/A
[log] Message
[log] Statistics Instance of 'Statistics'
[log] Message frame= 1 fps=0.0 q=20.0 size= 21kB time=00:00:00.00 bitrate=173704.0kbits/s speed= 333x
[log] Message [flv # 0x7cf7f74d00] Failed to update header with correct duration.
[log] Message [flv # 0x7cf7f74d00] Failed to update header with correct filesize.
[log] Statistics Instance of 'Statistics'
[log] Message frame= 1 fps=0.0 q=20.0 Lsize= 21kB time=00:00:00.00 bitrate=173864.0kbits/s speed=0.0204x
[log] Message video:21kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.513382%
[log] Statistics Instance of 'Statistics'
[log] Message frame= 1 fps=0.0 q=20.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=0.0204x
[log] Message video:21kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[log] Message [libx264 # 0x7ccd0b6400] frame I:1 Avg QP:20.00 size: 20815
[log] Message [libx264 # 0x7ccd0b6400] mb I I16..4: 100.0% 0.0% 0.0%
[log] Message [libx264 # 0x7ccd0b6400] coded y,uvDC,uvAC intra: 37.5% 22.7% 2.3%
[log] Message [libx264 # 0x7ccd0b6400] i16 v,h,dc,p: 50% 14% 24% 12%
[log] Message [libx264 # 0x7ccd0b6400] i8c dc,h,v,p: 78% 6% 15% 1%
[log] Message [libx264 # 0x7ccd0b6400] kb/s:4163.00
[log] FFmpeg process exited with rc 0 in 562 milliseconds
All of this in inside a Flutter app with the package ffmpeg_kit_flutter (the full gpl version of it).
Any one have an idea of how to loop over constantly every time the image is updated ?
Edit : I try adding -f image2 in input but it failed with :
[log] Message ffmpeg version n5.1.2
[log] Message Copyright (c) 2000-2022 the FFmpeg developers
[log] Message
I/ink.kw_deliver(30445): WaitForGcToComplete blocked ProfileSaver on HeapTrim for 28.215ms
[log] Message built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
[log] Message configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --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-videotoolbox --disable-audiotoolbox --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-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libdav1d --enable-libkvazaar --enable-libx264 --enable-libxvid --enable-libx265 --enable-libvidstab --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-libzimg --disable-openssl --enable-zlib --enable-mediacodec --enable-gpl
[log] Message libavutil 57. 28.100 / 57. 28.100
[log] Message libavcodec 59. 37.100 / 59. 37.100
[log] Message libavformat 59. 27.100 / 59. 27.100
[log] Message libavdevice 59. 7.100 / 59. 7.100
[log] Message libavfilter 8. 44.100 / 8. 44.100
[log] Message libswscale 6. 7.100 / 6. 7.100
[log] Message libswresample 4. 7.100 / 4. 7.100
[log] Message Input #0, image2, from '/data/user/0/com.kwikwink.kw_delivery/cache/images/stream.jpg':
[log] Message Duration:
[log] Message 00:00:00.04
[log] Message , start:
[log] Message 0.000000
[log] Message , bitrate:
[log] Message N/A
[log] Message
[log] Message Stream #0:0
[log] Message : Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480
[log] Message ,
[log] Message 25 fps,
[log] Message 25 tbr,
[log] Message 25 tbn
[log] Message
[log] Message rtmp://stream.path.com: I/O error
[log] FFmpeg process failed with rc 1 in 1 milliseconds

Related

FFMPEG, faulty input with only a few keyframes?

I have this video I can watch on MPC-HC alright, but I've been trying to re-encode it with FFMPEG to no avail.
The video unerringly stops 5 minutes into the clip and freezes. Checking the key frames it would seem like the last keyframe is indeed at around the 5 minute mark, even though the video is completely watchable for its entire duration of upwards an hour. I've been looking into finding a way to repopulate the index of keyframes or something, but the answer eludes me.
Both Handbrake and Premiere Pro fails to handle this video properly as well. Premiere Pro just imports it as though it's 5 minutes long, and Handbrake freezes when the encoding reaches the 5 minute mark.
Even doing a -c copy would give me an output that terminates at the 5 minute mark.
What can I do to fix this?
Edit: Added log as requested.
ffmpeg version git-2020-02-27-9b22254 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20200122
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-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 42.100 / 56. 42.100
libavcodec 58. 73.102 / 58. 73.102
libavformat 58. 39.101 / 58. 39.101
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.100 / 7. 77.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[mov,mp4,m4a,3gp,3g2,mj2 # 0000019d5f659b00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 20
[mov,mp4,m4a,3gp,3g2,mj2 # 0000019d5f659b00] st: 0 edit list 1 Cannot find an index entry before timestamp: 20.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '[REDACTED].mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
creation_time : 2009-07-27T12:06:40.000000Z
Duration: 01:13:58.42, start: 0.000000, bitrate: 2671 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 716x480 [SAR 8:9 DAR 179:135], 2504 kb/s, SAR 29127:32768 DAR 1007794:760071, 29.97 fps, 29.97 tbr, 48k tbn, 59.94 tbc (default)
Metadata:
rotate : 0
creation_time : 2007-09-08T18:58:09.000000Z
encoder : AVC Coding
Side data:
displaymatrix: rotation of -0.00 degrees
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s (default)
Metadata:
creation_time : 2009-07-27T12:06:47.000000Z
handler_name : GPAC ISO Audio Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 # 0000019d5f65de40] using SAR=8/9
[libx264 # 0000019d5f65de40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 # 0000019d5f65de40] profile High 4:4:4 Predictive, level 3.0, 4:2:0, 8-bit
[libx264 # 0000019d5f65de40] 64 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=9 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
Output #0, mp4, to '[REDACTED].mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
encoder : Lavf58.39.101
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 716x480 [SAR 29127:32768 DAR 1007794:760071], q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc (default)
Metadata:
encoder : Lavc58.73.102 libx264
creation_time : 2007-09-08T18:58:09.000000Z
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
displaymatrix: rotation of -0.00 degrees
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
creation_time : 2009-07-27T12:06:47.000000Z
handler_name : GPAC ISO Audio Handler
encoder : Lavc58.73.102 aac
frame= 9958 fps= 70 q=-1.0 Lsize= 960472kB time=00:11:13.32 bitrate=11685.6kbits/s speed=4.71x
video:944292kB audio:15836kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.035744%
[libx264 # 0000015f858dde40] frame I:46 Avg QP: 0.00 size:113701
[libx264 # 0000015f858dde40] frame P:9912 Avg QP: 0.00 size: 97026
[libx264 # 0000015f858dde40] mb I I16..4: 52.6% 10.7% 36.7%
[libx264 # 0000015f858dde40] mb P I16..4: 22.5% 5.5% 10.5% P16..4: 31.8% 15.2% 11.1% 0.0% 0.0% skip: 3.4%
[libx264 # 0000015f858dde40] 8x8 transform intra:14.3% inter:40.9%
[libx264 # 0000015f858dde40] coded y,uvDC,uvAC intra: 95.6% 84.9% 84.0% inter: 81.2% 83.0% 82.5%
[libx264 # 0000015f858dde40] i16 v,h,dc,p: 53% 44% 2% 1%
[libx264 # 0000015f858dde40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 47% 8% 1% 1% 1% 1% 1% 1%
[libx264 # 0000015f858dde40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 44% 5% 3% 5% 4% 2% 3% 1%
[libx264 # 0000015f858dde40] i8c dc,h,v,p: 12% 44% 43% 1%
[libx264 # 0000015f858dde40] Weighted P-Frames: Y:1.0% UV:0.2%
[libx264 # 0000015f858dde40] ref P L0: 59.1% 10.2% 27.8% 2.9% 0.0%
[libx264 # 0000015f858dde40] kb/s:23281.49
[aac # 0000015f85b5b880] Qavg: 182.070

How to make ffmpeg remux an iPhone MOV (HEVC) that works on Apple products?

I want to remux a HEVC file (without encoding). I have tried most options, even removing audio, but I cannot get an output file that plays smoothly with Apple products.
First I AirDrop any MOV from an iPhone recorded with the camera in HEVC.
Then run:
ffmpeg -i IMG_4605.MOV -c copy out.mov
Then if I send out.mov back to the iPhone and try to play it back, it plays back with glitches while seeking, like this: (original to the right)
When I try to drag the file into a new iMovie project and try to play it back, it freezes the whole iMovie app and needs a force quit.
Doing the same with the original causes no issues, so obviously there is something wrong with the way ffmpeg remuxes it, or something wrong with Apple's software.
ffmpeg -i IMG_4605.MOV
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
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
libavresample 4. 0. 0 / 4. 0. 0
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 'IMG_4605.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2019-12-29T10:20:56.000000Z
com.apple.quicktime.location.ISO6709: +01.3602+103.9897+024.438/
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone 11
com.apple.quicktime.software: 13.3
com.apple.quicktime.creationdate: 2019-12-29T18:20:56+0800
Duration: 00:00:09.00, start: 0.000000, bitrate: 24882 kb/s
Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 3840x2160, 24659 kb/s, 29.99 fps, 29.97 tbr, 600 tbn, 600 tbc (default)
Metadata:
rotate : 90
creation_time : 2019-12-29T10:20:56.000000Z
handler_name : Core Media Video
encoder : HEVC
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
creation_time : 2019-12-29T10:20:56.000000Z
handler_name : Core Media Audio
Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2019-12-29T10:20:56.000000Z
handler_name : Core Media Metadata
Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2019-12-29T10:20:56.000000Z
handler_name : Core Media Metadata
Stream #0:4(und): Data: none (mebx / 0x7862656D), 17 kb/s (default)
Metadata:
creation_time : 2019-12-29T10:20:56.000000Z
handler_name : Core Media Metadata
ffmpeg -i out.mov
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
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
libavresample 4. 0. 0 / 4. 0. 0
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 'out.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf58.29.100
Duration: 00:00:09.00, start: 0.000000, bitrate: 24860 kb/s
Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 3840x2160, 24659 kb/s, 29.99 fps, 29.97 tbr, 19200 tbn, 19200 tbc (default)
Metadata:
rotate : 90
handler_name : Core Media Video
encoder : HEVC
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
handler_name : Core Media Audio
If I open out.mov in QuickTime and do a trim and export it, then it it still "broken", so I'm thinking there's nothing wrong with the actual muxing into MOV, because QuickTime is passing the error on.
I noticed that out.mov has different parameters 19200 tbn, 19200 tbc (vs original 600 tbn, 600 tbc). However, if I force set these to 600 with -video_track_timescale 600 the output file is still broken.
Anyone got some insights?

Perl - Issue installing or connecting to queue manager from MQSeries - 1.34 (Reason = 2059)

I tried to install MQSeries 1.34 from CPAN, and I was getting an error, which I found a fix for on the CPAN bug tracking website. So I applied the fix and still got a few test errors, but the build seemed okay. Installing it with a force install MQSeries worked. Once I had installed it, I can construct objects and reference the libraries in my other perl scripts, but when I try to connect to the queue manager or queue, I get an error back.
Any advice on what is wrong with the setup or how to fix this and get my connection back up and running would be much appreciated.
Here are specifics about my configuration:
$ uname -srvpio
Linux 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64 x86_64 GNU/Linux
$ /opt/mqm/bin/dspmqsver
Name: WebSphere MQ Advanced Message Security
Version: 7.5.0.0
Level: p000-L120604
BuildType: IKAP - (Production)
$ rpm -qa |grep 'MQ' |sort
MQSeriesAMS-7.5.0-0.x86_64
MQSeriesClient-7.5.0-0.x86_64
MQSeriesExplorer-7.5.0-0.x86_64
MQSeriesFTAgent-7.5.0-0.x86_64
MQSeriesFTBase-7.5.0-0.x86_64
MQSeriesFTLogger-7.5.0-0.x86_64
MQSeriesFTService-7.5.0-0.x86_64
MQSeriesFTTools-7.5.0-0.x86_64
MQSeriesGSKit-7.5.0-0.x86_64
MQSeriesJava-7.5.0-0.x86_64
MQSeriesJRE-7.5.0-0.x86_64
MQSeriesMan-7.5.0-0.x86_64
MQSeriesMsg_cs-7.5.0-0.x86_64
MQSeriesMsg_de-7.5.0-0.x86_64
MQSeriesMsg_es-7.5.0-0.x86_64
MQSeriesMsg_fr-7.5.0-0.x86_64
MQSeriesMsg_hu-7.5.0-0.x86_64
MQSeriesMsg_it-7.5.0-0.x86_64
MQSeriesMsg_ja-7.5.0-0.x86_64
MQSeriesMsg_ko-7.5.0-0.x86_64
MQSeriesMsg_pl-7.5.0-0.x86_64
MQSeriesMsg_pt-7.5.0-0.x86_64
MQSeriesMsg_ru-7.5.0-0.x86_64
MQSeriesMsg_Zh_CN-7.5.0-0.x86_64
MQSeriesMsg_Zh_TW-7.5.0-0.x86_64
MQSeriesRuntime-7.5.0-0.x86_64
MQSeriesSamples-7.5.0-0.x86_64
MQSeriesSDK-7.5.0-0.x86_64
MQSeriesServer-7.5.0-0.x86_64
MQSeriesXRClients-7.5.0-0.x86_64
MQSeriesXRService-7.5.0-0.x86_64
$ ./dispModVersion.pl MQSeries
Module Installed CPAN
MQSeries 1.34 1.34
$ perl -v
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux
Copyright 1987-2015, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
$ perl -V
Summary of my perl5 (revision 5 version 22 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.32-573.22.1.el6.x86_64, archname=x86_64-linux
uname='linux ******* 2.6.32-573.22.1.el6.x86_64 #1 smp thu mar 17 03:23:39 edt 2016 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Dprefix=******'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-16)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.12'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Apr 18 2016 15:46:59
%ENV:
PERL5BIN="*******/bin"
PERL5HOME="*******"
PERL5SITE="*******/lib/site_perl/5.22.1"
#INC:
*******/lib/site_perl/5.22.1/x86_64-linux
*******/lib/site_perl/5.22.1
*******/lib/5.22.1/x86_64-linux
*******/lib/5.22.1
When I first tried to install MQSeries, I got the following error:
t/99-pod.t .. 2/63
# Failed test 'POD test for MQSeries/Message/IIH.pm'
# at Test/Pod.pm line 187.
# MQSeries/Message/IIH.pm (415): Non-ASCII character seen before =encoding in 'Villagâ–’mez'. Assuming CP1252
# Looks like you failed 1 test of 63.
t/99-pod.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/63 subtests
Test Summary Report
-------------------
t/99-pod.t (Wstat: 256 Tests: 63 Failed: 1)
Failed test: 61
Non-zero exit status: 1
Files=1, Tests=63, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.34 cusr 0.00 csys = 0.37 CPU)
Result: FAIL
Failed 1/1 test programs. 1/63 subtests failed.
Then, I modified the file MQSeries/Message/IIH.pm to add =encoding ISO-8859-1 at the start of the file, per bug report on CPAN, I ran the install again and got the following:
t/99-pod.t .. ok
All tests successful.
Files=1, Tests=63, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.34 cusr 0.01 csys = 0.39 CPU)
Result: PASS
make[1]: Entering directory `build/MQSeries-1.34-SLJq6K/MQClient'
PERL_DL_NONLAZY=1 "perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
t/10constants.t ........... ok
t/20convert.t ............. Failed 5/6 subtests
t/30basic.t ............... ok
t/31properties.t .......... ok
t/32async_put.t ........... ok
t/40oo-qmgr.t ............. 3/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 38.
# Failed test 'MQSeries::QueueManager - constructor'
# at t/40oo-qmgr.t line 39.
t/40oo-qmgr.t ............. 5/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 52.
# Failed test 'MQSeries::QueueManager - Connect'
# at t/40oo-qmgr.t line 58.
t/40oo-qmgr.t ............. 7/14 MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at t/40oo-qmgr.t line 73.
# Failed test 'MQSeries::QueueManager - constructor'
# at t/40oo-qmgr.t line 74.
Can't call method "Open" on an undefined value at t/40oo-qmgr.t line 77.
# Looks like you planned 14 tests but ran 7.
# Looks like you failed 3 tests of 7 run.
# Looks like your test exited with 13 just after 7.
t/40oo-qmgr.t ............. Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 10/14 subtests
t/50oo-command.t .......... ok
t/51oo-command-changes.t .. ok
t/52oo-command-filter.t ... ok
t/60-logs.t ............... ok
t/70-config.t ............. ok
Test Summary Report
-------------------
t/20convert.t (Wstat: 0 Tests: 2 Failed: 1)
Failed test: 2
Parse errors: Bad plan. You planned 6 tests but ran 2.
t/40oo-qmgr.t (Wstat: 3328 Tests: 7 Failed: 3)
Failed tests: 3, 5, 7
Non-zero exit status: 13
Parse errors: Bad plan. You planned 14 tests but ran 7.
Files=11, Tests=5334, 1264 wallclock secs ( 0.96 usr 0.02 sys + 1.56 cusr 0.18 csys = 2.72 CPU)
Result: FAIL
Failed 2/11 test programs. 4/5334 subtests failed.
If I force the install, I can get it to finish the install after everything is said and done, but then I get the following error when trying to connect:
MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at testMQConnectivity.pl line 16.
MQCONN failed (Reason = 2059) (Queue manager not available for connection.) at testMQConnectivity.pl line 16.
at MQSeries/QueueManager.pm line 809.
MQSeries::QueueManager::Connect(MQSeries::QueueManager=HASH(0x24a7180)) called at MQSeries/QueueManager.pm line 155
MQSeries::QueueManager::new(undef, "QueueManager", "*******", "Reason", SCALAR(0x151d4f0), "CompCode", SCALAR(0x151d610), "ClientConn", ...) called at testMQConnectivity.pl line 16
I edited the CONFIG file after pulling the data from CPAN to reference my remote MQ Queues that I can connect to using /opt/mqm/samp/bin/amqsputc or /opt/mqm/samp/bin/amqsgetc, after setting export MQSERVER=..., if I run make test TEST_VERBOSE=1 from the working CPAN directory, I see the following output:
t/20convert.t:
t/20convert.t .............
1..6
ok 1
ok 2
ok 3
ok 4
MQGET failed: CompCode => 2, Reason => 2033
not ok 5
Message conversion failed.
Should be: 'This msg is in EBCDIC'
Is: ''
not ok 6
Failed 2/6 subtests
t/31properties.t:
t/31properties.t ..........
1..22
ok 1 - use MQClient::MQSeries;
Connecting to queue manager '*******' (MQCONN)
ok 2 - MQCONN
Opening queue manager for inquire
ok 3 - MQOPEN - queue manager
Querying queue manager attributes (MQINQ)
ok 4 - MQINQ
Closing queue manager object handle (MQCLOSE)
ok 5 - MQCLOSE - queue manager
Create message handle object (MQCRTMH)
ok 6 - MQCRTMH
Set message property (MQSETMP - string)
ok 7 - MQSETMP - string
Set message property (MQSETMP - float)
ok 8 - MQSETMP - float
Set message property (MQSETMP - int)
ok 9 - MQSETMP - int
Inquire message property (MQINQMP - float)
ok 10 - MQINQMP - float
ok 11 - MQINQMP - float value okay (3.14164996147156)
Delete float property
ok 12 - MQDLTMP - float
Opening queue '*******' (MQOPEN)
ok 13 - MQOPEN - queue
Putting message with properties (MQPUT)
ok 14 - MQPUT
Create message handle object (MQCRTMH #2)
ok 15 - MQCRTMH \#2
Getting message (MQGET)
not ok 16 - MQGET
# Failed test 'MQGET'
# at t/31properties.t line 146.
Inquire message property (MQINQMP - int)
not ok 17 - MQINQMP - int
# Failed test 'MQINQMP - int'
# at t/31properties.t line 156.
Use of uninitialized value $prop in concatenation (.) or string at t/31properties.t line 157.
not ok 18 - MQINQMP - int value okay ()
# Failed test 'MQINQMP - int value okay ()'
# at t/31properties.t line 157.
# got: undef
# expected: '42'
Delete message handle (MQDLTMH)
ok 19 - MQDLTMH
Delete message handle (MQDLTMH #2)
ok 20 - MQDLTMH \#2
Closing queue (MQCLOSE)
ok 21 - MQCLOSE
Disconnecting (MQDISC)
ok 22 - MQDISC
# Looks like you failed 3 tests of 22.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/22 subtests
t/32async_put.t:
t/32async_put.t ...........
1..25
ok 1 - use MQClient::MQSeries;
Connecting to queue manager '*******' (MQCONN)
ok 2 - MQCONN
Opening queue manager for inquire
ok 3 - MQOPEN - queue manager
Querying queue manager attributes (MQINQ)
MQINQ returned: CompCode => 0, Reason => 0
ok 4 - MQINQ
Closing queue manager object handle (MQCLOSE)
ok 5 - MQCLOSE - queue manager
Opening queue '*******' (MQOPEN)
ok 6 - MQOPEN - queue
Putting message #1 (async MQPUT)
ok 7 - MQPUT - 1
Putting message #2 (async MQPUT)
ok 8 - MQPUT - 2
Putting message #3 (async MQPUT)
ok 9 - MQPUT - 3
Putting message #4 (async MQPUT)
ok 10 - MQPUT - 4
Putting message #5 (async MQPUT)
ok 11 - MQPUT - 5
Getting status info (MQSTAT)
ok 12 - MQSTAT
not ok 13 - MQSTAT result
# Failed test 'MQSTAT result'
# at t/32async_put.t line 120.
# Structures begin differing at:
# $got->{PutSuccessCount} = '5'
# $expected->{PutSuccessCount} = '0'
Getting message #1 (MQGET)
ok 14 - MQGET - 1
ok 15 - MQGET message content - 1
Getting message #2 (MQGET)
ok 16 - MQGET - 2
ok 17 - MQGET message content - 2
Getting message #3 (MQGET)
ok 18 - MQGET - 3
ok 19 - MQGET message content - 3
Getting message #4 (MQGET)
ok 20 - MQGET - 4
ok 21 - MQGET message content - 4
Getting message #5 (MQGET)
ok 22 - MQGET - 5
ok 23 - MQGET message content - 5
Closing queue (MQCLOSE)
ok 24 - MQCLOSE
Disconnecting (MQDISC)
ok 25 - MQDISC
# Looks like you failed 1 test of 25.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/25 subtests
And t/40oo-qmgr.t, which was previously failing now executes successfully:
t/40oo-qmgr.t:
t/40oo-qmgr.t .............
1..14
ok 1 - use MQClient::MQSeries;
ok 2 - use MQSeries::QueueManager;
ok 3 - MQSeries::QueueManager - constructor
ok 4 - MQSeries::QueueManager - constructor - AutoConnect=0
ok 5 - MQSeries::QueueManager - Connect
ok 6 - MQSeries::QueueManager - Disconnect
ok 7 - MQSeries::QueueManager - constructor
ok 8 - MQSeries::QueueManager - Open
ok 9 - MQSeries::QueueManager - Inquire
ok 10 - MQSeries::QueueManager - Inquire - Platform
ok 11 - MQSeries::QueueManager - Inquire - CodedCharSetId
ok 12 - MQSeries::QueueManager - Inquire - CommandLevel
ok 13 - MQSeries::QueueManager - Inquire - DeadLetterQName
ok 14 - MQSeries::QueueManager - Close
ok
Yielding the final results:
Test Summary Report
-------------------
t/20convert.t (Wstat: 0 Tests: 6 Failed: 2)
Failed tests: 5-6
t/31properties.t (Wstat: 768 Tests: 22 Failed: 3)
Failed tests: 16-18
Non-zero exit status: 3
t/32async_put.t (Wstat: 256 Tests: 25 Failed: 1)
Failed test: 13
Non-zero exit status: 1
Files=11, Tests=5345, 183 wallclock secs ( 1.02 usr 0.08 sys + 1.48 cusr 0.18 csys = 2.76 CPU)
Result: FAIL
Failed 3/11 test programs. 6/5345 subtests failed.
Any ideas on how to get this resolved and get the package up and running?
If I run /opt/mqm/samp/bin/amqsputc or /opt/mqm/samp/bin/amqsgetc, I can connect to the same host, port, channel, queue manager, and queue from this host.
Thanks!

IframeExtractor don't output sound with rtsp

I use IframeExtractor from the git mooncatventure, it play nice the .mov file.
But when i try to read a rtsp stream, i hear no sound.
This is the FFMEG dump from the rtsp stream:
Metadata:
title : unknown
comment : unknown
Duration: N/A, start: 49435.000589, bitrate: 258 kb/s
Program 3223
No Program
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1(fra): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 142 kb/s
Stream #0:2(fra): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:3(qad): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp, 47 kb/s
Stream #0:4(qaa): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 68 kb/s
And this is the dump from the local .mov file that work:
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2010-01-17 21:52:33
model : iPhone 3GS
model-eng : iPhone 3GS
date : 2010-01-17T16:52:33-0500
date-eng : 2010-01-17T16:52:33-0500
encoder : 3.1.2
encoder-eng : 3.1.2
make : Apple
make-eng : Apple
Duration: 00:00:03.25, start: 0.000000, bitrate: 3836 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 3695 kb/s, 30.02 fps, 30 tbr, 600 tbn, 1200 tbc
Metadata:
rotate : 90
creation_time : 2010-01-17 21:52:33
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s
Metadata:
creation_time : 2010-01-17 21:52:33
handler_name : Core Media Data Handler
The audio class that manage sounds contain a codec detector which say that the codec CODEC_ID_AAC is found for the two input:
audioStreamBasicDesc_.mFormatFlags = 0;
switch (_audioCodecContext->codec_id) {
case CODEC_ID_MP3:
audioStreamBasicDesc_.mFormatID = kAudioFormatMPEGLayer3;
break;
case CODEC_ID_AAC:
audioStreamBasicDesc_.mFormatID = kAudioFormatMPEG4AAC;
audioStreamBasicDesc_.mFormatFlags = kMPEG4Object_AAC_Main;
NSLog(#"audio format aac %s (%d) is supported", _audioCodecContext->codec_name, _audioCodecContext->codec_id);
break;
}
I see data going into the buffer but i hear nothing. It's maybe audioStreamBasicDesc_ which has wrong settings but i can't find what.
Is it possible that it's not the same AAC codec ?
Has someone experienced the same issue ?
Any help are welcome, i'm on this problem since some days now.
Edit:
I have found a error that i had not before, i don't know how to resolve it. If i change audioStreamBasicDesc.mFramesPerPacket to 0 or divided by 2, the error message dissapear.
AudioConverterNew returned 'fmt?'
Prime failed ('fmt?'); will stop (72000/0 frames)
You could try forcing a buffer size here of some arbitraraly large size, say 480000
status = AudioQueueAllocateBufferWithPacketDescriptions(audioQueue_,
audioStreamBasicDesc_.mSampleRate * kAudioBufferSeconds / 8,
_audioCodecContext->sample_rate * kAudioBufferSeconds /
_audioCodecContext->frame_size + 1,
&audioQueueBuffer_[i]);

Perl FFMpeg print output

Hi im using the following perl command to convert files with ffmpeg:
system ("/usr/local/bin/ffmpeg -i $inputFile $outputFile");
I would like to know if its possible to print the ffmpeg output?
Cheers
UPDATE
The solution was to use backticks
my $output = qx{/usr/local/bin/ffmpeg -i $inputFile $outputFile 2>&1};
print $output
This prints out the following:
FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers built on Jan 31 2012 12:30:35 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6) configuration: --enable-libmp3lame --disable-mmx --enable-shared libavutil 50.36. 0 / 50.36. 0 libavcore 0.16. 1 / 0.16. 1 libavcodec 52.108. 0 / 52.108. 0 libavformat 52.93. 0 / 52.93. 0 libavdevice 52. 2. 3 / 52. 2. 3 libavfilter 1.74. 0 / 1.74. 0 libswscale 0.12. 0 / 0.12. 0 [wav # 0x8af94c0] max_analyze_duration reached Input #0, wav, from 'a.wav': Duration: 00:00:05.84, bitrate: 1537 kb/s Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s Output #0, mp3, to 'a.mp3': Metadata: TSSE : Lavf52.93.0 Stream #0.0: Audio: libmp3lame, 48000 Hz, 2 channels, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding size= 42kB time=5.42 bitrate= 64.0kbits/s size= 46kB time=5.88 bitrate= 64.0kbits/s video:0kB audio:46kB global headers:0kB muxing overhead 0.070153%
Hint: FFmpeg throws its output to the StandrdError instead of StandrdOutput