
Recherche avancée
Autres articles (45)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (9698)
-
avcodec_encode_video2() error -1 : Could not encode video packet - javacv
7 mars 2016, par 404errorI want to create a video (mp4) from a set of images and want to add a background sound to it. The background sound can either be recorded or a file may be browsed using a content chooser in android.
The following code creates the video when a new audio is recorded in 3gp format. However when i browse an audio file (mp3 for example), it shows this error and the video recorded cannot be played.the error shown is :
org.bytedeco.javacv.FrameRecorder$Exception: avcodec_encode_video2() error -1: Could not encode video packet. :at video_settings$Generate.doInBackground(video_settings.java:298)
the code at video_settings.java:298 is
recorder.record(frame2);
relevant code is :
protected Void doInBackground(Void... arg0) {
try {
FrameGrabber grabber1 = new FFmpegFrameGrabber(paths.get(0));
FrameGrabber grabber2 = new FFmpegFrameGrabber(backgroundSoundPath);
Log.d("hgbj", backgroundSoundPath);
grabber1.start();
grabber2.start();
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(video, 320,
240, grabber2.getAudioChannels());// 320, 240
recorder.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4);//
recorder.setPixelFormat(avutil.AV_PIX_FMT_YUV420P);
recorder.setFormat("mp4");
recorder.setFrameRate(2);
recorder.setVideoBitrate(10 * 1024 * 1024);
recorder.start();
Frame frame1, frame2;
long timeLength = grabber2.getLengthInTime();
System.out.println("total time = " + timeLength);
for (int i = 0; i < paths.size(); i++) {
// record this frame and then record (numFrames*percentageTime[i]/100) number of frames of the audio.
frame1 = grabber1.grabFrame();
long startTime = System.currentTimeMillis();
recorder.setTimestamp(startTime * 1000);
recorder.record(frame1);
boolean first = true;
// while current time - start time < percentage time * total time / 100: record frame2
long temp = timeLength * percentageTime[i] / 100000 + startTime;
while (System.currentTimeMillis() <= temp) {
frame2 = grabber2.grabFrame();
if (frame2 == null) break;
if (first) {
recorder.setTimestamp(startTime * 1000);
first = false;
}
recorder.record(frame2);
}
if (i < paths.size() - 1) {
grabber1.stop();
grabber1 = new FFmpegFrameGrabber(paths.get(i + 1));
grabber1.start();
}
}My question is : if its working for 3gp recorded files why isn’t it working for browsed mp3 files and what should I do to make it work ?
I have tried changing the codecs, frame height width, video bitrate but dont know any way to determine what bitrate etc is compatible with a given codec/format.
I am changing the content uri obtained from file browser into the real path so that’s not the issue. -
x86inc : Add debug symbols indicating sizes of compiled functions
12 octobre 2015, par Geza Lorex86inc : Add debug symbols indicating sizes of compiled functions
Some debuggers/profilers use this metadata to determine which function a
given instruction is in ; without it they get can confused by local labels
(if you haven’t stripped those). On the other hand, some tools are still
confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.Currently only implemented for ELF.
-
x86inc : Add debug symbols indicating sizes of compiled functions
12 octobre 2015, par Geza Lorex86inc : Add debug symbols indicating sizes of compiled functions
Some debuggers/profilers use this metadata to determine which function a
given instruction is in ; without it they get can confused by local labels
(if you haven’t stripped those). On the other hand, some tools are still
confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.Currently only implemented for ELF.