
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (100)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (12821)
-
FFMPEG results in a silent video when trying to combine video and audio tracks
23 septembre 2017, par Stuart ClarkeI’m using the following command to combine a video and an audio track.
ffmpeg -y -i /var/www/temp/merged.mp4 -i /var/www/temp/combined.mp3 -strict -2 /var/www/temp/videoExtouiulbjryzxlehjj2.mp4
Edit :
Here is the output from the first command
ffmpeg version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --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-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-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/temp/merged.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.15.102
Duration: 00:02:31.80, start: 0.000000, bitrate: 2384 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2381 kb/s, 25.43 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 0 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mp3, from '/var/www/temp/audioTrack.mp3':
Metadata:
encoder : Lavf56.15.102
Duration: 00:02:08.94, start: 0.011995, bitrate: 128 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Metadata:
encoder : Lavf
[libx264 @ 0x1e903a0] using SAR=1/1
[libx264 @ 0x1e903a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x1e903a0] profile High, level 4.0
[libx264 @ 0x1e903a0] 264 - core 142 r2495 6a301b6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/var/www/temp/videoExtvzxvphotsyfpcbkd.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.15.102
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc56.13.100 libx264
Stream #0:1(und): Audio: mp3 (libmp3lame) (i[0][0][0] / 0x0069), 48000 Hz, stereo, fltp (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc56.13.100 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
frame= 31 fps=0.0 q=0.0 size= 0kB time=00:00:01.05 bitrate= 0.4kbits/s dup=1 drop=0frame= 46 fps= 41 q=0.0 size= 0kB time=00:00:01.56 bitrate= 0.2kbits/s dup=1 drop=0frame= 52 fps= 32 q=29.0 size= 149kB time=00:00:01.75 bitrate= 698.4kbits/s dup=1 drop=frame= 64 fps= 28 q=29.0 size= 258kB time=00:00:02.16 bitrate= 977.2kbits/s dup=1 drop=frame= 74 fps= 26 q=29.0 size= 389kB
video:39673kB audio:211kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.143487%
[libx264 @ 0x1e903a0] frame I:27 Avg QP:18.78 size: 58834
[libx264 @ 0x1e903a0] frame P:2202 Avg QP:23.67 size: 14187
[libx264 @ 0x1e903a0] frame B:2323 Avg QP:25.75 size: 3356
[libx264 @ 0x1e903a0] consecutive B-frames: 24.7% 18.7% 9.0% 47.5%
[libx264 @ 0x1e903a0] mb I I16..4: 18.8% 74.7% 6.5%
[libx264 @ 0x1e903a0] mb P I16..4: 2.1% 5.0% 0.3% P16..4: 22.2% 6.0% 1.9% 0.0% 0.0% skip:62.5%
[libx264 @ 0x1e903a0] mb B I16..4: 0.1% 0.3% 0.0% B16..8: 19.9% 1.0% 0.1% direct: 0.3% skip:78.3% L0:42.3% L1:55.3% BI: 2.4%
[libx264 @ 0x1e903a0] 8x8 transform intra:68.2% inter:86.5%
[libx264 @ 0x1e903a0] coded y,uvDC,uvAC intra: 35.8% 52.3% 4.5% inter: 5.2% 7.4% 0.0%
[libx264 @ 0x1e903a0] i16 v,h,dc,p: 28% 23% 8% 40%
[libx264 @ 0x1e903a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 20% 22% 3% 6% 6% 7% 5% 4%
[libx264 @ 0x1e903a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 21% 14% 4% 8% 7% 7% 4% 3%
[libx264 @ 0x1e903a0] i8c dc,h,v,p: 56% 18% 20% 6%
[libx264 @ 0x1e903a0] Weighted P-Frames: Y:0.9% UV:0.2%
[libx264 @ 0x1e903a0] ref P L0: 73.4% 13.0% 10.0% 3.6% 0.0%
[libx264 @ 0x1e903a0] ref B L0: 92.2% 6.7% 1.1%
[libx264 @ 0x1e903a0] ref B L1: 96.6% 3.4%
[libx264 @ 0x1e903a0] kb/s:2139.74End Edit
I know this should work since the exact line does work for other files. But the result with these is a silent video.
I checked the audio file being used and it seemed fine when played. but I did get a weird warning when creating it. Basically I have 2 audio tracks, one is overlay music and the other is talking. I create the combined audio with this command.
ffmpeg -y -i /var/www/temp/audioTrack.mp3 -i /var/www/temp/musicTrack.mp3 -filter_complex amerge -c:a libmp3lame -q:a 4 /var/www/temp/combined.mp3
Here is the output from the second command.
ffmpeg version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --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-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-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mp3, from '/var/www/temp/audioTrack.mp3':
Metadata:
encoder : Lavf56.15.102
Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Metadata:
encoder : Lavc56.13
Input #1, mp3, from '/var/www/temp/musicTrack.mp3':
Metadata:
encoder : Lavf56.15.102
Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Metadata:
encoder : Lavc56.13
[Parsed_amerge_0 @ 0x15e3760] No channel layout for input 1
[Parsed_amerge_0 @ 0x15e3760] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
Output #0, mp3, to '/var/www/temp/combined.mp3':
Metadata:
TSSE : Lavf56.15.102
Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p (default)
Metadata:
encoder : Lavc56.13.100 libmp3lame
Stream mapping:
Stream #0:0 (mp3) -> amerge:in0
Stream #1:0 (mp3) -> amerge:in1
amerge -> Stream #0:0 (libmp3lame)
Press [q] to stop, [?] for help
[libmp3lame @ 0x1601000] Trying to remove 1152 samples, but the queue is empty
size= 2001kB time=00:02:08.88 bitrate= 127.2kbits/s
video:0kB audio:2001kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.012350%Of note is these sections (I believe).
[Parsed_amerge_0 @ 0x15e3760] No channel layout for input 1
[Parsed_amerge_0 @ 0x15e3760] Input channel layouts overlap: output layout will be determined by the number of distinct input channelsand
[libmp3lame @ 0x1601000] Trying to remove 1152 samples, but the queue is empty
As I said the output audio file sounds correct.
The Music and Audio tracks are created with AudioSegment in python from the pydub library. I’ve used this before with no issues. The code for this is as follows.
sound = AudioSegment.from_mp3(audio)
introSilence = AudioSegment.silent(duration=introLength)
creditsSilence = AudioSegment.silent(duration=creditsLength)
increasedAudio = sound + 12
talking = introSilence + increasedAudio + creditsSilence
talking.export(audioTrack, format="mp3")
mus = AudioSegment.from_mp3(music)
introMusic = mus[ : introLength]
videoMusic = mus[introLength - crossFade : introLength + videoLength + crossFade]
creditsMusic = mus[totalLength - creditsLength : totalLength]
lowerMusic = videoMusic - 6
totalMusic = introMusic.append(lowerMusic, crossfade=crossFade).append(creditsMusic, crossfade=crossFade).fade_out(fadeOut)
totalMusic.export(musicTrack, format="mp3")Here is the output of
ffprobe
on the 2 audio files.for audioTrack
ffprobe version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --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-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-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mp3, from 'temp/audioTrack.mp3':
Metadata:
encoder : Lavf56.15.102
Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Metadata:
encoder : Lavc56.13and for musicTrack
ffprobe version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --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-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-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mp3, from 'temp/musicTrack.mp3':
Metadata:
encoder : Lavf56.15.102
Duration: 00:02:08.89, start: 0.025057, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Metadata:
encoder : Lavc56.13I can’t see any issues with these.
For completeness here is the ffprobe result for the combined audio track.
ffprobe version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --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-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-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mp3, from 'temp/combined.mp3':
Metadata:
encoder : Lavf56.15.102
Duration: 00:02:08.91, start: 0.025057, bitrate: 127 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 127 kb/s
Metadata:
encoder : Lavc56.13Any help would be much appreciated.
Thanks,
Stu.
-
Android : FFMpeg video creation crashes with no exception when loading binaries in lower APIs (18 in my case)
29 avril 2019, par Diego PerezI have an app that uses FFMpeg for video creation (these next lines are the relevant build.gradle plugin files) :
//writingminds
api 'com.writingminds:FFmpegAndroid:0.3.2'
//JavaCV video
api group: 'org.bytedeco', name: 'javacv', version: '1.4.4'
api group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.0.1-1.4.4', classifier: 'android-arm'
api group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '4.1-1.4.4', classifier: 'android-arm'And my app is working (and creating video) just fine in my phone with a newer Android 8 version but I’m having weird problems in my old API 18 tablet (where, as a note, I had to install multidex).
These next lines are the main part of FFMpeg video creation, where binaries are loaded, and, in fact, binaries load are where app crashes in my old tablet in the line "ffmpeg.loadBinary(new LoadBinaryResponseHandler()..."
As you can see, I have a try/catch where the app crashes, but it crashes with no exception, as catch blocks are never hit.
public static String recordVideo(JSONObject objJSON) {
String strReturn = Enum.Result.OK;
try {
fileName = objJSON.has("file_name") ? String.valueOf(objJSON.getString("file_name")) : "";
videoPath = objJSON.has("video_path") ? String.valueOf(objJSON.getString("video_path")) : "";
} catch (JSONException e) {
ExceptionHandler.logException(e);
}
FFmpeg ffmpeg = FFmpeg.getInstance(ApplicationContext.get());
try {
ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
@Override
public void onStart() {}
@Override
public void onFailure() {}
@Override
public void onSuccess() {}
@Override
public void onFinish() {}
});
} catch (FFmpegNotSupportedException e) {
// Handle if FFmpeg is not supported by device
} catch (Exception e) {
}
...These next lines are the relevant part of the LogCat, but I cannot figure out where the problem resides, maybe an out of memory problem ?
Any help will be much appreciated.
04-28 21:44:45.873 13743-13964/com.artandwords.thoughtoftheday A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 13964 (AsyncTask #4)
04-28 21:44:45.973 144-144/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-28 21:44:45.983 144-144/? I/DEBUG: Build fingerprint: 'asus/WW_epad/ME302C:4.3/JSS15Q/WW_epad-V5.0.21-20140701:user/release-keys'
04-28 21:44:45.983 144-144/? I/DEBUG: Revision: '0'
04-28 21:44:45.983 144-144/? I/DEBUG: pid: 13743, tid: 13964, name: AsyncTask #4 >>> com.artandwords.thoughtoftheday <<<
04-28 21:44:45.983 144-144/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
04-28 21:44:46.003 144-144/? I/DEBUG: eax 00000000 ebx 000000c6 ecx 00000000 edx 00000000
04-28 21:44:46.003 144-144/? I/DEBUG: esi 00000e59 edi 00000000
04-28 21:44:46.003 144-144/? I/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 00000043 xss 0000007b
04-28 21:44:46.003 144-144/? I/DEBUG: eip 784ed378 ebp 2200ff0c esp 2200fec4 flags 00210246
04-28 21:44:46.003 144-144/? I/DEBUG: backtrace:
04-28 21:44:46.003 144-144/? I/DEBUG: #00 pc 00087378 /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #01 pc 00085d0e /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #02 pc 00073328 /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #03 pc 0006f7ff /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #04 pc 0006f3bf /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #05 pc 000b92de /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #06 pc ffffffff <unknown>
04-28 21:44:46.003 144-144/? I/DEBUG: #07 pc 001445aa /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.013 144-144/? I/DEBUG: stack:
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436850 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436854 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436858 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43685c 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436860 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436864 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436868 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43686c 3822676c /system/lib/arm/libc.so
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436870 7b436a98
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436874 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436878 7b4368c8
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43687c 7b436a98
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436880 383003a0 /system/lib/arm/libdl.so
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436884 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436888 7b4368c8
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43688c 785aa5ab /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.013 144-144/? I/DEBUG: #07 7b436890 7b4368a0
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436894 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436898 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43689c 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368a0 7b4368c8
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368a4 7b436890
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368a8 785aa59d /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368ac 7b436a98
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368b0 7b437930
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368b4 220001d0
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368b8 7b436a70
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368bc 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368c0 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368c4 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368c8 7b436a88
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368cc 785f3141 /system/lib/libhoudini.so.3.4.7.44914
--------- beginning of /dev/log/system
04-28 21:44:46.063 450-470/? I/BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
04-28 21:44:46.063 450-13973/? W/ActivityManager: Force finishing activity com.artandwords.thoughtoftheday/.activities.DisplayThoughtActivity
04-28 21:44:46.073 145-862/? E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 75
04-28 21:44:46.093 450-13973/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!
04-28 21:44:46.093 450-483/? W/InputDispatcher: channel '21edd9e8 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
04-28 21:44:46.093 450-483/? E/InputDispatcher: channel '21edd9e8 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
04-28 21:44:46.093 155-13945/? W/TimedEventQueue: Event 25 was not found in the queue, already cancelled?
04-28 21:44:46.093 155-3134/? W/AudioFlinger: session id 324 not found for pid 155
04-28 21:44:46.103 450-450/? W/InputDispatcher: Attempted to unregister already unregistered input channel '21edd9e8 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity (server)'
04-28 21:44:46.103 450-755/? I/WindowState: WIN DEATH: Window{21b33a28 u0 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.DisplayThoughtActivity}
04-28 21:44:46.103 450-13973/? W/ActivityManager: Exception thrown during pause
android.os.TransactionTooLargeException
at android.os.BinderProxy.transact(Native Method)
at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:642)
at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1007)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3905)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3837)
at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:8588)
at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:8465)
at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:9170)
at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:8699)
at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
04-28 21:44:46.103 450-450/? I/WindowState: WIN DEATH: Window{21edd9e8 u0 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity}
04-28 21:44:46.103 450-636/? I/WindowState: WIN DEATH: Window{21be0690 u0 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.DisplayThoughtActivity}
04-28 21:44:46.113 450-13973/? I/WindowManager: computeScreenConfigurationLocked() Enter {1.15 ?mcc?mnc ?locale ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/?}
04-28 21:44:46.113 450-13973/? I/WindowManager: dw=1200, dh=1920
04-28 21:44:46.113 450-13973/? I/WindowManager: appWidth=1200, appHeight=1848
04-28 21:44:46.113 450-13973/? I/WindowManager: tempdm=DisplayMetrics{density=1.5, width=1200, height=1848, scaledDensity=1.5, xdpi=221.201, ydpi=220.591}
04-28 21:44:46.113 450-13973/? I/WindowManager: dm=DisplayMetrics{density=1.5, width=1200, height=1848, scaledDensity=1.5, xdpi=221.201, ydpi=220.591}, ro.product.device=ME302C
04-28 21:44:46.113 450-13973/? I/WindowManager: getConfigDisplayWidth=1200, getConfigDisplayHeight=1810
04-28 21:44:46.113 450-13973/? I/WindowManager: screenWidthDp=800, screenHeightDp=1206
04-28 21:44:46.113 450-13973/? I/WindowManager: computeScreenConfigurationLocked() Leave {1.15 ?mcc?mnc ?locale ?layoutDir sw800dp w800dp h1206dp 240dpi xlrg port ?uimode ?night finger -keyb/v/h -nav/h}
04-28 21:44:46.113 450-13973/? I/ActivityManager: Restarting because process died: ActivityRecord{21ab1f80 u0 com.artandwords.thoughtoftheday/.activities.main.MainActivity}
04-28 21:44:46.113 450-13973/? W/ActivityManager: Exception when starting activity com.artandwords.thoughtoftheday/.activities.main.MainActivity
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:730)
at com.android.server.am.ActivityStack.realStartActivityLocked(ActivityStack.java:733)
at com.android.server.am.ActivityStack.startSpecificActivityLocked(ActivityStack.java:840)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1790)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1449)
at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1058)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3905)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3837)
at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:8588)
at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:8465)
at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:9170)
at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:8699)
at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
04-28 21:44:46.123 450-13973/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1396 com.android.server.am.ActivityStack.sendActivityBroadcastLocked:4923 com.android.server.am.ActivityStack.removeActivityFromHistoryLocked:4089 com.android.server.am.ActivityStack.removeHistoryRecordsForAppLocked:4346 com.android.server.am.ActivityManagerService.handleAppDiedLocked:3163
04-28 21:44:46.123 450-13973/? I/ActivityManager: Start proc com.artandwords.thoughtoftheday for activity com.artandwords.thoughtoftheday/.activities.main.MainActivity: pid=13975
</unknown>Edit 1 :
Still investigating and entered FFmpeg.java to the method loadBinary while debugging, which code I’ll paste below and the line making the crash is switch (CpuArchHelper.getCpuArch())
@Override
public void loadBinary(FFmpegLoadBinaryResponseHandler ffmpegLoadBinaryResponseHandler) throws FFmpegNotSupportedException
String cpuArchNameFromAssets = null ;
switch (CpuArchHelper.getCpuArch())
case x86 :
Log.i("Loading FFmpeg for x86 CPU") ;
cpuArchNameFromAssets = "x86" ;
break ;
case ARMv7 :
Log.i("Loading FFmpeg for armv7 CPU") ;
cpuArchNameFromAssets = "armeabi-v7a" ;
break ;
case NONE :
throw new FFmpegNotSupportedException("Device not supported") ;
if (!TextUtils.isEmpty(cpuArchNameFromAssets)) {
ffmpegLoadLibraryAsyncTask = new FFmpegLoadLibraryAsyncTask(context, cpuArchNameFromAssets, ffmpegLoadBinaryResponseHandler);
ffmpegLoadLibraryAsyncTask.execute();
} else {
throw new FFmpegNotSupportedException("Device not supported");
}I’ll keep on investigating...
Edit 2 :
Further debugging has just lead me to the exact line where app crashes, and it’s CpuArchHelper.java from FFmpeg library :
The line causing the crash is the next :
String archInfo = cpuNativeArchHelper.cpuArchFromJNI();
and I cannot even go inside cpuArchFromJNI() with F7 as it just crashes.
package com.github.hiteshsondhi88.libffmpeg;
import android.os.Build;
class CpuArchHelper {
static CpuArch getCpuArch() {
Log.d("Build.CPU_ABI : " + Build.CPU_ABI);
// check if device is x86 or x86_64
if (Build.CPU_ABI.equals(getx86CpuAbi()) || Build.CPU_ABI.equals(getx86_64CpuAbi())) {
return CpuArch.x86;
} else {
// check if device is armeabi
if (Build.CPU_ABI.equals(getArmeabiv7CpuAbi())) {
ArmArchHelper cpuNativeArchHelper = new ArmArchHelper();
String archInfo = cpuNativeArchHelper.cpuArchFromJNI();
// check if device is arm v7
if (cpuNativeArchHelper.isARM_v7_CPU(archInfo)) {
// check if device is neon
return CpuArch.ARMv7;
}
// check if device is arm64 which is supported by ARMV7
} else if (Build.CPU_ABI.equals(getArm64CpuAbi())) {
return CpuArch.ARMv7;
}
}
return CpuArch.NONE;
}
static String getx86CpuAbi() {
return "x86";
}
static String getx86_64CpuAbi() {
return "x86_64";
}
static String getArm64CpuAbi() {
return "arm64-v8a";
}
static String getArmeabiv7CpuAbi() {
return "armeabi-v7a";
}
}This is ArmArchHelper.java class :
package com.github.hiteshsondhi88.libffmpeg;
class ArmArchHelper {
static {
System.loadLibrary("ARM_ARCH");
}
native String cpuArchFromJNI();
boolean isARM_v7_CPU(String cpuInfoString) {
return cpuInfoString.contains("v7");
}
boolean isNeonSupported(String cpuInfoString) {
// check cpu arch for loading correct ffmpeg lib
return cpuInfoString.contains("-neon");
}
} -
Android : FFMpeg video creation crashes with no exception in lower APIs (18 in my case)
28 avril 2019, par Diego PerezI have an app that uses FFMpeg for video creation (these next lines are the relevant build.gradle plugin files) :
//writingminds
api 'com.writingminds:FFmpegAndroid:0.3.2'
//JavaCV video
api group: 'org.bytedeco', name: 'javacv', version: '1.4.4'
api group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '4.0.1-1.4.4', classifier: 'android-arm'
api group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '4.1-1.4.4', classifier: 'android-arm'And my app is working (and creating video) just fine in my phone with a newer Android 8 version but I’m having weird problems in my old API 18 tablet (where, as a note, I had to install multidex).
These next lines are the main part of FFMpeg video creation, where binaries are loaded, and, in fact, binaries load are where app crashes in my old tablet in the line "ffmpeg.loadBinary(new LoadBinaryResponseHandler()..."
As you can see, I have a try/catch where the app crashes, but it crashes with no exception, as catch blocks are never hit.
public static String recordVideo(JSONObject objJSON) {
String strReturn = Enum.Result.OK;
try {
fileName = objJSON.has("file_name") ? String.valueOf(objJSON.getString("file_name")) : "";
videoPath = objJSON.has("video_path") ? String.valueOf(objJSON.getString("video_path")) : "";
} catch (JSONException e) {
ExceptionHandler.logException(e);
}
FFmpeg ffmpeg = FFmpeg.getInstance(ApplicationContext.get());
try {
ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
@Override
public void onStart() {}
@Override
public void onFailure() {}
@Override
public void onSuccess() {}
@Override
public void onFinish() {}
});
} catch (FFmpegNotSupportedException e) {
// Handle if FFmpeg is not supported by device
} catch (Exception e) {
}
...These next lines are the relevant part of the LogCat, but I cannot figure out where the problem resides, maybe an out of memory problem ?
Any help will be much appreciated.
04-28 21:44:45.873 13743-13964/com.artandwords.thoughtoftheday A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 13964 (AsyncTask #4)
04-28 21:44:45.973 144-144/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-28 21:44:45.983 144-144/? I/DEBUG: Build fingerprint: 'asus/WW_epad/ME302C:4.3/JSS15Q/WW_epad-V5.0.21-20140701:user/release-keys'
04-28 21:44:45.983 144-144/? I/DEBUG: Revision: '0'
04-28 21:44:45.983 144-144/? I/DEBUG: pid: 13743, tid: 13964, name: AsyncTask #4 >>> com.artandwords.thoughtoftheday <<<
04-28 21:44:45.983 144-144/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
04-28 21:44:46.003 144-144/? I/DEBUG: eax 00000000 ebx 000000c6 ecx 00000000 edx 00000000
04-28 21:44:46.003 144-144/? I/DEBUG: esi 00000e59 edi 00000000
04-28 21:44:46.003 144-144/? I/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 00000043 xss 0000007b
04-28 21:44:46.003 144-144/? I/DEBUG: eip 784ed378 ebp 2200ff0c esp 2200fec4 flags 00210246
04-28 21:44:46.003 144-144/? I/DEBUG: backtrace:
04-28 21:44:46.003 144-144/? I/DEBUG: #00 pc 00087378 /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #01 pc 00085d0e /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #02 pc 00073328 /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #03 pc 0006f7ff /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #04 pc 0006f3bf /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #05 pc 000b92de /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.003 144-144/? I/DEBUG: #06 pc ffffffff <unknown>
04-28 21:44:46.003 144-144/? I/DEBUG: #07 pc 001445aa /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.013 144-144/? I/DEBUG: stack:
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436850 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436854 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436858 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43685c 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436860 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436864 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436868 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43686c 3822676c /system/lib/arm/libc.so
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436870 7b436a98
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436874 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436878 7b4368c8
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43687c 7b436a98
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436880 383003a0 /system/lib/arm/libdl.so
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436884 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436888 7b4368c8
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43688c 785aa5ab /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.013 144-144/? I/DEBUG: #07 7b436890 7b4368a0
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436894 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b436898 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b43689c 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368a0 7b4368c8
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368a4 7b436890
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368a8 785aa59d /system/lib/libhoudini.so.3.4.7.44914
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368ac 7b436a98
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368b0 7b437930
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368b4 220001d0
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368b8 7b436a70
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368bc 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368c0 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368c4 00000000
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368c8 7b436a88
04-28 21:44:46.013 144-144/? I/DEBUG: 7b4368cc 785f3141 /system/lib/libhoudini.so.3.4.7.44914
--------- beginning of /dev/log/system
04-28 21:44:46.063 450-470/? I/BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
04-28 21:44:46.063 450-13973/? W/ActivityManager: Force finishing activity com.artandwords.thoughtoftheday/.activities.DisplayThoughtActivity
04-28 21:44:46.073 145-862/? E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 75
04-28 21:44:46.093 450-13973/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!
04-28 21:44:46.093 450-483/? W/InputDispatcher: channel '21edd9e8 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
04-28 21:44:46.093 450-483/? E/InputDispatcher: channel '21edd9e8 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
04-28 21:44:46.093 155-13945/? W/TimedEventQueue: Event 25 was not found in the queue, already cancelled?
04-28 21:44:46.093 155-3134/? W/AudioFlinger: session id 324 not found for pid 155
04-28 21:44:46.103 450-450/? W/InputDispatcher: Attempted to unregister already unregistered input channel '21edd9e8 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity (server)'
04-28 21:44:46.103 450-755/? I/WindowState: WIN DEATH: Window{21b33a28 u0 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.DisplayThoughtActivity}
04-28 21:44:46.103 450-13973/? W/ActivityManager: Exception thrown during pause
android.os.TransactionTooLargeException
at android.os.BinderProxy.transact(Native Method)
at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:642)
at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1007)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3905)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3837)
at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:8588)
at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:8465)
at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:9170)
at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:8699)
at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
04-28 21:44:46.103 450-450/? I/WindowState: WIN DEATH: Window{21edd9e8 u0 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.main.MainActivity}
04-28 21:44:46.103 450-636/? I/WindowState: WIN DEATH: Window{21be0690 u0 com.artandwords.thoughtoftheday/com.artandwords.thoughtoftheday.activities.DisplayThoughtActivity}
04-28 21:44:46.113 450-13973/? I/WindowManager: computeScreenConfigurationLocked() Enter {1.15 ?mcc?mnc ?locale ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?orien ?uimode ?night ?touch ?keyb/?/? ?nav/?}
04-28 21:44:46.113 450-13973/? I/WindowManager: dw=1200, dh=1920
04-28 21:44:46.113 450-13973/? I/WindowManager: appWidth=1200, appHeight=1848
04-28 21:44:46.113 450-13973/? I/WindowManager: tempdm=DisplayMetrics{density=1.5, width=1200, height=1848, scaledDensity=1.5, xdpi=221.201, ydpi=220.591}
04-28 21:44:46.113 450-13973/? I/WindowManager: dm=DisplayMetrics{density=1.5, width=1200, height=1848, scaledDensity=1.5, xdpi=221.201, ydpi=220.591}, ro.product.device=ME302C
04-28 21:44:46.113 450-13973/? I/WindowManager: getConfigDisplayWidth=1200, getConfigDisplayHeight=1810
04-28 21:44:46.113 450-13973/? I/WindowManager: screenWidthDp=800, screenHeightDp=1206
04-28 21:44:46.113 450-13973/? I/WindowManager: computeScreenConfigurationLocked() Leave {1.15 ?mcc?mnc ?locale ?layoutDir sw800dp w800dp h1206dp 240dpi xlrg port ?uimode ?night finger -keyb/v/h -nav/h}
04-28 21:44:46.113 450-13973/? I/ActivityManager: Restarting because process died: ActivityRecord{21ab1f80 u0 com.artandwords.thoughtoftheday/.activities.main.MainActivity}
04-28 21:44:46.113 450-13973/? W/ActivityManager: Exception when starting activity com.artandwords.thoughtoftheday/.activities.main.MainActivity
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:730)
at com.android.server.am.ActivityStack.realStartActivityLocked(ActivityStack.java:733)
at com.android.server.am.ActivityStack.startSpecificActivityLocked(ActivityStack.java:840)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1790)
at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1449)
at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1058)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3905)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3837)
at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:8588)
at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:8465)
at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:9170)
at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:8699)
at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
04-28 21:44:46.123 450-13973/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1396 com.android.server.am.ActivityStack.sendActivityBroadcastLocked:4923 com.android.server.am.ActivityStack.removeActivityFromHistoryLocked:4089 com.android.server.am.ActivityStack.removeHistoryRecordsForAppLocked:4346 com.android.server.am.ActivityManagerService.handleAppDiedLocked:3163
04-28 21:44:46.123 450-13973/? I/ActivityManager: Start proc com.artandwords.thoughtoftheday for activity com.artandwords.thoughtoftheday/.activities.main.MainActivity: pid=13975
</unknown>Edit 1 :
Still investigating and entered FFmpeg.java to the method loadBinary while debugging, which code I’ll paste below and the line making the crash is switch (CpuArchHelper.getCpuArch())
@Override
public void loadBinary(FFmpegLoadBinaryResponseHandler ffmpegLoadBinaryResponseHandler) throws FFmpegNotSupportedException
String cpuArchNameFromAssets = null ;
switch (CpuArchHelper.getCpuArch())
case x86 :
Log.i("Loading FFmpeg for x86 CPU") ;
cpuArchNameFromAssets = "x86" ;
break ;
case ARMv7 :
Log.i("Loading FFmpeg for armv7 CPU") ;
cpuArchNameFromAssets = "armeabi-v7a" ;
break ;
case NONE :
throw new FFmpegNotSupportedException("Device not supported") ;
if (!TextUtils.isEmpty(cpuArchNameFromAssets)) {
ffmpegLoadLibraryAsyncTask = new FFmpegLoadLibraryAsyncTask(context, cpuArchNameFromAssets, ffmpegLoadBinaryResponseHandler);
ffmpegLoadLibraryAsyncTask.execute();
} else {
throw new FFmpegNotSupportedException("Device not supported");
}I’ll keep on investigating...
Edit 2 :
Further debugging has just lead me to the exact line where app crashes, and it’s CpuArchHelper.java from FFmpeg library :
The line causing the crash is the next :
String archInfo = cpuNativeArchHelper.cpuArchFromJNI();
and I cannot even go inside cpuArchFromJNI() with F7 as it just crashes.
package com.github.hiteshsondhi88.libffmpeg;
import android.os.Build;
class CpuArchHelper {
static CpuArch getCpuArch() {
Log.d("Build.CPU_ABI : " + Build.CPU_ABI);
// check if device is x86 or x86_64
if (Build.CPU_ABI.equals(getx86CpuAbi()) || Build.CPU_ABI.equals(getx86_64CpuAbi())) {
return CpuArch.x86;
} else {
// check if device is armeabi
if (Build.CPU_ABI.equals(getArmeabiv7CpuAbi())) {
ArmArchHelper cpuNativeArchHelper = new ArmArchHelper();
String archInfo = cpuNativeArchHelper.cpuArchFromJNI();
// check if device is arm v7
if (cpuNativeArchHelper.isARM_v7_CPU(archInfo)) {
// check if device is neon
return CpuArch.ARMv7;
}
// check if device is arm64 which is supported by ARMV7
} else if (Build.CPU_ABI.equals(getArm64CpuAbi())) {
return CpuArch.ARMv7;
}
}
return CpuArch.NONE;
}
static String getx86CpuAbi() {
return "x86";
}
static String getx86_64CpuAbi() {
return "x86_64";
}
static String getArm64CpuAbi() {
return "arm64-v8a";
}
static String getArmeabiv7CpuAbi() {
return "armeabi-v7a";
}
}This is ArmArchHelper.java class :
package com.github.hiteshsondhi88.libffmpeg;
class ArmArchHelper {
static {
System.loadLibrary("ARM_ARCH");
}
native String cpuArchFromJNI();
boolean isARM_v7_CPU(String cpuInfoString) {
return cpuInfoString.contains("v7");
}
boolean isNeonSupported(String cpuInfoString) {
// check cpu arch for loading correct ffmpeg lib
return cpuInfoString.contains("-neon");
}
}