
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (50)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (7556)
-
Record video with Media Recorder in WEBM format
21 mai 2017, par MathoI need to record two videos via media recorder and process them with ffmpeg in Android. I want to read videos via pipe in ffmpeg command string. From what I have read, I could not use 3GPP/MP4 format, because these formats contains header at the end of video. Because of it, I want to use WEBM video format, but my app is crashing, when I use webm/vp8 setting in media recorder. Ffmpeg I’m using is : com.writingminds:FFmpegAndroid:0.3.2. Could you help me please ?
RecorderPrepareTask :
class RecorderPrepareTask extends AsyncTask {
private Context mContext;
public RecorderPrepareTask(Context context) {
mContext = context;
}
@Override
protected Boolean doInBackground(Void... voids) {
Timber.d("Starting screen recording...");
if (!outputRoot.exists() && !outputRoot.mkdirs()) {
Timber.e("Unable to create output directory '%s'.", outputRoot.getAbsolutePath());
return false;
}
recorder = new MediaRecorder();
recorder.setVideoSource(SURFACE);
recorder.setOutputFormat(MediaRecorder.OutputFormat.WEBM);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.VP8);
recorder.setVideoSize(Config.VIDEO_SIZE_W, Config.VIDEO_SIZE_H);
recorder.setVideoFrameRate(Config.FRAME_RATE);
Timber.i("Output file '%s'.", outputFileName);
recorder.setOutputFile(RecordingActivity.pipe[1].getFileDescriptor());
try {
recorder.prepare();
} catch (IOException e) {
throw new RuntimeException("Unable to prepare MediaRecorder.", e);
}
projection = projectionManager.getMediaProjection(resultCode, data);
Surface surface = recorder.getSurface();
display = projection.createVirtualDisplay(DISPLAY_NAME, Config.VIDEO_SIZE_W, Config.VIDEO_SIZE_H, 560, VIRTUAL_DISPLAY_FLAG_PRESENTATION, surface, null, null);
recorder.start();
return true;
}
@Override
protected void onPostExecute(Boolean result) {
}}
getConvertCmd :
private String getConvertCmd(){
return "-re -r 30 -f webm -c:v vp8 -i pipe:"+ RecordingActivity.pipe[0].getFd() + " -threads 2 -preset ultrafast -profile:v main -level 3.1 -b:v 440k -ar 44100 -ab 128k -s "+ Config.CAMERA_VIDEO_SIZE_W + "x" + Config.CAMERA_VIDEO_SIZE_H + " -vcodec vp8 -acodec vorbis " + outputFileName3;
}Logs :
D/SoftVPXEncoder: VP8: internalSetAndroidVp8Params. BRMode: 0. TS: 0. KF: 24. QP: 0 - 0 BR0: 100. BR1: 0. BR2: 0
I/ACodec: setupVideoEncoder succeeded
E/OMXNodeInstance: setConfig(1a:google.vp8.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
I/ACodec: codec does not support config priority (err -2147483648)
W/ACodec: do not know color format 0x7f000789 = 2130708361
I/SoftMPEG4Encoder: Construct SoftMPEG4Encoder
I/MediaCodec: MediaCodec will operate in async mode
E/OMXNodeInstance: getParameter(1b:google.mpeg4.encoder, ParamVideoErrorCorrection(0x6000007)) ERROR: NotImplemented(0x80001006)
I/ACodec: setupVideoEncoder succeeded
E/OMXNodeInstance: setConfig(1b:google.mpeg4.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
I/ACodec: codec does not support config priority (err -2147483648)
D/SoftVPXEncoder: VP8: initEncoder. BRMode: 0. TSLayers: 0. KF: 24. QP: 0 - 0
I/AudioFlinger: AudioFlinger's thread 0xb2440000 ready to run
xW/AudioFlinger: acquireAudioSessionId() unknown client 10079 for session 7
I/MediaCodec: MediaCodec will operate in async mode
/system_process I/DisplayManagerService: Display device added: DisplayDeviceInfo{"RMR": uniqueId="virtual:sk.matho.rocket_monkeys.rocketmonkeysrecorder,10052,RMR,0", 480 x 640, modeId 6, defaultModeId 6, supportedModes [{id=6, width=480, height=640, fps=60.0}], density 560, 560.0 x 560.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, state ON, owner sk.matho.rocket_monkeys.rocketmonkeysrecorder (uid 10052), FLAG_PRIVATE, FLAG_PRESENTATION}
E/OMXNodeInstance: setConfig(1c:google.amrnb.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
I/ACodec: codec does not support config priority (err -2147483648)
E/WebmElement: mmap64 failed; errno = 22
E/WebmElement: fd 18; flags: 1
E/WebmElement: mmap64 failed; errno = 22
E/WebmElement: fd 18; flags: 1
E/WebmElement: mmap64 failed; errno = 22
E/WebmElement: fd 18; flags: 1
E/WebmElement: mmap64 failed; errno = 22
E/WebmElement: fd 18; flags: 1
E/WebmElement: mmap64 failed; errno = 22
E/WebmElement: fd 18; flags: 1
E/WebmElement: mmap64 failed; errno = 22
E/WebmElement: fd 18; flags: 1
D/gralloc_ranchu: gralloc_alloc: format 1 and usage 0x10003 imply creation of host color buffer
I/MediaCodecSource: MediaCodecSource (video) starting
I/MediaCodecSource: MediaCodecSource (video) started
D/MPEG4Writer: Video track stopping
E/MPEG4Writer: Stop() called but track is not started
D/MPEG4Writer: Audio track stopping
E/MPEG4Writer: Stop() called but track is not started
[ 05-21 13:03:44.101 9757: 9766 D/ ]
HostConnection::get() New Host Connection established 0xb344f140, tid 9766
/sk.matho.rocket_monkeys.rocketmonkeysrecorder E/MediaRecorder: start failed: -2147483648
/sk.matho.rocket_monkeys.rocketmonkeysrecorder E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: sk.matho.rocket_monkeys.rocketmonkeysrecorder, PID: 10079
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.RuntimeException: start failed.
at android.media.MediaRecorder.start(Native Method)
at sk.matho.rocket_monkeys.rocketmonkeysrecorder.recording.CameraRecordingSession$MediaPrepareTask.doInBackground(CameraRecordingSession.java:181)
at sk.matho.rocket_monkeys.rocketmonkeysrecorder.recording.CameraRecordingSession$MediaPrepareTask.doInBackground(CameraRecordingSession.java:173)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
[ 05-21 13:03:44.109 9757:10315 D/ ]
HostConnection::get() New Host Connection established 0xb307c1c0, tid 10315 -
Create conversion queue using ffmpeg and C #
22 octobre 2017, par Alexei Agüero AlbaOk, the idea is to create a file queue that can be modified and reorganized (this is done) and for each file execute a ffmpeg process to convert it to another format.
For conversion use Xabe.FFmpeg and .Net 4.5 all using async and await.
The question would be how to execute an x number of processes in parallel (example 4) of that variable queue and when one of them finishes executing the next one, keeping in execution always the same amount in parallel. I can start from scratch but I need ideas on how to do this in the simplest way possible. The program itself is simple (with gui) takes a folder and its subfolders all the video files and queues them and starts the conversion, you can add other folders with more files, and independent files reorder them, to convert whichever is the greater.
At one point I found a package I think nuget (or github) that did exactly what I needed but I have not been able to get back.
Thanks for your help in advance.
Excuse the English because I use the translator of Google for being faster because my domain of this is limited but sufficient to understand the answers.
Ok, I found what I was looking for called ProcessManager is a nupkg package. It has 2 years of development but seems stable. The only drawback is that it does not allow me to organize the conversion queue once you have added the files, although I have to try some ideas that maybe functions.
var manager = new Manager(4); // Max 4 processes will be started simultaneously
manager.Start();
manager.ProcessErrorDataReceived += (sender, e) => Console.WriteLine(e.Data);
manager.ProcessOutputDataReceived += (sender, e) => Console.WriteLine(e.Data);
foreach (var videoFileName in Directory.EnumerateFiles("videos"))
{
var info = new ProcessInfo(
"ffprobe.exe",
string.Format("-v quiet -print_format json -show_format -show_streams \"{0}\"", videoFileName));
manager.Queue(info);
} -
Couldn't open https stream - protocol not found (ffmpeg with openssl)
25 avril 2017, par Victor PonomarenkoI received from compiled ffmpeg with openssl next message :
Protocol not found
. I’m testing on hls over https.The ffmpeg is
3.3
and openssl is1.0.0a
versions.I have next configure script :
./configure \
--target-os=linux \
--incdir=$BUILD_DIR/include/$ABI \
--libdir=$BUILD_DIR/lib/$ABI \
--prefix=$BUILD_DIR/lib/$ABI \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=$ARCH \
--cc=$PREBUILT/bin/$HOST-gcc \
--cross-prefix=$PREBUILT/bin/$HOST- \
--nm=$PREBUILT/bin/$HOST-nm \
--sysroot=$PLATFORM \
--extra-cflags="$OPTIMIZE_CFLAGS -I${OPENSSL_INCLUDE_DIR}" \
--extra-cxxflags="I${OPENSSL_INCLUDE_DIR}" \
--extra-ldflags="-Wl,-rpath-link=${PLATFORM}usr/lib -L${PLATFORM}usr/lib -nostdlib -lc -lm -ldl -llog -lz -L${OPENSSL_BUILD_DIR}/${ABI} $openssl_addi_ldflags -lssl -lcrypto" \
--disable-static \
--disable-ffplay \
--disable-ffmpeg \
--disable-ffprobe \
--disable-ffserver \
--disable-doc \
--disable-symver \
--disable-postproc \
--disable-gpl \
--disable-encoders \
--disable-muxers \
--disable-bsfs \
--disable-protocols \
--disable-indevs \
--disable-outdevs \
--disable-devices \
--enable-shared \
--enable-small \
--enable-encoder=png \
--enable-openssl \
--enable-runtime-cpudetect \
--enable-protocol=file,ftp,http,https,httpproxy,hls,mmsh,mmst,pipe,rtmp,rtmps,rtmpt,rtmpts,rtp,sctp,srtp,tcp,udp \
--pkg-config=$(which pkg-config) \
$ADDITIONAL_CONFIGURE_FLAG || die "Couldn't configure ffmpeg!"Before I configured it I received errors like
openssl not found
. I fixed that, but i try to load stream which works over https, I receivesProtocol not found
. Also, I think this is weird, after configuration https is missed in enabled protocols list.Enabled protocols:
ffrtmphttp hls mmsh rtmp srtp
file http mmst rtmpt tcp
ftp httpproxy pipe rtp udp
Update 23.04.2017
My openssl build script :
# environment variables
top_root=$PWD
src_root=${top_root}/src
patch_root=${top_root}/patches
dist_root=${top_root}/libs/openssl
dist_bin_root=${dist_root}/bin
dist_include_root=${dist_root}/include
dist_lib_root=${dist_root}/lib
build_log=${top_root}/openssl_build.log
# create our folder structure
cd ${top_root}
test -d ${src_root} || mkdir -p ${src_root}
test -d ${dist_root} || mkdir -p ${dist_root}
test -d ${dist_bin_root} || mkdir -p ${dist_bin_root}
test -d ${dist_include_root} || mkdir -p ${dist_include_root}
test -d ${dist_lib_root} || mkdir -p ${dist_lib_root}
touch ${build_log}
rm -f ${build_log}
echo "Building openssl-android ..."
test -d ${src_root}/openssl-android || \
git clone https://github.com/guardianproject/openssl-android.git ${src_root}/openssl-android >> ${build_log} 2>&1 || \
die "Couldn't clone openssl-android repository!"
cd ${src_root}/openssl-android
${NDK}/ndk-build >> ${build_log} 2>&1 || die "Couldn't build openssl-android!"
# copy the versioned libraries
#cp -r ${src_root}/openssl-android/libs/armeabi/lib*.so --parents ${dist_lib_root}/.
rsync -a --include '*/' --include '*.so' --exclude '*' ${src_root}/openssl-android/libs/ ${dist_lib_root}/
# copy the executables
#cp -r ${src_root}/openssl-android/libs/armeabi/openssl ${dist_bin_root}/. # work only for one abi folder
rsync -a --include '*/openssl' --exclude '*.so' ${src_root}/openssl-android/libs/ ${dist_bin_root}/
#cp -r ${src_root}/openssl-android/libs/armeabi/ssltest ${dist_bin_root}/. # work only for one abi folder
rsync -a --include '*/ssltest' --exclude '*.so' ${src_root}/openssl-android/libs/ ${dist_bin_root}/
# copy the headers
cp -r ${src_root}/openssl-android/include/* ${dist_include_root}/.
cd ${top_root}Will thankful for any help.