
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (38)
-
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (8097)
-
Update copyright years to include 2014.
24 novembre 2014, par Erik de Castro LopoUpdate copyright years to include 2014.
- [DH] AUTHORS
- [DH] COPYING.Xiph
- [DH] Makefile.am
- [DH] Makefile.deps
- [DH] Makefile.lite
- [DH] README
- [DH] build/Makefile.am
- [DH] build/compile.mk
- [DH] build/config.mk
- [DH] build/exe.mk
- [DH] build/lib.mk
- [DH] doc/Makefile.am
- [DH] doc/Makefile.lite
- [DH] doc/html/Makefile.am
- [DH] doc/html/images/Makefile.am
- [DH] examples/Makefile.am
- [DH] examples/Makefile.lite
- [DH] examples/c/Makefile.am
- [DH] examples/c/decode/Makefile.am
- [DH] examples/c/decode/file/Makefile.am
- [DH] examples/c/decode/file/Makefile.lite
- [DH] examples/c/decode/file/main.c
- [DH] examples/c/encode/Makefile.am
- [DH] examples/c/encode/file/Makefile.am
- [DH] examples/c/encode/file/Makefile.lite
- [DH] examples/c/encode/file/main.c
- [DH] examples/cpp/Makefile.am
- [DH] examples/cpp/decode/Makefile.am
- [DH] examples/cpp/decode/file/Makefile.am
- [DH] examples/cpp/decode/file/Makefile.lite
- [DH] examples/cpp/decode/file/main.cpp
- [DH] examples/cpp/encode/Makefile.am
- [DH] examples/cpp/encode/file/Makefile.am
- [DH] examples/cpp/encode/file/Makefile.lite
- [DH] examples/cpp/encode/file/main.cpp
- [DH] include/FLAC++/Makefile.am
- [DH] include/FLAC++/all.h
- [DH] include/FLAC++/decoder.h
- [DH] include/FLAC++/encoder.h
- [DH] include/FLAC++/export.h
- [DH] include/FLAC++/metadata.h
- [DH] include/FLAC/Makefile.am
- [DH] include/FLAC/all.h
- [DH] include/FLAC/assert.h
- [DH] include/FLAC/callback.h
- [DH] include/FLAC/export.h
- [DH] include/FLAC/format.h
- [DH] include/FLAC/metadata.h
- [DH] include/FLAC/ordinals.h
- [DH] include/FLAC/stream_decoder.h
- [DH] include/FLAC/stream_encoder.h
- [DH] include/Makefile.am
- [DH] include/share/alloc.h
- [DH] include/share/grabbag.h
- [DH] include/share/grabbag/cuesheet.h
- [DH] include/share/grabbag/file.h
- [DH] include/share/grabbag/picture.h
- [DH] include/share/grabbag/replaygain.h
- [DH] include/share/grabbag/seektable.h
- [DH] include/share/replaygain_synthesis.h
- [DH] include/test_libs_common/file_utils_flac.h
- [DH] include/test_libs_common/metadata_utils.h
- [DH] m4/Makefile.am
- [DH] man/Makefile.am
- [DH] src/Makefile.am
- [DH] src/Makefile.lite
- [DH] src/flac/Makefile.am
- [DH] src/flac/Makefile.lite
- [DH] src/flac/Makefile.lite.iffscan
- [DH] src/flac/analyze.c
- [DH] src/flac/analyze.h
- [DH] src/flac/decode.c
- [DH] src/flac/decode.h
- [DH] src/flac/encode.c
- [DH] src/flac/encode.h
- [DH] src/flac/foreign_metadata.c
- [DH] src/flac/foreign_metadata.h
- [DH] src/flac/iffscan.c
- [DH] src/flac/local_string_utils.h
- [DH] src/flac/main.c
- [DH] src/flac/utils.c
- [DH] src/flac/utils.h
- [DH] src/flac/vorbiscomment.c
- [DH] src/flac/vorbiscomment.h
- [DH] src/libFLAC++/Makefile.am
- [DH] src/libFLAC++/Makefile.lite
- [DH] src/libFLAC++/metadata.cpp
- [DH] src/libFLAC++/stream_decoder.cpp
- [DH] src/libFLAC++/stream_encoder.cpp
- [DH] src/libFLAC/Makefile.am
- [DH] src/libFLAC/Makefile.lite
- [DH] src/libFLAC/bitmath.c
- [DH] src/libFLAC/bitreader.c
- [DH] src/libFLAC/bitwriter.c
- [DH] src/libFLAC/cpu.c
- [DH] src/libFLAC/crc.c
- [DH] src/libFLAC/fixed.c
- [DH] src/libFLAC/float.c
- [DH] src/libFLAC/format.c
- [DH] src/libFLAC/ia32/Makefile.am
- [DH] src/libFLAC/ia32/cpu_asm.nasm
- [DH] src/libFLAC/ia32/fixed_asm.nasm
- [DH] src/libFLAC/ia32/lpc_asm-unrolled.nasm
- [DH] src/libFLAC/ia32/lpc_asm.nasm
- [DH] src/libFLAC/ia32/nasm.h
- [DH] src/libFLAC/include/Makefile.am
- [DH] src/libFLAC/include/private/Makefile.am
- [DH] src/libFLAC/include/private/all.h
- [DH] src/libFLAC/include/private/bitmath.h
- [DH] src/libFLAC/include/private/bitreader.h
- [DH] src/libFLAC/include/private/bitwriter.h
- [DH] src/libFLAC/include/private/cpu.h
- [DH] src/libFLAC/include/private/crc.h
- [DH] src/libFLAC/include/private/fixed.h
- [DH] src/libFLAC/include/private/float.h
- [DH] src/libFLAC/include/private/format.h
- [DH] src/libFLAC/include/private/lpc.h
- [DH] src/libFLAC/include/private/memory.h
- [DH] src/libFLAC/include/private/metadata.h
- [DH] src/libFLAC/include/private/ogg_decoder_aspect.h
- [DH] src/libFLAC/include/private/ogg_encoder_aspect.h
- [DH] src/libFLAC/include/private/ogg_helper.h
- [DH] src/libFLAC/include/private/ogg_mapping.h
- [DH] src/libFLAC/include/private/stream_encoder.h
- [DH] src/libFLAC/include/private/stream_encoder_framing.h
- [DH] src/libFLAC/include/private/window.h
- [DH] src/libFLAC/include/protected/Makefile.am
- [DH] src/libFLAC/include/protected/all.h
- [DH] src/libFLAC/include/protected/stream_decoder.h
- [DH] src/libFLAC/include/protected/stream_encoder.h
- [DH] src/libFLAC/lpc.c
- [DH] src/libFLAC/lpc_intrin_sse.c
- [
-
Revision 82042 : Afficher les notes sur les auteurs si nécessaire On est en 2014 Version ...
21 avril 2014, par kent1@… — LogAfficher les notes sur les auteurs si nécessaire
On est en 2014
Version 3.5.0 -
Recording video on Android using JavaCV (Updated 2014 02 17)
25 septembre 2014, par Fabio BergmannI’m trying to record a video in Android using the JavaCV lib.
I need to record the video in 640x360.I have installed everything as described in README.txt file and I followed the example as below :
https://code.google.com/p/javacv/source/browse/samples/RecordActivity.java
In this example, the video size is this :
private int imageWidth = 320 ;
private int imageHeight = 240 ;In my case, I need to record a video in 640x360 H.264.
(UPDATE) I have reverted my code and kept exactly like in the example, just changing imageWidth and imageHeight to 640x360.
Now I’m getting the video like this image :
http://bergmann.net.br/img/screenshot_video_error.pngHere is my code :
import static com.googlecode.javacv.cpp.opencv_core.IPL_DEPTH_8U;
import java.io.IOException;
import java.nio.ShortBuffer;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.hardware.Camera;
import android.hardware.Camera.PreviewCallback;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.os.Bundle;
import android.os.PowerManager;
import android.util.Log;
import android.view.Display;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.autosonvideo.helpers.Helpers;
import com.autosonvideo.logic.CameraHelpers;
import com.googlecode.javacv.FFmpegFrameRecorder;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
public class FFmpegRecordActivity extends Activity implements OnClickListener {
private final static String CLASS_LABEL = "RecordActivity";
private final static String LOG_TAG = CLASS_LABEL;
private PowerManager.WakeLock mWakeLock;
private String ffmpeg_link;
long startTime = 0;
boolean recording = false;
private volatile FFmpegFrameRecorder recorder;
private boolean isPreviewOn = false;
private int sampleAudioRateInHz = 44100;
private int imageWidth = 640;
private int imageHeight = 480;
private int finalImageWidth = 640;
private int finalImageHeight = 360;
private int frameRate = 30;
/* audio data getting thread */
private AudioRecord audioRecord;
private AudioRecordRunnable audioRecordRunnable;
private Thread audioThread;
volatile boolean runAudioThread = true;
/* video data getting thread */
private Camera cameraDevice;
private CameraView cameraView;
private IplImage yuvIplimage = null;
/* layout setting */
private final int bg_screen_bx = 232;
private final int bg_screen_by = 128;
private final int bg_screen_width = 700;
private final int bg_screen_height = 500;
private final int bg_width = 1123;
private final int bg_height = 715;
private final int live_width = 1280;
private final int live_height = 960;
private int screenWidth, screenHeight;
private Button btnRecorderControl;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
setContentView(R.layout.main);
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,
CLASS_LABEL);
mWakeLock.acquire();
initLayout();
initRecorder();
}
@Override
protected void onResume() {
super.onResume();
if (mWakeLock == null) {
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,
CLASS_LABEL);
mWakeLock.acquire();
}
}
@Override
protected void onPause() {
super.onPause();
if (mWakeLock != null) {
mWakeLock.release();
mWakeLock = null;
}
}
@Override
protected void onDestroy() {
super.onDestroy();
recording = false;
if (cameraView != null) {
cameraView.stopPreview();
cameraDevice.release();
cameraDevice = null;
}
if (mWakeLock != null) {
mWakeLock.release();
mWakeLock = null;
}
}
private void initLayout() {
/* get size of screen */
Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay();
screenWidth = display.getWidth();
screenHeight = display.getHeight();
RelativeLayout.LayoutParams layoutParam = null;
LayoutInflater myInflate = null;
myInflate = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
RelativeLayout topLayout = new RelativeLayout(this);
setContentView(topLayout);
LinearLayout preViewLayout = (LinearLayout) myInflate.inflate(
R.layout.main, null);
layoutParam = new RelativeLayout.LayoutParams(screenWidth, screenHeight);
topLayout.addView(preViewLayout, layoutParam);
/* add control button: start and stop */
btnRecorderControl = (Button) findViewById(R.id.recorder_control);
btnRecorderControl.setText("Start");
btnRecorderControl.setOnClickListener(this);
/* add camera view */
int display_width_d = (int) (1.0 * bg_screen_width * screenWidth / bg_width);
int display_height_d = (int) (1.0 * bg_screen_height * screenHeight / bg_height);
int prev_rw, prev_rh;
if (1.0 * display_width_d / display_height_d > 1.0 * live_width
/ live_height) {
prev_rh = display_height_d;
prev_rw = (int) (1.0 * display_height_d * live_width / live_height);
} else {
prev_rw = display_width_d;
prev_rh = (int) (1.0 * display_width_d * live_height / live_width);
}
layoutParam = new RelativeLayout.LayoutParams(prev_rw, prev_rh);
layoutParam.topMargin = (int) (1.0 * bg_screen_by * screenHeight / bg_height);
layoutParam.leftMargin = (int) (1.0 * bg_screen_bx * screenWidth / bg_width);
cameraDevice = Camera.open();
Log.i(LOG_TAG, "cameara open");
cameraView = new CameraView(this, cameraDevice);
topLayout.addView(cameraView, layoutParam);
Log.i(LOG_TAG, "cameara preview start: OK");
}
// ---------------------------------------
// initialize ffmpeg_recorder
// ---------------------------------------
private void initRecorder() {
Log.w(LOG_TAG, "init recorder");
if (yuvIplimage == null) {
yuvIplimage = IplImage.create(finalImageWidth, finalImageHeight,
IPL_DEPTH_8U, 2);
Log.i(LOG_TAG, "create yuvIplimage");
}
ffmpeg_link = CameraHelpers.getOutputMediaFile(
CameraHelpers.MEDIA_TYPE_VIDEO).toString();
Log.i(LOG_TAG, "ffmpeg_url: " + ffmpeg_link);
recorder = new FFmpegFrameRecorder(ffmpeg_link, finalImageWidth,
finalImageHeight, 1);
recorder.setFormat("mp4");
recorder.setSampleRate(sampleAudioRateInHz);
// Set in the surface changed method
recorder.setFrameRate(frameRate);
Log.i(LOG_TAG, "recorder initialize success");
audioRecordRunnable = new AudioRecordRunnable();
audioThread = new Thread(audioRecordRunnable);
}
public void startRecording() {
try {
recorder.start();
startTime = System.currentTimeMillis();
recording = true;
audioThread.start();
} catch (FFmpegFrameRecorder.Exception e) {
e.printStackTrace();
}
}
public void stopRecording() {
runAudioThread = false;
if (recorder != null && recording) {
recording = false;
Log.v(LOG_TAG,
"Finishing recording, calling stop and release on recorder");
try {
recorder.stop();
recorder.release();
} catch (FFmpegFrameRecorder.Exception e) {
e.printStackTrace();
}
recorder = null;
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (recording) {
stopRecording();
}
finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
// ---------------------------------------------
// audio thread, gets and encodes audio data
// ---------------------------------------------
class AudioRecordRunnable implements Runnable {
@Override
public void run() {
android.os.Process
.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
// Audio
int bufferSize;
short[] audioData;
int bufferReadResult;
bufferSize = AudioRecord
.getMinBufferSize(sampleAudioRateInHz,
AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT);
audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC,
sampleAudioRateInHz, AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT, bufferSize);
audioData = new short[bufferSize];
Log.d(LOG_TAG, "audioRecord.startRecording()");
audioRecord.startRecording();
/* ffmpeg_audio encoding loop */
while (runAudioThread) {
// Log.v(LOG_TAG,"recording? " + recording);
bufferReadResult = audioRecord.read(audioData, 0,
audioData.length);
if (bufferReadResult > 0) {
Log.v(LOG_TAG, "bufferReadResult: " + bufferReadResult);
// If "recording" isn't true when start this thread, it
// never get's set according to this if statement...!!!
// Why? Good question...
if (recording) {
try {
recorder.record(ShortBuffer.wrap(audioData, 0,
bufferReadResult));
// Log.v(LOG_TAG,"recording " + 1024*i + " to " +
// 1024*i+1024);
} catch (FFmpegFrameRecorder.Exception e) {
Log.v(LOG_TAG, e.getMessage());
e.printStackTrace();
}
}
}
}
Log.v(LOG_TAG, "AudioThread Finished, release audioRecord");
/* encoding finish, release recorder */
if (audioRecord != null) {
audioRecord.stop();
audioRecord.release();
audioRecord = null;
Log.v(LOG_TAG, "audioRecord released");
}
}
}
// ---------------------------------------------
// camera thread, gets and encodes video data
// ---------------------------------------------
class CameraView extends SurfaceView implements SurfaceHolder.Callback,
PreviewCallback {
private SurfaceHolder mHolder;
private Camera mCamera;
public CameraView(Context context, Camera camera) {
super(context);
Log.w("camera", "camera view");
mCamera = camera;
mHolder = getHolder();
mHolder.addCallback(CameraView.this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
mCamera.setPreviewCallback(CameraView.this);
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
try {
stopPreview();
mCamera.setPreviewDisplay(holder);
} catch (IOException exception) {
mCamera.release();
mCamera = null;
}
}
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
Log.v(LOG_TAG, "Setting imageWidth: " + imageWidth
+ " imageHeight: " + imageHeight + " frameRate: "
+ frameRate);
Camera.Parameters camParams = mCamera.getParameters();
camParams.setPreviewSize(imageWidth, imageHeight);
Log.v(LOG_TAG,
"Preview Framerate: " + camParams.getPreviewFrameRate());
camParams.setPreviewFrameRate(frameRate);
mCamera.setParameters(camParams);
startPreview();
}
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
try {
mHolder.addCallback(null);
mCamera.setPreviewCallback(null);
} catch (RuntimeException e) {
// The camera has probably just been released, ignore.
}
}
public void startPreview() {
if (!isPreviewOn && mCamera != null) {
isPreviewOn = true;
mCamera.startPreview();
}
}
public void stopPreview() {
if (isPreviewOn && mCamera != null) {
isPreviewOn = false;
mCamera.stopPreview();
}
}
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
/* get video data */
if (yuvIplimage != null && recording) {
// yuvIplimage.getByteBuffer().put(data);
final int startY = 640 * (480 - 360) / 2;
final int lenY = 640 * 360;
yuvIplimage.getByteBuffer().put(data, startY, lenY);
final int startVU = 640 * 480 + 320 * 2 * (240 - 180) / 2;
final int lenVU = 320 * 180 * 2;
yuvIplimage.getByteBuffer().put(data, startVU, lenVU);
Log.v(LOG_TAG, "Writing Frame");
try {
long t = 1000 * (System.currentTimeMillis() - startTime);
if (t > recorder.getTimestamp()) {
recorder.setTimestamp(t);
}
recorder.record(yuvIplimage);
} catch (FFmpegFrameRecorder.Exception e) {
Log.v(LOG_TAG, e.getMessage());
e.printStackTrace();
}
}
}
}
@Override
public void onClick(View v) {
if (!recording) {
startRecording();
Log.w(LOG_TAG, "Start Button Pushed");
btnRecorderControl.setText("Stop");
} else {
// This will trigger the audio recording loop to stop and then set
// isRecorderStart = false;
stopRecording();
Log.w(LOG_TAG, "Stop Button Pushed");
btnRecorderControl.setText("Start");
}
}
}