Using RedLaser SDK via MonoTouch crashing as soon as BarcodePickerController shown - c#

I'm using Chris Branson's RedLaser MonoTouch bindings and sample from here:
https://github.com/chrisbranson/RedLaserSample
Firstly, to help out those also having trouble with this sample project, I had to update both the makefile to build the RedLaser.dll MonoTouch bindings and the sample MonoDevelop csproj to get the actual app compiling.
Makefile
The makefile supplied by Chris unzipped the RedLaser SDK download, but RedLaser changed their naming convention and so it was no longer working. I simplified it, instead requiring the user to put the libRedLaserSDK.a file into the build directory manually:
BTOUCH=/Developer/MonoTouch/usr/bin/btouch
BUILDVER=build139
VERSION=3.2.4
BINDIR=./bin/
all: $(BINDIR)RedLaser.dll
$(BINDIR)libRedLaserSDK.a:
#echo "You'll need to obtain a copy of RedLaserDevSDK-$(VERSION).zip from"
#echo "http://redlaser.com/sdk/index.php"
#echo Locate the libRedLaserSDK.a file and place within
#echo $(BINDIR)
#echo
#open http://redlaser.com/sdk/index.php
#exit 1
$(BINDIR)RedLaser.dll: Makefile AssemblyInfo.cs RedLaser.cs enums.cs $(BINDIR)libRedLaserSDK.a
$(BTOUCH) --out=$# -e RedLaser.cs enums.cs AssemblyInfo.cs --link-with=$(BINDIR)libRedLaserSDK.a,libRedLaserSDK.a
clean:
-rm -rf $(BINDIR)*.dll
The directory containing the makefile should also contain the files redlaser.cs, enums.cs and AssemblyInfo.cs (i.e. the same as Chris's).
MonoDevelop project build settings
I think the reason this stopped working was a bug in MonoDevelop or MonoTouch and the way it expands the 'Additional mtouch arguments' when they contained quotation marks. Chris's original arguments looked like this:
-cxx -gcc_flags="-framework SystemConfiguration -framework CFNetwork -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework OpenGLES -framework Security -L${ProjectDir}/Lib -lRedLaserSDK -ObjC"
MonoDevelop doesn't parse this correctly, instead inserting quotation marks around each option separated by a space. Looking in the build output (under 'Compiling to native code') showed that this got expanded to:
"/Users/tyson/Downloads/chrisbranson-RedLaserSample-1a5545f-1/RedLaserSample/Lib/RedLaser.dll" -debug -nolink -sdk "5.1" -targetver "5.1" --armv7 "-cxx" "-gcc_flags=\"-framework" "SystemConfiguration" "-framework" "CFNetwork" "-framework" "CoreVideo" "-framework" "CoreMedia" "-framework" "AVFoundation" "-framework" "OpenGLES" "-framework" "Security" "-L/Users/tyson/Downloads/chrisbranson-RedLaserSample-1a5545f-1/RedLaserSample/Lib" "-lRedLaserSDK" "-ObjC\""
The solution involves adding explicit quotation marks around the whole 'gcc_flags' option, manually escaping the inner quotation marks. e.g:
"-cxx" "-gcc_flags=\"-framework SystemConfiguration -framework CFNetwork -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework OpenGLES -framework Security -L${ProjectDir}/Lib -lRedLaserSDK -ObjC\""
This expands correctly into:
"/Users/tyson/Downloads/chrisbranson-RedLaserSample-1a5545f-1/RedLaserSample/Lib/RedLaser.dll" -debug -nolink -sdk "5.1" -targetver "5.1" --armv7 "-cxx" "-gcc_flags=\"-framework SystemConfiguration -framework CFNetwork -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework OpenGLES -framework Security -L/Users/tyson/Downloads/chrisbranson-RedLaserSample-1a5545f-1/RedLaserSample/Lib -lRedLaserSDK -ObjC\""
Ok, so now that I had it compiling I attempted to run it on my phone. The app loads up fine, and successfully calls into the RedLaser SDK via the RedLaserSDK.CheckReadyStatus() function. But as soon as I hit the scan button (which loads the BarcodePickerController) it crashes with a native exception deep within the RedLaser SDK:
terminate called throwing an exception
Native stacktrace:
0 RedLaserSample 0x0159d62d mono_handle_native_sigsegv + 244
1 RedLaserSample 0x015b6251 sigabrt_signal_handler + 112
2 libsystem_c.dylib 0x319b67ed _sigtramp + 48
3 libsystem_c.dylib 0x319ac20f pthread_kill + 54
4 libsystem_c.dylib 0x319a529f abort + 94
5 libc++abi.dylib 0x34fb1f6b abort_message + 46
6 libc++abi.dylib 0x34faf34d _ZL17default_terminatev + 24
7 libobjc.A.dylib 0x358e536f _objc_terminate + 170
8 libc++abi.dylib 0x34faf3c5 _ZL19safe_handler_callerPFvvE + 76
9 libc++abi.dylib 0x34faf451 _ZdlPv + 0
10 libc++abi.dylib 0x34fb079f __cxa_throw + 122
11 RedLaserSample 0x000404a9 _ZN5zxing6qrcode19FinderPatternFinder18selectBestPatternsEv + 172
12 RedLaserSample 0x000415e9 _ZN5zxing6qrcode19FinderPatternFinder4findERKNS_11DecodeHintsE + 512
13 RedLaserSample 0x0003a7f7 _ZN5zxing6qrcode8Detector6detectERKNS_11DecodeHintsE + 366
14 RedLaserSample 0x00046b97 _ZN5zxing6qrcode12QRCodeReader6decodeENS_3RefINS_12BinaryBitmapEEENS_11DecodeHintsE + 130
15 RedLaserSample 0x0004ec35 _ZN5zxing6Reader6decodeENS_3RefINS_12BinaryBitmapEEE + 240
16 RedLaserSample 0x00058455 -[FormatReader decode:] + 116
17 RedLaserSample 0x00013835 -[ZXingDecoder findCodesInBitmap:bytesPerRow:width:height:] + 656
18 RedLaserSample 0x0005f6af -[BarcodePhotoEngine zxingFindBarcodesInPixmap:] + 222
19 RedLaserSample 0x00055f25 __38-[BarcodeEngine findBarcodesInPixMap:]_block_invoke_059 + 76
20 libdispatch.dylib 0x34635c59 _dispatch_call_block_and_release + 12
21 libdispatch.dylib 0x34637d0f _dispatch_queue_drain + 274
22 libdispatch.dylib 0x34637b75 _dispatch_queue_invoke$VARIANT$mp + 40
23 libdispatch.dylib 0x346387e7 _dispatch_worker_thread2 + 210
24 libsystem_c.dylib 0x31967dfb _pthread_wqthread + 294
25 libsystem_c.dylib 0x31967cd0 start_wqthread + 8
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Running the very similar RedLaser Xcode sample project (i.e. no MonoTouch involvement, all objective-c) works fine.
Also, if it is of any significance, disabling all barcode scan types allows the BarcodePickerController to load up and display the camera view. Obviously it never detects a barcode though.

The crash you mention has been fixed in the bindings now.
It was related to QR's usage of C++ exceptions and incorrect linking arguments.

According to the Makefile you pasted, this RedLaser binding uses the LinkWith[1] feature supported by MonoTouch to eliminate the need to use any "Additional mtouch arguments".
Just wipe out any arguments needed for RedLaser from your additional mtouch arguments configuration in your Project Options and things will likely build & work properly.
If not, try using the RedLaser binding from https://github.com/xamarin/monotouch-bindings which may be more up-to-date?
Notes:
http://blog.xamarin.com/2011/11/02/monotouch-native-libraries-made-easy/

Related

Xamarin.iOS app crashes on startup with iPhone5 when downloaded from app store. DYLD, Library not loaded error.-+

I am working on a Xamarin application. The app works fine when deployed Ad-Hoc on my iPhone5. The App works fine on iPad and iPhone6 both in Ad-Hoc and App Store versions. However, I get an instant crash when I try to start the App Store/TestFlight version on my iPhone 5.
Here is the crash log :
{"bug_type":"109","os_version":"iPhone OS 10.3.4 (14G61)","build_version":"1.3.1","timestamp":"2019-11-25 14:01:05.33 -0500","app_name":"CPEEP.iOS","bundleID":"com.altilogix.cpeeps","incident_id":"CE93C272-D023-4058-AE75-6BF205893BEB","name":"CPEEP.iOS","is_first_party":false,"app_version":"1.3.1","share_with_app_devs":true,"slice_uuid":"8d939558-dc29-3773-ba5d-be06524a29ef","adam_id":1455126201}
Incident Identifier: CE93C272-D023-4058-AE75-6BF205893BEB
CrashReporter Key: 686e40dceea53078e133cbcd92ef064c6b7840a0
Hardware Model: iPhone5,1
Process: CPEEP.iOS [330]
Path: /private/var/containers/Bundle/Application/23B56006-7F53-468B-AAC2-18B74EA02613/CPEEP.iOS.app/CPEEP.iOS
Identifier: com.altilogix.cpeeps
Version: 1.3.1 (1.3.1)
Code Type: ARM (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.altilogix.cpeeps [527]
Date/Time: 2019-11-25 14:01:05.2600 -0500
Launch Time: 2019-11-25 14:01:05.0000 -0500
OS Version: iPhone OS 10.3.4 (14G61)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: #rpath/MaterialComponents.framework/MaterialComponents | Referenced from: /var/containers/Bundle/Application/23B56006-7F53-468B-AAC2-18B74EA02613/CPEEP.iOS.app/CPEEP.iOS | Reason: image not found
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 Crashed:
0 dyld 0x03f1c1dc 0x3efa000 + 139740
1 dyld 0x03f1be3e 0x3efa000 + 138814
2 dyld 0x03f1be78 0x3efa000 + 138872
3 dyld 0x03efdca4 0x3efa000 + 15524
4 dyld 0x03f00588 0x3efa000 + 25992
5 dyld 0x03efb1d0 0x3efa000 + 4560
6 dyld 0x03efb040 0x3efa000 + 4160
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x04064228
r4: 0x000000ab r5: 0x04063e28 r6: 0x00000000 r7: 0x04063df4
r8: 0x00000000 r9: 0x000000ab r10: 0x00000000 r11: 0x00000000
ip: 0x00000209 sp: 0x04063db4 lr: 0x03f1be3f pc: 0x03f1c1dc
cpsr: 0x40000010
Binary Images:
0x98000 - 0x3af3fff CPEEP.iOS armv7 <8d939558dc293773ba5dbe06524a29ef> /var/containers/Bundle/Application/23B56006-7F53-468B-AAC2-18B74EA02613/CPEEP.iOS.app/CPEEP.iOS
0x3efa000 - 0x3f25fff dyld armv7s <f0f6706c72713272afd9a5f6ec9b6071> /usr/lib/dyld
0x4066000 - 0x4439fff libSkiaSharp armv7 <3d824f59dc7b393c906a666eaa541d0e> /var/containers/Bundle/Application/23B56006-7F53-468B-AAC2-18B74EA02613/CPEEP.iOS.app/Frameworks/libSkiaSharp.framework/libSkiaSharp
EOF
Here is my build config:
I build for ARMv7 + ARM64, with my configuration set to AppStore
I've looked around but most solutions to problems of this nature seem to deal with Swift or XCode and not Xamarin/Visual Studio.
I have tried this solution : https://www.gitmemory.com/issue/xamarin/XamarinComponents/597/520597929 with no success.
I am a beginner when it comes to Xamarin and deploying apps.
Edit:
So it turns out the Frameworks in my .ipa have a info.plist files with a UIRequiredDeviceCapabilities key with the value arm64 which makes Apple's thinning process remove armv7 versions of these frameworks. I have no clue why this key appears in those frameworks however.
Affected frameworks :
MaterialComponents.framework
MDFInternationalization.framework
MDFTextAccessibility.framework
MotionAnimator.framework
MotionInterchange.framework
MotionTransitioning.framework
Unaffected frameworks :
libSkiaSharp.framework

Exception: Application initializing document picker is missing the iCloud entitlement. Is com.apple.developer.icloud-container-identifiers set?

I am using file picker from below link: 2.0.8-beta
https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows
I have setup my iOS xamarin project and sets all the data in my application mentioned in below link:
https://learn.microsoft.com/en-in/xamarin/ios/data-cloud/intro-to-cloudkit
But now I am getting below error for iOS. Any body have any idea?
Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Application initializing
document picker is missing the iCloud entitlement. Is
com.apple.developer.icloud-container-identifiers set?
Native stack trace:
0 CoreFoundation 0x0000000185ace37c + 148
1 libobjc.A.dylib 0x0000000184d14528 objc_exception_throw + 56
2 CoreFoundation 0x0000000185ace238 + 0
3 Foundation 0x00000001864697f4 + 112
4 UIKit 0x000000018f77ff0c + 300
5 UIKit 0x000000018f77f788 + 228
6 XamarinFilePickerTest.iOS 0x0000000102e038e8 XamarinFilePickerTest.iOS + 38582504
7 XamarinFilePickerTest.iOS 0x0000000102245904 XamarinFilePickerTest.iOS + 26269956
8 XamarinFilePickerTest.iOS 0x000000010321dfd0 XamarinFilePickerTest.iOS + 42885072
9 XamarinFilePickerTest.iOS 0x000000010321f4e4 XamarinFilePickerTest.iOS + 42890468
10 XamarinFilePickerTest.iOS 0x000000010322f334 XamarinFilePickerTest.iOS + 42955572
Application initializing document picker is missing the iCloud entitlement. Is com.apple.developer.icloud-container-identifiers set?
Refer to Enabling CloudKit in a Xamarin Application
Enable iCloud in Entitlements.plistand ensure the Ubiquity Container exists for the application.

BSOD 0x8E STATUS_SINGLE_STEP

I have a BSOD 0x8E every day on five devices in same times on Windows 7.
Allways exception code - 04 - STATUS_SINGLE_STEP
as example:
1: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
KERNEL_MODE_EXCEPTION_NOT_HANDLED_M (1000008e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003. This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG. This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but ...
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG. This will let us see why this breakpoint is
happening.
Arguments:
Arg1: 80000004, The exception code that was not handled
Arg2: ffdff2a5, The address that the exception occurred at
Arg3: a9c34d48, Trap Frame
Arg4: 00000000
Debugging Details:
------------------
DUMP_CLASS: 1
DUMP_QUALIFIER: 400
BUILD_VERSION_STRING: 7601.17514.x86fre.win7sp1_rtm.101119-1850
SYSTEM_MANUFACTURER: System manufacturer
SYSTEM_PRODUCT_NAME: System Product Name
SYSTEM_SKU: SKU
SYSTEM_VERSION: System Version
BIOS_VENDOR: American Megatrends Inc.
BIOS_VERSION: 1002
BIOS_DATE: 06/04/2013
BASEBOARD_MANUFACTURER: ASUSTeK COMPUTER INC.
BASEBOARD_PRODUCT: P8H61-I LX R2.0
BASEBOARD_VERSION: Rev X.0x
DUMP_TYPE: 2
BUGCHECK_P1: ffffffff80000004
BUGCHECK_P2: ffffffffffdff2a5
BUGCHECK_P3: ffffffffa9c34d48
BUGCHECK_P4: 0
EXCEPTION_CODE: (HRESULT) 0x80000004 (2147483652) - <Unable to get error code text>
FAULTING_IP:
+0
ffdff2a5 0000 add byte ptr [eax],al
TRAP_FRAME: a9c34d48 -- (.trap 0xffffffffa9c34d48)
ErrCode = 00000000
eax=00000000 ebx=846410c0 ecx=00000000 edx=00000000 esi=0c4cdb04 edi=00000000
eip=ffdff2a5 esp=a9c34dbc ebp=801ef000 iopl=0 ov dn di ng nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00004c86
ffdff2a5 0000 add byte ptr [eax],al ds:0023:00000000=??
Resetting default scope
CPU_COUNT: 2
CPU_MHZ: a8c
CPU_VENDOR: GenuineIntel
CPU_FAMILY: 6
CPU_MODEL: 3a
CPU_STEPPING: 9
CPU_MICROCODE: 6,3a,9,0 (F,M,S,R) SIG: 17'00000000 (cache) 17'00000000 (init)
CUSTOMER_CRASH_COUNT: 1
DEFAULT_BUCKET_ID: BAD_STACK_0x8E
BUGCHECK_STR: 0x8E
PROCESS_NAME: avp.exe
CURRENT_IRQL: 0
ANALYSIS_SESSION_HOST: NETMANNOTE
ANALYSIS_SESSION_TIME: 11-17-2017 12:11:18.0584
ANALYSIS_VERSION: 10.0.15063.468 x86fre
LAST_CONTROL_TRANSFER: from 00000000 to ffdff2a5
STACK_TEXT:
a9c34db8 00000000 0000027f 00000000 00000000 0xffdff2a5
STACK_COMMAND: .trap 0xffffffffa9c34d48 ; kb
SYMBOL_NAME: ANALYSIS_INCONCLUSIVE
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: Unknown_Module
IMAGE_NAME: Unknown_Image
DEBUG_FLR_IMAGE_TIMESTAMP: 0
BUCKET_ID: BAD_STACK_0x8E
PRIMARY_PROBLEM_CLASS: BAD_STACK
FAILURE_BUCKET_ID: BAD_STACK_0x8E
TARGET_TIME: 2017-11-16T13:53:07.000Z
OSBUILD: 7601
OSSERVICEPACK: 1000
SERVICEPACK_NUMBER: 0
OS_REVISION: 0
SUITE_MASK: 336
PRODUCT_TYPE: 1
OSPLATFORM_TYPE: x86
OSNAME: Windows 7
OSEDITION: Windows 7 WinNt (Service Pack 1) TerminalServer EmbeddedNT SingleUserTS
OS_LOCALE:
USER_LCID: 0
OSBUILD_TIMESTAMP: 2010-11-20 11:42:49
BUILDDATESTAMP_STR: 101119-1850
BUILDLAB_STR: win7sp1_rtm
BUILDOSVER_STR: 6.1.7601.17514.x86fre.win7sp1_rtm.101119-1850
ANALYSIS_SESSION_ELAPSED_TIME: cc3
ANALYSIS_SOURCE: KM
FAILURE_ID_HASH_STRING: km:bad_stack_0x8e
FAILURE_ID_HASH: {993602b9-6aa7-fbab-86a8-bb6ad81a3997}
Followup: MachineOwner
The service name can be different: av.exe, scvhost.ext,..
I know that is due to the a driver does not process STATUS_SINGLE_STEP exception.
Is any idea how to find wrong driver? There is no stack and module name in the dump...
I tried to run the Mirosoft Driver Verifier with standart flags and all drivers without Microsoft drivers, dump listing is above.

how to solve ffmpeg watermark "No such filter: 'movie'" AND "Failed to avformat_open_input"?

i am developing a windows service, my windows service use "ffmpeg" and same time i am developing a desktop application for testing the code.
i want to import a watermark in my videos. i can do it with my desktop app. but when i run my windows service it take an error.
ffmpeg version N-36635-gceb0dd9 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 9 2012 17:39:58 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 34.100 / 51. 34.100
libavcodec 53. 54.100 / 53. 54.100
libavformat 53. 29.100 / 53. 29.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 58.100 / 2. 58.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 51. 2.100 / 51. 2.100
[mpeg4 # 01CA93A0] Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from 'C:\Apps\SabilVideoProcesser\WAITING_FOR_WATERMARK\Pixar - For the Birds.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:03:16.56, start: 0.000000, bitrate: 2113 kb/s
Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 25 fps, 25 tbr, 25 tbn, 30k tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 32 kb/s
[buffer # 02746A20] w:720 h:416 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[movie # 02748E00] Failed to avformat_open_input 'logo.png'
Error initializing filter 'movie' with args 'logo.png'
Error opening filters!
i change logo.png sometimes but it didnt work and fixed. i dont understand what is wrong?
I tried change ffmpeg.exe and i downloaded from "http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/static/" but when i run service, i got an error again. this time error is different i will crazy...
FFmpeg version SVN-r26400, Copyright (c) 2000-2011 the FFmpeg developers
built on Jan 18 2011 04:07:05 with gcc 4.4.2
configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect --enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack
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
[mpeg4 # 003dfbd0] Invalid and inefficient vfw-avi packed B frames detected
[mpeg4 # 003dfbd0] frame skip 8
Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 25.00 (25/1)
Input #0, avi, from 'C:\Apps\SabilVideoProcesser\WAITING_FOR_WATERMARK\Pixar - For the Birds.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:03:16.56, start: 0.000000, bitrate: 2113 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 720x416 [PAR 1:1 DAR 45:26], 25 fps, 25 tbr, 25 tbn, 30k tbc
Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 189 kb/s
[buffer # 020d51b0] w:720 h:416 pixfmt:yuv420p
No such filter: 'movie'
Error opening filters!
here is the my ffmpeg params;
-i "C:\Apps\SabilVideoProcesser\WAITING_FOR_WATERMARK\Pixar - For the Birds.avi" -vf "movie=logo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]" -vcodec libx264 -acodec ac3_fixed "C:\Apps\SabilVideoProcesser\WAITING_FOR_SPLIT\inprocess_Pixar - For the Birds.avi"
Issue #1: Failed to avformat_open_input 'logo.png'
You are experiencing two separate issues. The message Failed to avformat_open_input 'logo.png' probably indicates that ffmpeg can't find logo.png (or perhaps can't decode it properly). Either provide an absolute path to the file or place it in the same directory (or "folder" I believe is the Windows vernacular) as your ffmpeg binary. If the file is in the correct location then run ffmpeg -i logo.png to see if ffmpeg can even decode it.
Issue #2: No such filter: 'movie'
The second message No such filter: 'movie' indicates that the ffmpeg used in this command is too old and either supports no filters or is simply too old for movie. Binaries from arrozcru.org are outdated. The Zeranoe FFmpeg Builds are kept up to date and are configured sanely. You should go ahead and get a more recent binary while your at it. Revision 36635 is already at least 3696 revisions old. Then take a look at FFmpeg: The ultimate Video and Audio Manipulation Tool for a good overview on usage.
Adding watermark
Anyway, you don't need the movie source filter to add a watermark. See the example in How to add transparent watermark in center of a video with ffmpeg?
Faced the same issue
(Error initializing filter 'movie' with args '/mnt/sdcard/MyApp/frame.png').
Using static ffmpeg library in my android app. On samsung galaxy s3 it works fine, but on the lenovo and htc 2.3.6 i had same error in ffmpeg - he coudln't find my watermark. Fixed this error by moving waterkmark in the same folder as ffmpeg (executable). So now i using next path in movie filter "...movie=frame.png..." instead of "...movie=/mnt/sdcard/MyApp/frame.png". Still don't know is it a bug or i'm just doing something wrong.

Better MonoTouch crashes with TestFlight

We've hooked up TestFlight and the TestFlight SDK with MonoTouch and so far it's working great.
One thing we've noticed is that the crash reports are more geared towards Obj-C apps.
They look like this after you upload a zipped dSYM file:
0 OurApp 0x007a7116 testflight_backtrace + 170
1 OurApp0x007a7c3c TFSignalHandler + 208
2 libsystem_c.dylib 0x34f68538 _sigtramp + 48
3 libsystem_c.dylib 0x34f5df5a pthread_kill + 54
4 libsystem_c.dylib 0x34f56fea abort + 94
5 OurApp 0x007793b3 monoeg_g_logv (goutput.c:137)
6 OurApp 0x0077941f monoeg_g_log (goutput.c:147)
7 OurApp 0x005f1393 get_numerous_trampoline (aot-runtime.c:3447)
8 OurApp 0x005f1b2f mono_aot_get_imt_thunk (aot-runtime.c:3576)
9 OurApp 0x006e2c83 initialize_imt_slot (object.c:1247)
10 OurApp 0x006e321f build_imt_slots (object.c:1371)
11 OurApp 0x006e356f mono_vtable_build_imt_slot (object.c:1439)
12 OurApp 0x005fcf83 mono_convert_imt_slot_to_vtable_slot (mini-trampolines.c:198)
13 OurApp 0x005fd50f common_call_trampoline (mini-trampolines.c:333)
14 OurApp 0x005fe573 mono_vcall_trampoline (mini-trampolines.c:644)
15 OurApp 0x0056a68f generic_trampoline_vcall (mscorlib.dll.6.s:194345)
16 OurApp 0x00416b4f System_Collections_Generic_List_1__ctor_System_Collections_Generic_IEnumerable_1_T (mscorlib.dll.6.s:32014)
17 OurApp 0x0026955b System_Linq_Enumerable_ToList_TSource_System_Collections_Generic_IEnumerable_1_TSource (System.Core.dll.6.s:1917)
So you can tell the general C# function where the crash occurred. (Note: this crash was a bug in MonoTouch 5.0.1 where Linq generics were messed up, seems to be fixed in 5.0.2)
It would be nice to get the full C# stack trace in here, any thoughts on how to do that? I could hook into AppDomain.UnhandledException and put a try-catch around my static void Main method, but wondered if there is a way to report the stack trace out to TestFlight.
I'm not familiar with MonoTouch, but what about using the Remote Logging features of the TestFlight SDK?

Categories

Resources