
Recherche avancée
Autres articles (56)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (9896)
-
JavaCV/FFmpeg causes crash only on Lollipop
13 novembre 2015, par WeirdHatI get reports of this crash from users of my app on Galaxy Note devices running Android Lollipop (might happen on other devices but the majority of my users have Galaxy Note because it’s a drawing app). Below is the relevant code from my ASyncTask which exports a series of images (plus audio) to a video file using JavaCV/FFmpeg, and the stack trace from the reported crash. It works fine on my Note 8.0 running KitKat (there’s no Lollipop update available for that device), and works fine in Lollipop on the emulator, so I’m having a hard time tracking down the cause and don’t know what to do.
@Override
protected String doInBackground(final File... params) {
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(params[0],canvas_width,canvas_height, 0);
FrameGrabber audiograbber = null;
if(audio!=null) audiograbber = new FFmpegFrameGrabber(audio);
Frame audioframe;
Frame image;
AndroidFrameConverter converter = new AndroidFrameConverter();
try {
recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
recorder.setFrameRate(framerate);
recorder.setPixelFormat(0);
if(audio!=null) {
audiograbber.setFrameRate(framerate);
audiograbber.start();
recorder.setAudioChannels(audiograbber.getAudioChannels());
recorder.setSampleRate(audiograbber.getSampleRate());
}
recorder.start();
Bitmap drawframe = createBitmap(canvas_width, canvas_height, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(drawframe);
Paint p = new Paint();
for(int frame=0; frame/code to draw image
image = converter.convert(drawframe);
recorder.record(image);
}
if(isCancelled()) {
bgbitmap.recycle();
drawframe.recycle();
return "Cancelled";
}
if(audio!=null) {
while((audioframe = audiograbber.grabFrame()) != null) {
recorder.record(audioframe);
}
}
recorder.stop();
bgbitmap.recycle();
drawframe.recycle();
if(audio!=null) audiograbber.stop();
return "Saved "+params[0];
} catch (Exception e) {
e.printStackTrace();
}
return "Failed";
}-
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/treltexx/trelte:5.1.1/LMY47X/N910CXXU1COH4:user/release-keys'
Revision: '21'
ABI: 'arm'
pid: 12039, tid: 12053, name: GCDaemon >>> com.weirdhat.roughanimator <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'sart/runtime/gc/collector/mark_sweep.cc:381] Can't mark invalid object'
r0 00000000 r1 00002f15 r2 00000006 r3 00000000
r4 b366bdb8 r5 00000006 r6 00000002 r7 0000010c
r8 00000001 r9 b446f550 sl b4429000 fp 9a975c60
ip 00002f15 sp b366b008 lr b6db9cb9 pc b6ddd3ac cpsr 60070010
backtrace:
#00 pc 0003b3ac /system/lib/libc.so (tgkill+12)
#01 pc 00017cb5 /system/lib/libc.so (pthread_kill+52)
#02 pc 000188c7 /system/lib/libc.so (raise+10)
#03 pc 00015165 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 00012fac /system/lib/libc.so (abort+4)
#05 pc 00242f17 /system/lib/libart.so (art::Runtime::Abort()+170)
#06 pc 000ad991 /system/lib/libart.so (art::LogMessage::~LogMessage()+1360)
#07 pc 0013ec53 /system/lib/libart.so (bool art::gc::accounting::HeapBitmap::AtomicTestAndSet(art::mirror::Object const*, art::gc::collector::MarkSweepMarkObjectSlowPath const&)+422)
#08 pc 0013ed27 /system/lib/libart.so (art::gc::collector::MarkSweep::MarkObjectParallel(art::mirror::Object const*)+142)
#09 pc 0013ff23 /system/lib/libart.so (art::gc::collector::MarkSweep::MarkRootParallelCallback(art::mirror::Object**, void*, art::RootInfo const&)+26)
#10 pc 0025893d /system/lib/libart.so (art::ReferenceMapVisitor::VisitQuickFrame()+1024)
#11 pc 00258cad /system/lib/libart.so (art::ReferenceMapVisitor::VisitFrame()+224)
#12 pc 0024c8e9 /system/lib/libart.so (art::StackVisitor::WalkStack(bool)+276)
#13 pc 0024e617 /system/lib/libart.so (art::Thread::VisitRoots(void (*)(art::mirror::Object**, void*, art::RootInfo const&), void*)+994)
#14 pc 0013ef9f /system/lib/libart.so (art::gc::collector::CheckpointMarkThreadRoots::Run(art::Thread*)+126)
#15 pc 0025b44d /system/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure*)+296)
#16 pc 0013dc0d /system/lib/libart.so (art::gc::collector::MarkSweep::MarkRootsCheckpoint(art::Thread*, bool)+96)
#17 pc 0014165d /system/lib/libart.so (art::gc::collector::MarkSweep::PreCleanCards()+172)
#18 pc 001417d3 /system/lib/libart.so (art::gc::collector::MarkSweep::MarkingPhase()+126)
#19 pc 001418b9 /system/lib/libart.so (art::gc::collector::MarkSweep::RunPhases()+176)
#20 pc 00138527 /system/lib/libart.so (art::gc::collector::GarbageCollector::Run(art::gc::GcCause, bool)+246)
#21 pc 0015865b /system/lib/libart.so (art::gc::Heap::CollectGarbageInternal(art::gc::collector::GcType, art::gc::GcCause, bool)+1426)
#22 pc 00159af5 /system/lib/libart.so (art::gc::Heap::ConcurrentGC(art::Thread*)+56)
#23 pc 000003ef /system/framework/arm/boot.oat -
recording yuv data which is converted from a bitmap and images are changed constantly on this bitmap
3 février 2016, par UserAxI am trying to record images which are changed at a set time interval. These are displayed on an imageview. (something like a movie maker)
For this I am :
-
Drawing these images on a bitmap, this method is repeated over a 50ms interval
private void BitmapUpdate() {
timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
public void run() {
try {
new Task1().execute();
} catch (Exception e) {
// TODO: handle exception
}
}
}, 0, 50);
}
class Task1 extends AsyncTask {
@Override
protected void onPreExecute() {
super.onPreExecute();
clearBitmap();
}
@Override
protected String doInBackground(Void... arg0) {
onImageDisplayed();
return null;
}
@Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
}
}
public void clearBitmap(){
if (imageview != null){
//All the 3 methods below give same error - can't call getpixels() on recycled bitmap
imageview.setDrawingCacheEnabled(false);
//OR
imageview.destroyDrawingCache();
//OR
bitmap.recycle();
}
}
public void onImageDisplayed(){
if (imageview != null) {
imageview.setDrawingCacheEnabled(true);
imageview.buildDrawingCache();
bitmap = imageview.getDrawingCache();
System.out.println(bitmap.getByteCount() + " is bitmap size ");
}
} -
Using the bitmap data to convert it to yuv data
By using getNV21 method :
Convert bitmap array to YUV (YCbCr NV21)
- Finally this yuv data is passed FFmpeg recorder, through a method similar to onPreviewFrame, except that the data is from getNV21 method. This method is started by a button click.
What I have achieved :
-
If i dont use clearBitmap() ; i get only the first image recorded in the video, even on changing to next image only first image is present throughout the video.
-
So After research on stack overflow many developers suggested clearing the previous imageCache for the next Image. But in my case if i use any of these methods, anywhere,
imageview.setDrawingCacheEnabled(false);
//OR
imageview.destroyDrawingCache();
//OR
bitmap.recycle();
I get the error ; mostly because the getNV21 method is running non stop, and always is expecting pixels flow from the Bitmap.
- If i try running the methods one after another, by stopping getpixels for a moment by a boolean, i only get a black screen.
Kindly help...!
THANKS.
-
-
Recording view to videofile
4 février 2016, par Paul FreezI have a some kind of a Texture/Surfaceview where user can draw (lines, figures and so on) with gestures and I need to record everything he performed and save that to a videofile on storage.
At first, I was trying to use ffmpeg :
- Capture bitmaps(frames) of the specific view (using canvas)
- Save every bitmap to the storage in some folder
- Using ffmpeg compress all the saved images(frames) from the folder to the mp4 videofile.
That way didn’t work for me, because only 1 operation of getting bitmap from the view (not even saving it) would take about 60ms - so video has even less than 20fps. Plus I needed to save those frames/bitmaps on the device - with each image compressed to about 1Mb it would be needed to write more than 15Mb of images every second !
May be I’ve missed some other uproach to use ffmpeg in runtime while recording, but I haven’t find the way to do that.The second way I found was to record screen via own Android API-tools which were introduced in Android 5.0. But, first of all, I’m targeting Android 4.1 ; and second, - this uproach would only allow me to record whole screen with whole UI on it (and I needed only 1 specific view). Also, screen capturing is enabled somehow on Android 4.4, but it also requires root.
So, after all the researches I made, I’ve found very interesting on app - Coach’s Eye. It allows to draw figures on existing videos, and record all that (+ recording sound). And as far as I can see it captures not the whole screen with UI and stuff, but only the video and top layer with drawing canvas. So I’m curious is there any approach to do like in that app ?
My basic requirements are :
- Android 4.1
- No root
- Capture specific view
- 25fps or more
If you have any ideas of how this can be done, please feel free to share !