
Recherche avancée
Autres articles (37)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (7585)
-
FFmpeg throws exception while process the commands
4 juin 2014, par Arslan AhmadI am executing commands through process but it always throw this error anyone help me ?
FFMPEGCommand :
String[] ffmpegCommand = {"/data/data/com.example.app/ffmpeg", "-r", ""+VIDEO_FRAME_RATE, "-b", "1000", "-vcodec", "mjpeg", "-i", Environment.getExternalStorageDirectory().getPath() + "/com.example.app/frame_%05d.jpg", Environment.getExternalStorageDirectory().getPath() + "/video.mov"};
ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();
W/System.err(29844): java.io.IOException: Error running exec(). Command: [/data/data/com.example.app/ffmpeg, -r, 18, -b, 1000, -vcodec, mjpeg, -i, /storage/emulated/0/com.example.app/frame_%05d.jpg, /storage/emulated/0/video.mov] Working Directory: null Environment: [ANDROID_ROOT=/system, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, EMULATED_STORAGE_TARGET=/storage/emulated, ANDROID_BOOTLOGO=1, LD_LIBRARY_PATH=/vendor/lib:/system/lib, EXTERNAL_STORAGE=/storage/emulated/legacy, ANDROID_SOCKET_zygote=11, ANDROID_DATA=/data, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/oem-services.jar:/system/framework/qcmediaplayer.jar, ANDROID_PROPERTY_WORKSPACE=9,0, ANDROID_STORAGE=/storage]
06-02 12:21:36.660: W/System.err(29844): at java.lang.ProcessManager.exec(ProcessManager.java:211)
06-02 12:21:36.660: W/System.err(29844): at java.lang.ProcessBuilder.start(ProcessBuilder.java:195)
06-02 12:21:36.662: W/System.err(29844): at com.example.app.FFMPEGRecorderActivity$ProcessVideo.doInBackground(FFMPEGRecorderActivity.java:1448)
06-02 12:21:36.662: W/System.err(29844): at com.example.app.FFMPEGRecorderActivity$ProcessVideo.doInBackground(FFMPEGRecorderActivity.java:1)
06-02 12:21:36.662: W/System.err(29844): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-02 12:21:36.663: W/System.err(29844): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-02 12:21:36.663: W/System.err(29844): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-02 12:21:36.663: W/System.err(29844): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-02 12:21:36.663: W/System.err(29844): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-02 12:21:36.663: W/System.err(29844): at java.lang.Thread.run(Thread.java:841)
06-02 12:21:36.664: W/System.err(29844): Caused by: java.io.IOException: No such file or directory
06-02 12:21:36.665: W/System.err(29844): at java.lang.ProcessManager.exec(Native Method)
06-02 12:21:36.666: W/System.err(29844): at java.lang.ProcessManager.exec(ProcessManager.java:209)
06-02 12:21:36.667: W/System.err(29844): ... 9 more -
Xuggler decoding h264 issues
18 juin 2014, par ValenthorpeI’m trying to use Xuggler to transcode IP Camera rtsp streams to rtmp streams (all with h264 codecs). I currently have 2 IP cameras to test with, and wrote a basic Java program using Xuggler to do the transcoding of these streams.
Here’s snippet of code in question :
// Setup the Input Container
InContainer = IContainer.make();
if(InContainer.open(InUrl, IContainer.Type.READ, null, false, false) < 0)
{
System.err.println("Could not open input container");
return false;
}
System.out.println("Input cointainer opened...");
// Loop until we find the key packet
IPacket keyPacket = IPacket.make();
InContainer.readNextPacket(keyPacket);
//System.out.println("Waiting on key frame...");
//while(InContainer.readNextPacket(keyPacket) >= 0 && !keyPacket.isKeyPacket()) {
//System.out.println(keyPacket.toString());
//}
System.out.println(keyPacket.toString());
System.out.println(bytesToHex(keyPacket.getData().getByteArray(0, keyPacket.getData().getSize())));
videoStreamId = -1;
int numStreams = InContainer.getNumStreams();
System.out.println("Num. Streams in Container: " + numStreams);
for(int i = 0; i < numStreams; i++){
IStream stream = InContainer.getStream(i);
IStreamCoder coder = stream.getStreamCoder();
if(coder.getCodecType() == ICodec.Type.CODEC_TYPE_VIDEO)
{
VideoDecoder = coder;
videoStreamId = i;
if(VideoDecoder.open(null, null) < 0){
System.err.println("Could not open video decoder for input container");
return false;
}
System.out.println("Video decoder opened...");
// Need to decode at least one key frame
IVideoPicture keyPicture = IVideoPicture.make(VideoDecoder.getPixelType(), 0, 0);
int bytesDecoded = VideoDecoder.decodeVideo(keyPicture, keyPacket, 0);
if(bytesDecoded < 0)
{
throw new RuntimeException("Unable to decode key video packet");
}
System.out.println(DatatypeConverter.printBase64Binary(VideoDecoder.getExtraData().getByteArray(0, VideoDecoder.getExtraData().getSize())));
}
else // The stream has an unkown codec type, and no codec ID, we need to set the StreamCoder
{
coder.setCodec(ICodec.findDecodingCodec(ICodec.ID.CODEC_ID_H264));
coder.setWidth(352);
coder.setHeight(288);
coder.setPixelType(IPixelFormat.Type.YUV420P);
VideoDecoder = coder;
videoStreamId = i;
/*
// Create the Extradata buffer
byte[] start_sequence = new byte[]{0, 0, 1};
byte[] extraData1 = DatatypeConverter.parseBase64Binary("Z0IAHtoFglMCKQI=");
byte[] extraData2 = DatatypeConverter.parseBase64Binary("aN4Fcg==");
int extraDataSize = extraData1.length + extraData2.length + start_sequence.length * 2;
int destPos = 0;
byte[] extraData = new byte[extraDataSize];
System.arraycopy(start_sequence, 0, extraData, destPos, start_sequence.length);
destPos += start_sequence.length;
System.arraycopy(extraData1, 0, extraData, destPos, extraData1.length);
destPos += extraData1.length;
System.arraycopy(start_sequence, 0, extraData, destPos, start_sequence.length);
destPos += start_sequence.length;
System.arraycopy(extraData2, 0, extraData, destPos, extraData2.length);
*/
if(VideoDecoder.open(null, null) < 0)
{
System.err.println("Could not open video decoder for input container");
return false;
}
/*
// Set the StreamCoder extradata
IBuffer extraBuffer = IBuffer.make(null, extraData, 0, extraDataSize);
int result = VideoDecoder.setExtraData(extraBuffer, 0, extraDataSize, true);
if(result < 0)
{
System.err.println("Could not set the coder ExtraData");
}
else
{
System.out.println("VideoDecoder ExtraData set!");
}*/
//System.out.println(DatatypeConverter.printBase64Binary(VideoDecoder.getExtraData().getByteArray(0, VideoDecoder.getExtraData().getSize())));
IVideoPicture keyPicture = IVideoPicture.make(VideoDecoder.getPixelType(), VideoDecoder.getWidth(), VideoDecoder.getHeight());
int bytesDecoded = VideoDecoder.decodeVideo(keyPicture, keyPacket, 0); //key/keyPacket
if(bytesDecoded < 0)
{
throw new RuntimeException("Unable to decode key video packet");
}
}
}This program is able to successfully transcode one of the camera’s streams without any problems.
The other, however, has been giving me constant headaches for several days now. In the loop to look at the container’s streams, I have an else statement because the problem stream has CODEC_TYPE_UNKOWN and CODEC_ID_NONE, so i thought i would need to set everything manually. I’ve gotten all kinds of errors such as :15:22:36.964 [main] ERROR org.ffmpeg - [h264 @ 0000000000423870] no frame!
I get this error EVERY time i try to decode a frame. I realize this usually means that no key frames have been read and that the decoder needs the SPS/PPS information for h264 decoding, which i’ve tried to manually set (you can see in one of the commented sections), but with no success.
I’ve even tried creating a packet, filling it with the SPS/PPS info, setting the key packet to true, etc... also with no success. Even in the while loop (currently commented out) the program never seems to get a key frame from the one camera.I’ve also gotten this warning from Xuggler :
16:22:43.412 [main] WARN com.xuggle.xuggler - Could not find streams in input container (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:898)
... which i’ve also looked into but none of the solutions i’ve seen have worked.
I’ve tried running both of these camera’s streams through FFMPEG itself in the command line
and both are transcoded with no errors. I also thought that maybe Xuggler was built with too old of a version of FFMPEG to support rtsp streaming properly, but i went back and downloaded many of the older builds (0.10, 1.0.1 - 1.2, and current 2.2) and tried through the command line and all have succeeded.I’ve seen a lot of threads across the Xuggler google group that address problems with rtsp streams and the "no frame !" error, but none of them have had a solution (or at least one that worked for me).
Does anyone have any idea what might be causing this ? I have absolutely no ideas left ! (First time posting here as well, my apologies if I did anything incorrectly or left out information) Thanks. -
Transcode Adobe Media Encoder live stream using FFMPEG in node.js
23 juin 2014, par user2757842I am using Adobe media live encoder to send a stream up to the adobe media server. What I would like to do is take that stream and transcode it to a local file on my machine in another format other that .f4m
Here is the code I have so far, it is built using FFmpeg within a node.js app :
var ffmpeg = require('fluent-ffmpeg');
var fs = require('fs');
//make sure you set the correct path to your video file
var inStream = fs.createReadStream('rtmp://localhost/livepkgr/livestream live=1'); // this is where the streams are stored
var command = new ffmpeg({ source: inStream});
//Set the path to where FFmpeg is installed
command.setFfmpegPath("C:\\Users\\Jay\\Documents\\FFMPEG\\bin\\ffmpeg.exe");
command
//set the size
.withSize('100%')
// set fps
.withFps(24)
// set output format to force
.toFormat('ismv')
// setup event handlers
.on('end', function() {
console.log('file has been converted successfully');
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
// save to file <-- the new file I want -->
.saveToFile('rtmp://localhost/livepkgr/livestream1'); //this is where i want to store the newly converted streamI have it working with a local file but when I try it with my live stream, I get this error
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open 'C:\Users\Jay\workspace\FFMPEGtest\rtmp:\localhost\livepkgr\livestream live=1'Anyone seen this before ?