
Recherche avancée
Autres articles (92)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (16072)
-
ffmpeg decoding on Android
29 novembre 2013, par KernaldI'm currently trying to use ffmpeg on Android. I built ffmpeg using https://github.com/halfninja/android-ffmpeg-x264 (I adapted it to not use libx264 and build with ndk-r9b, using GCC 4.6). I try to trim an MP4 file. However, the input file fails to open :
11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : ffmpeg 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : -i 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : /storage/emulated/0/DCIM/20131126_173903.mp4 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : -ss 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : 2 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : -t 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : 4 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : -vcodec 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : copy 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : -acodec 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : copy 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : /storage/emulated/0/DCIM/trimmed-000-20131126_173903.mp4 11-28 10:59:18.494 : INFO/com.rfc.video.VideoKit(4125) : Running main 11-28 10:59:18.494 : INFO/Videokit(4125) : Initializing AV codecs 11-28 10:59:18.494 : INFO/Videokit(4125) : ffmpeg version 0.9.2, Copyright (c) 2000-2012 the FFmpeg developers 11-28 10:59:18.494 : INFO/Videokit(4125) : built on Nov 27 2013 15:38:26 with gcc 4.6 20120106 (prerelease) 11-28 10:59:18.494 : INFO/Videokit(4125) : configuration : —enable-cross-compile —arch=arm5te —enable-armv5te —target-os=linux —disable-stripping —prefix=../output —disable-neon —enable-version3 —ar=arm-linux-androideabi-ar —disable-shared —enable-static —enable-gpl —enable-memalign-hack —cc=arm-linux-androideabi-gcc —ld=arm-linux-androideabi-ld —extra-cflags='-fPIC -DANDROID -D__thumb__ -mthumb -Wno-deprecated' —disable-everything —enable-decoder=mjpeg —enable-demuxer=mjpeg —enable-parser=mjpeg —enable-demuxer=image2 —enable-muxer=mp4 —enable-decoder=rawvideo —enable-protocol=file —enable-hwaccels —disable-ffmpeg —disable-ffplay —disable-ffprobe —disable-ffserver —disable-network —enable-filter=buffer —enable-filter=buffersink —disable-demuxer=v4l —disable-demuxer=v4l2 —disable-indev=v4l —disable-indev=v4l2 11-28 10:59:18.494 : INFO/Videokit(4125) : libavutil 51. 32. 0 / 51. 32. 0 11-28 10:59:18.494 : INFO/Videokit(4125) : libavcodec 53. 42. 4 / 53. 42. 4 11-28 10:59:18.494 : INFO/Videokit(4125) : libavformat 53. 24. 2 / 53. 24. 2 11-28 10:59:18.494 : INFO/Videokit(4125) : libavdevice 53. 4. 0 / 53. 4. 0 11-28 10:59:18.494 : INFO/Videokit(4125) : libavfilter 2. 53. 0 / 2. 53. 0 11-28 10:59:18.494 : INFO/Videokit(4125) : libswscale 2. 1. 0 / 2. 1. 0 11-28 10:59:18.494 : INFO/Videokit(4125) : libpostproc 51. 2. 0 / 51. 2. 0 11-28 10:59:18.504 : ERROR/Videokit(4125) : /storage/emulated/0/DCIM/20131126_173903.mp4 : Invalid data found when processing input
I digged into ffmpeg's code, and found the error :
static int opt_input_file(OptionsContext *o, const char *opt, const char *filename)
{
// ...
ic->video_codec_id = video_codec_name ?
find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0)->id : CODEC_ID_NONE;
ic->audio_codec_id = audio_codec_name ?
find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0)->id : CODEC_ID_NONE;
ic->subtitle_codec_id= subtitle_codec_name ?
find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0)->id : CODEC_ID_NONE;
ic->flags |= AVFMT_FLAG_NONBLOCK;
ic->interrupt_callback = int_cb;
if (loop_input) {
LOGW(
"-loop_input is deprecated, use -loop 1\n"
"Note, both loop options only work with -f image2\n"
);
ic->loop_input = loop_input;
}
/* open the input file with generic avformat function */
err = avformat_open_input(&ic, filename, file_iformat, &format_opts);
if (err < 0) {
print_error(filename, err);
exit_program(1);
}
assert_avoptions(format_opts);
// ...
}As indicated in the logcat,
err
is here equal toAVERROR_INVALIDDATA
. I don't understand the reason however : the mp4 codec is enabled, as far as I can tell. Any hint on how to solve it ?Edit : I added more ffmpeg code. I'm pretty sure it's a codec issue now : ic->video_codec_id is set to
CODEC_ID_NONE
, which causesic
to be set toNULL
and return a failure inavformat_open_input()
. -
Using FFMPEG with Powershell
19 mai 2017, par CaulenI am using Windows Server Edition 2012 and am very new to using Powershell. Basically, I am trying to convert a bunch of video files that are in a directory to .flv. The code I am using is this :
$inProcessPath = "E:\Random Videos\In Process\$env:username\"
$oldVideos = Get-ChildItem -Include @("*.mp4", "*.avi", "*.divx", "*.mov", "*.mpg", "*.wmv", "*.mkv") -Path $inProcessPath -Recurse #gets all of the videos
cd "E:\FFMPEG\bin\"
foreach ($oldVideo in $oldVideos) {
$newVideo = [io.path]::ChangeExtension($oldSong.FullName, '.flv')
.\ffmpeg.exe -i $oldVideo -y -async 1 -b 2000k -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast $newVideo
}Whenever I run this I don’t get any error messages but ffmpeg doesn’t run either. I’m sure I’m overlooking something but have no idea what that could be. I’ve searched the website and compared code to others and still have no idea.
Any help would be very much appreciated.
-
Rotation on Video frame image makes video quality low and becomes green ffmpeg opencv
21 novembre 2013, par bindalI am working on one application in which i have to record video on touch which includes pause recording so , i am using FFmpegFrameRecorder for that
But when i am recording video with rear camera then in onpreviewframe
i am getting yuvIplImage in portrait mode that is correct but when i
am recording with front camera in portrait mode then in onPreviewframe
i am getting image upside down , so my half, so from that result my
half video is showing in correct portrait mode and remaining half
video id showing upside down, so i am applying rotation on yuvIplImage
when recording from front cameraHere is my onPreviewFrame Method
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
long frameTimeStamp = 0L;
if (mAudioTimestamp == 0L && firstTime > 0L)
frameTimeStamp = 1000L * (System.currentTimeMillis() - firstTime);
else if (mLastAudioTimestamp == mAudioTimestamp)
frameTimeStamp = mAudioTimestamp + frameTime;
else {
long l2 = (System.nanoTime() - mAudioTimeRecorded) / 1000L;
frameTimeStamp = l2 + mAudioTimestamp;
mLastAudioTimestamp = mAudioTimestamp;
}
synchronized (mVideoRecordLock) {
if (recording && rec && lastSavedframe != null
&& lastSavedframe.getFrameBytesData() != null
&& yuvIplImage != null) {
mVideoTimestamp += frameTime;
if (lastSavedframe.getTimeStamp() > mVideoTimestamp)
mVideoTimestamp = lastSavedframe.getTimeStamp();
try {
yuvIplImage.getByteBuffer().put(
lastSavedframe.getFrameBytesData());
videoRecorder.setTimestamp(lastSavedframe
.getTimeStamp());
// if (defaultCameraId == 1) {
// CvSize size = new CvSize(yuvIplImage.height(),
// yuvIplImage.width());
// IplImage yuvIplImage2 = opencv_core.cvCreateImage(
// size, yuvIplImage.depth(),
// yuvIplImage.nChannels());
//
// videoRecorder.record(yuvIplImage2);
// } else {
// }
if (defaultCameraId == 1) {
yuvIplImage = rotate(yuvIplImage, 270);
videoRecorder.record(yuvIplImage);
}else
{
videoRecorder.record(yuvIplImage);
}
// else
// opencv_core.cvTranspose(yuvIplImage, yuvIplImage);
} catch (com.googlecode.javacv.FrameRecorder.Exception e) {
e.printStackTrace();
}
}
lastSavedframe = new SavedFrames(data, frameTimeStamp);
}
}
}Here is rotation function
public static IplImage rotate(IplImage image, double angle) {
IplImage copy = opencv_core.cvCloneImage(image);
IplImage rotatedImage = opencv_core.cvCreateImage(
opencv_core.cvGetSize(copy), copy.depth(), copy.nChannels());
CvMat mapMatrix = opencv_core.cvCreateMat(2, 3, opencv_core.CV_32FC1);
// Define Mid Point
CvPoint2D32f centerPoint = new CvPoint2D32f();
centerPoint.x(copy.width() / 2);
centerPoint.y(copy.height() / 2);
// Get Rotational Matrix
opencv_imgproc.cv2DRotationMatrix(centerPoint, angle, 1.0, mapMatrix);
// opencv_core.cvReleaseImage(copy);
// Rotate the Image
opencv_imgproc.cvWarpAffine(copy, rotatedImage, mapMatrix,
opencv_imgproc.CV_INTER_CUBIC
+ opencv_imgproc.CV_WARP_FILL_OUTLIERS,
opencv_core.cvScalarAll(170));
opencv_core.cvReleaseImage(copy);
opencv_core.cvReleaseMat(mapMatrix);
return rotatedImage;
}But Final output of video makes half of the video green
Thanks in advance