
Recherche avancée
Autres articles (54)
-
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 (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (2224)
-
Remove Unwanted Rotation of video when merge audio With Video Using FFMPEG
2 octobre 2015, par bhavesh kailaActually I want to overwrite Audio Using Recorder Audio file into Recorded Video File.For That I am Using FFMPEG Library Project from this Link
Issue :
When I capture video in Portrait mode and then merge video with recorded audio merging is working fine but the problem is Video is rotate 90 Degree and then merging is work.I don’t Want to rotate video I want to do merge Only.if I capture video in Landscape Mode Then Merging audio is Working Fine.
Below Currently FFMPEG Command is Used for merging Audio with Video File
ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0 OutputFile.mp4
And I Have Tried Using Below Commands also but it’s Not working
ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0 -vf -metadata:s:v:0 rotate=0 OutputFile.mp4
And
ffmpeg -y -i Video.mp4 -i Audio.mp4 -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0 -vf -metadata:s:v:0 translate=1 OutputFile.mp4
And I have Trying othe possibility also but its not work for me.
Any Help Would be Acceptable.
Thanks In Advance
Log cat is displaying below
WARNING: linker: /data/data/com.informer.favoraid/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
ffmpeg version 0.11.1
built on Feb 7 2015 21:39:25 with gcc 4.6 20120106 (prerelease)
configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/josh/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/josh/android-ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --enable-muxer=md5
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.informer.favoraid/files/MP4_FAV20151002_105039_1099425693.mp4':
10-01 17:15:20.056: I/System.out(6526): sxCon> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/storage/emulated/0/Android/data/com.informer.favoraid/files/MP4_FAV20151001_171355_-1450037636.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2015-10-01 11:44:06
Duration: 00:00:04.80, start: 0.000000, bitrate: 15488 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16004 kb/s, 29.97 fps, 30 tbr, 90k tbn, 180k tbc
Metadata:
rotate : 90
creation_time : 2015-10-01 11:44:06
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
creation_time : 2015-10-01 11:44:06
handler_name : SoundHandle
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.informer.favoraid/Audio_Recording.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2015-10-01 11:45:13
Duration: 00:00:05.24, start: 0.000000, bitrate: 18 kb/s
Stream #1:0(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, s16, 12 kb/s
Metadata:
creation_time : 2015-10-01 11:45:13
handler_name : SoundHandle
Output #0, mp4, to '/storage/emulated/0/Android/data/com.informer.favoraid/OutputFile.mp4':
Metadata:
: major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2015-10-01 11:44:06
encoder : Lavf54.6.100
Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1920x1080, q=2-31, 16004 kb/s, 29.97 fps, 90k tbn, 90k tbc
Metadata:
rotate : 90
creation_time : 2015-10-01 11:44:06
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 8000 Hz, mono, 12 kb/s
Metadata:
creation_time : 2015-10-01 11:45:13
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 138 fps=0.0 q=-1.0 Lsize= 9008kB time=00:00:04.57 bitrate=16141.8kbits/s -
ffmpeg hangs when run in a multi-threaded environment
3 février 2018, par Zaid AmirI have a service that needs to transcode large amount of videos with different formats. The service spawns five threads, one for a single video and each thread runs ffmpeg with the following command :
ffmpeg -i %%FILEPATH%% -vf scale=X:Y -ab 128k -c:a aac -movflags faststart -strict -2 -ar 22050 -r 24 -c:v libx264 -crf 25 -y %%OUTPUT.MP4%%
where X and Y are the desired dimensions based on the orientation of the original file basically its either
640:trunc(ow*a/2)*2
for landscape ortrunc(oh*a/2)*2:640
for portrait.This is my ffmpeg info :
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...The service is written in Java and running on Ubuntu Server 14.04 and the machine is an 64-bit octa-core server.
This is the code block that executes ffmpeg :
try
{
ProcessBuilder procBuilder = null;
String sArgs = String.format("ffmpeg -i %s -vf scale=%s:%s -ab 128k -c:a aac -movflags faststart -strict -2 -ar 22050 -r 24 -c:v libx264 -crf 25 -y %s",
originalPath,
outWidth,
outHeight,
targetPath
);
}
String[] arrArgs = sArgs.split("\\s+");
procBuilder = new ProcessBuilder(Arrays.asList(arrArgs));
procBuilder.redirectErrorStream(true);
procBuilder.redirectOutput();
Process process = procBuilder.start();
try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())))
{
String line = null;
while ((line = reader.readLine()) != null)
{
System.out.println(line);
}
errorCode = process.waitFor();
}
}
catch(Throwable ex)
{
}I am currently spawning five threads, and each thread runs a single instance of ffmpeg targeting a single video file. This works fine most of the time, but every once in a while threads start to hang. I noticed from top that ffmpeg hangs indefinitely on some files with one of the threads using 100% of the core CPU and no progress is made. It happened with different file types as I noticed this on mkv, avi, wmv and mp4 files.
I am not sure what is causing ffmpeg to hang, it does not happen right at the beginning of the transcoding process, ffmpeg starts converting the file fine but somewhere in the middle it gets stuck.
Now this is not a problem with the files as when I try the same command on the same file manually it runs fine. And it only seems to happen when there are multiple instances of ffmpeg running at the same time as I now changed my service to only run a single thread and it has been running for almost a month with no issues.
Is there an option that I need to use to allow multiple instances of ffmpeg to run at the same time ? Is it something in the command line that I currently use that causes this ?
-
ffmpeg hangs when run in a multi-threaded environemt
13 mai 2016, par Zaid AmirI have a service that needs to transcode large amount of videos with different formats. The service spawns five threads, one for a single video and each thread runs ffmpeg with the following command :
ffmpeg -i %%FILEPATH%% -vf scale=X:Y -ab 128k -c:a aac -movflags faststart -strict -2 -ar 22050 -r 24 -c:v libx264 -crf 25 -y %%OUTPUT.MP4%%
where X and Y are the desired dimensions based on the orientation of the original file basically its either
640:trunc(ow*a/2)*2
for landscape ortrunc(oh*a/2)*2:640
for portrait.This is my ffmpeg info :
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...The service is written in Java and running on Ubuntu Server 14.04 and the machine is an 64-bit octa-core server.
This is the code block that executes ffmpeg :
try
{
ProcessBuilder procBuilder = null;
String sArgs = String.format("ffmpeg -i %s -vf scale=%s:%s -ab 128k -c:a aac -movflags faststart -strict -2 -ar 22050 -r 24 -c:v libx264 -crf 25 -y %s",
originalPath,
outWidth,
outHeight,
targetPath
);
}
String[] arrArgs = sArgs.split("\\s+");
procBuilder = new ProcessBuilder(Arrays.asList(arrArgs));
procBuilder.redirectErrorStream(true);
procBuilder.redirectOutput();
Process process = procBuilder.start();
try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())))
{
String line = null;
while ((line = reader.readLine()) != null)
{
System.out.println(line);
}
errorCode = process.waitFor();
}
}
catch(Throwable ex)
{
}I am currently spawning five threads, and each thread runs a single instance of ffmpeg targeting a single video file. This works fine most of the time, but every once in a while threads start to hang. I noticed from top that ffmpeg hangs indefinitely on some files with one of the threads using 100% of the core CPU and no progress is made. It happened with different file types as I noticed this on mkv, avi, wmv and mp4 files.
I am not sure what is causing ffmpeg to hang, it does not happen right at the beginning of the transcoding process, ffmpeg starts converting the file fine but somewhere in the middle it gets stuck.
Now this is not a problem with the files as when I try the same command on the same file manually it runs fine. And it only seems to happen when there are multiple instances of ffmpeg running at the same time as I now changed my service to only run a single thread and it has been running for almost a month with no issues.
Is there an option that I need to use to allow multiple instances of ffmpeg to run at the same time ? Is it something in the command line that I currently use that causes this ?