
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (98)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...)
Sur d’autres sites (6998)
-
ffmepg why error :Failed to write core dump
9 juillet 2021, par dmouseI wang to implement a feature that allows me to save RTSP stram as a file,
use javacv implement a demo,but there's an error.
i debug the demo , execute 'recorder.record(frame) ;' error, "ulimit -c unlimited" is useless,the program still reports an error.
review of the source code did note find the problem principle.pleace give me a hand.


import org.bytedeco.javacpp.avcodec;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.Frame;

import java.io.File;
import java.io.IOException;

/**
 * @ClassName video
 * @Description TODO
 * @Author mouse
 * @Date 2021/7/9 11:13
 * @Version 1.0
 **/
public class Video {
 public static void main(String[] args) {
 String streamUrl = "rtsp://admin:12345678.@192.168.20.180:554/h265/ch1/main/av_stream";
 String filePath = "./video/hello.mp3";
 File outFile = new File(filePath);
 FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(streamUrl);
 if (!outFile.getParentFile().exists()) {
 outFile.getParentFile().mkdirs();
 }
 FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(filePath,1080,1440, 1);
 recorder.setVideoCodec(avcodec.AV_CODEC_ID_H265);
 recorder.setFormat("flv");
 recorder.setVideoBitrate(4000);
 try {
 grabber.start();
 recorder.start();
 Frame frame = grabber.grabFrame();
 while (frame!=null){
 recorder.record(frame);
 frame = grabber.grabFrame();
 }
 recorder.record(frame);
 recorder.stop();
 grabber.stop();

 } catch (FFmpegFrameGrabber.Exception e) {
 e.printStackTrace();
 } catch (IOException e) {
 e.printStackTrace();
 } finally {
 try {
 if (recorder != null) {
 recorder.stop();
 }
 if (grabber != null) {
 grabber.stop();
 }
 } catch (FFmpegFrameRecorder.Exception | FFmpegFrameGrabber.Exception e) {
 e.printStackTrace();
 }
 }
 }
}




log error


#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000131fef233, pid=50498, tid=0x0000000000001003
#
# JRE version: Java(TM) SE Runtime Environment (8.0_281-b09) (build 1.8.0_281-b09)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.281-b09 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libavformat.57.dylib+0xbf233] av_write_frame+0x993
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#



pom :


<dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>javacv</artifactid>
 <version>1.4.3</version>
 </dependency>
 <dependency>
 <groupid>org.bytedeco.javacpp-presets</groupid>
 <artifactid>ffmpeg-platform</artifactid>
 <version>4.0.2-1.4.3</version>
 </dependency>



My os : macOS Bgi Sur 11.4 ;

JDK : 1.8.0_281

execute 'recorder.record(frame) ;' error,
"ulimit -c unlimited" is useless,the program still reports an error .

-
Fatal error detected by JRE : libavcodec involved
16 novembre 2015, par hdfI’m experiencing this issue whenever I’m trying to run my java program. Could someone give me a clues on how to fix it ?
EDIT : the issue only occurs after a new environment has been set up.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#
#
# JRE version: OpenJDK Runtime Environment (7.0_85-b01) (build 1.7.0_85-b01)
# Java VM: OpenJDK 64-Bit Server VM (24.85-b03 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.6.1
# Distribution: Ubuntu 14.04 LTS, package 7u85-2.6.1-5ubuntu0.14.04.1
# Problematic frame:
# C [libavcodec.so.52.123.0+0x442060]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x00007f8f70141800): JavaThread "threadpool-14" daemon [_thread_in_native, id=14508, stack(0x00007f8fa73a0000,0x00007f8fa74a1000)]
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=128 (), si_addr=0x0000000000000000
Registers:
RAX=0x00007f8f701d2110, RBX=0x00007f8fa65030d0, RCX=0x00007f8fa688efd0, RDX=0x00007f8fa68904b0
RSP=0x00007f8fa749f380, RBP=0x00007f8fa749f3d8, RSI=0x000000000000000c, RDI=0x00007f8f701d2110
R8 =0x0000000000000000, R9 =0x0000000000000000, R10=0x00007f8fc5eb56e0, R11=0x00007f8fc591af50
R12=0x0000000000000000, R13=0x00007f8f701419d8, R14=0x00007f8fa749f578, R15=0x00007f8f70141800
RIP=0x00007f8fa688f060, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000000
TRAPNO=0x000000000000000d
Top of Stack: (sp=0x00007f8fa749f380)
0x00007f8fa749f380: 00007f8fa688f1a5 00007f8fa688ffe5
0x00007f8fa749f390: 00007f8fa6890025 00007f8fa6890065
0x00007f8fa749f3a0: 00007f8fa68900a5 00007f8fa68900e5
0x00007f8fa749f3b0: 00007f8fa6890125 00007f8fa68904b5
0x00007f8fa749f3c0: 00007f8fa6890678 00007f8fa7198f31
0x00007f8fa749f3d0: 0000000000000000 00007f8f70158540
0x00007f8fa749f3e0: 00007f8fa749f468 00007f8fa71966ae
0x00007f8fa749f3f0: 0000000776cfa560 0000000776cfa560...
Instructions: (pc=0x00007f8fa688f060)
0x00007f8fa688f040: c4 e3 5d 0c c0 55 c5 e4 5c c8 c5 e4 58 c0 c5 fc
0x00007f8fa688f050: 29 07 c5 fc 29 4f 20 c3 0f 1f 84 00 00 00 00 00
0x00007f8fa688f060: c5 fc 28 57 40 c5 fc 28 5f 60 c5 ec 5c fb c5 ec
0x00007f8fa688f070: 58 d3 c5 c4 57 3d 26 e0 13 00 c5 ec c6 df be c5
Register to memory mapping:
RAX=0x00007f8f701d2110 is an unknown value
RBX=0x00007f8fa65030d0: av_fft_calc+0 in /usr/local/lib/libavcodec.so.52.123.0 at 0x00007f8fa644d000
RCX=0x00007f8fa688efd0: <offset 0x441fd0="0x441fd0"> in /usr/local/lib/libavcodec.so.52.123.0 at 0x00007f8fa644d000
RDX=0x00007f8fa68904b0: <offset 0x4434b0="0x4434b0"> in /usr/local/lib/libavcodec.so.52.123.0 at 0x00007f8fa644d000
RSP=0x00007f8fa749f380 is pointing into the stack for thread: 0x00007f8f70141800
RBP=0x00007f8fa749f3d8 is pointing into the stack for thread: 0x00007f8f70141800
RSI=0x000000000000000c is an unknown value
RDI=0x00007f8f701d2110 is an unknown value
R8 =0x0000000000000000 is an unknown value
R9 =0x0000000000000000 is an unknown value
R10=0x00007f8fc5eb56e0: <offset 0xe006e0="0xe006e0"> in /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so at 0x00007f8fc50b5000
R11=0x00007f8fc591af50: <offset 0x865f50="0x865f50"> in /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so at 0x00007f8fc50b5000
R12=0x0000000000000000 is an unknown value
R13=0x00007f8f701419d8 is an unknown value
R14=0x00007f8fa749f578 is pointing into the stack for thread: 0x00007f8f70141800
R15=0x00007f8f70141800 is a thread
Stack: [0x00007f8fa73a0000,0x00007f8fa74a1000], sp=0x00007f8fa749f380, free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libavcodec.so.52.123.0+0x442060]
</offset></offset></offset></offset>This occurs on different physical instances so chances are pretty low it’s hardware issue. Thanks !
-
How to write unit tests for your plugin – Introducing the Piwik Platform
17 novembre 2014, par Thomas Steur — DevelopmentThis is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to verify user permissions). This time you’ll learn how to write unit tests in Piwik. For this tutorial you will need to have basic knowledge of PHP, PHPUnit and the Piwik platform.
When is a test a unit test ?
There are many different opinions on this and it can be sometimes hard to decide. At Piwik we consider a test as a unit test if only a single method or class is being tested and if a test does not have a dependency to the filesystem, web, config, database or to any other plugin.
If a test is slow it can be an indicator that it is not a unit test. “Slow” is of course a bit vague. We will cover how to write other type of tests, such as integration tests, in one of our next blog posts.
Getting started
In this post, we assume that you have already installed Piwik 2.9.0 or later via git, set up your development environment and created a plugin. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik and other Guides that help you to develop a plugin.
Let’s create a unit test
We start by using the Piwik Console to create a new unit test :
./console generate:test --testtype unit
The command will ask you to enter the name of the plugin the created test should belong to. I will use the plugin name “Insights”. Next it will ask you for the name of the test. Here you usually enter the name of the class you want to test. I will use “Widgets” in this example. There should now be a file
plugins/Insights/tests/Unit/WidgetsTest.php
which contains already an example to get you started easily :- /**
- * @group Insights
- * @group WidgetsTest
- * @group Plugins
- */
- class WidgetsTest extends \PHPUnit_Framework_TestCase
- {
- public function testSimpleAddition()
- {
- $this->assertEquals(2, 1+1);
- }
- }
We don’t want to cover how you should write your unit test. This is totally up to you. If you have no experience in writing unit tests yet, we recommend to read articles on the topic, or a book, or to watch videos or anything else that will help you learn best.
Running a test
To run a test we will use the command
tests:run
which allows you to execute a test suite, a specific file or a group of tests.To verify whether the created test works we will run it as follows :
./console tests:run WidgetsTest
This will run all tests having the group
WidgetsTest
. As other tests can use the same group you might want to pass the path to your test file instead :./console tests:run plugins/Insights/tests/Unit/Widgets.php
If you want to run all tests within your plugin pass the name of your plugin as an argument :
./console tests:run insights
Of course you can also define multiple arguments :
./console tests:run insights WidgetsTest
This will execute all tests within the insights plugin having the group WidgetsTest. If you only want to run unit tests within your plugin you can do the following :
./console tests:run insights unit
Advanced features
Isn’t it easy to create a unit test ? We never even created a file ! You can accomplish even more if you want : You can generate other type of tests, you can run tests on Amazon’s AWS and more. Unfortunately, not everything is documented yet so we recommend to discover more features by executing the commands
./console list tests
and./console help tests:run
.If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.