
Recherche avancée
Autres articles (35)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (6469)
-
Ffmpeg - Convert Wav to OGG on Android (wrong metadata on some devices)
13 décembre 2016, par Pepa ZapletalI have in the app
Wav
file and I want to convert it to theOGG
format.I’m using
ffmpeg
library for it and this command :ffmpeg -i /storage/emulated/0/Test.wav -c:a libvorbis -q:a 5 /storage/emulated/0/Test.ogg
But I have problem play correctly the generated OGG file on some Android devices. If I open this file in standard MediaPlayer then I get the wrong file duration, seeking is also not working very well BUT the file is played whole and correctly. This happens for example on Huawei M2 with Android 5.1 but on Samsung Galaxy S5 (with Android 5.1) the generated file is OK and playing is also OK.
Do you have some idea where can be a problem ?
Full output from ffmpeg :
ffmpeg version n2.6.2 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9 (GCC) 20140827 (prerelease)
configuration: --target-os=linux --cross-prefix=/home/chrono/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --enable-runtime-cpudetect --sysroot=/home/chrono/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libtheora --enable-libfdk-aac --enable-nonfree --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/chrono/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/chrono/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/chrono/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp' --extra-ldflags='-L/home/chrono/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie -Wl,--fix-cortex-a8' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from '/storage/emulated/0/IAMDJ/MyLoops/mix folder/Test.wav':
Metadata:
encoder : Lavf56.25.101
Duration: 00:00:16.01, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, ogg, to '/storage/emulated/0/Test.ogg':
Metadata:
encoder : Lavf56.25.101
Stream #0:0: Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp
Metadata:
encoder : Lavc56.26.100 libvorbis
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
size= 4kB time=00:00:01.00 bitrate= 35.0kbits/s
size= 27kB time=00:00:02.01 bitrate= 107.8kbits/s
size= 48kB time=00:00:03.04 bitrate= 129.3kbits/s
size= 70kB time=00:00:04.06 bitrate= 140.3kbits/s
size= 91kB time=00:00:05.14 bitrate= 144.9kbits/s
size= 113kB time=00:00:06.15 bitrate= 149.7kbits/s
video:0kB audio:344kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 1.994279%Edit : here is the result file : Test.ogg
Edit 2 : Maybe there can be a problem with standard
MediaPlayer
but another Ogg file is played correctly. -
FFMPEG image to video showing blank video
18 avril 2017, par Ravi RupareliyaHere is my command to create a video from multiple images.
File f = new File(Environment.getExternalStorageDirectory() + "/abc.mp4");
try {
f.createNewFile();
ffmpeg.execute(new String[]{"-y","-r","1/5","-i","" + "/" + "image%01d.jpg","-pix_fmt","yuv420p","-c:v","libx264","-crf","23","-s","640x480",f.getPath()}, listener);
} catch (Exception e) {
e.printStackTrace();
}I have multiple images available at with having names like image1.jpg, image2.jpg etc etc.
It is creating video file with some 100-200 KB but it showing blank images in VLC player.
When i try to run it with Windows Media Player, it only runs if it is in repeat mode from player, otherwise it is not playing.
Output in
onSuccess()
[ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/x86 --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[mjpeg @ 0xb97270a0] Changing bps to 8
Input #0, image2, from '/storage/emulated/0/Download/image%01d.jpg':
Duration: 00:00:00.08, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 464x317 [SAR 1:1 DAR 464:317], 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0xb9741480] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0xb97287c0] using SAR=348/317
[libx264 @ 0xb97287c0] using cpu capabilities: none!
[libx264 @ 0xb97287c0] profile High, level 2.2
[libx264 @ 0xb97287c0] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/storage/emulated/0/abc.mp4':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 348:317 DAR 464:317], q=-1--1, 0.20 fps, 16384 tbn, 0.20 tbc
Metadata:
encoder : Lavc57.24.102 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Input stream #0:0 frame changed from size:464x317 fmt:yuvj420p to size:313x470 fmt:yuvj420p
[swscaler @ 0xb9752fc0] deprecated pixel format used, make sure you did set range correctly
frame= 2 fps=0.0 q=-1.0 Lsize= 64kB time=00:00:10.00 bitrate= 52.4kbits/s speed=34.3x
video:63kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.310563%
[libx264 @ 0xb97287c0] frame I:1 Avg QP:14.14 size: 23785
[libx264 @ 0xb97287c0] frame P:1 Avg QP:17.01 size: 40246
[libx264 @ 0xb97287c0] mb I I16..4: 3.3% 82.2% 14.4%
[libx264 @ 0xb97287c0] mb P I16..4: 2.0% 88.1% 9.9% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip: 0.0%
[libx264 @ 0xb97287c0] 8x8 transform intra:85.2%
[libx264 @ 0xb97287c0] coded y,uvDC,uvAC intra: 93.3% 82.2% 71.0%
[libx264 @ 0xb97287c0] i16 v,h,dc,p: 5% 3% 3% 89%
[libx264 @ 0xb97287c0] i8 v,h,dc,ddl,ddr,vr, -
How to reduce conversion/compression time in FFmpeg and How to merge command ?
18 mai 2017, par Patel PinkalI want to reduce time taken to create new video after adding text in original video using FFmpeg
I had tried to search and I found this code given below for reducing time.-y -i /sdcard/videokit/in.mp4 -strict experimental -vcodec libx264 -preset ultrafast -crf 24 -acodec aac -ar 44100 -ac 2 -b 36000k -s 1280x720 -aspect 16:9 -metadata:s:v:0 rotate=0 /sdcard/videokit/out3.mp4
Now, I want to add text in video and it is done in FFmpeg, by this command and its 100% working.
String[] addTextCommand = {
"-i",
"" + realFilePath,
"-vf",
"drawtext=fontsize=50:fontfile=/storage/emulated/0/Download/Cerbetica-regular.ttf:fontcolor=red:text='"
+ strText +
"':x=0:y=0: box=1: boxcolor=black@0.5:boxborderw=10: x=0: y=(h-text_h)/2",
"-strict",
"-2",
outputFilePath};Now my problem is how do I merge this two code and make one single command to make an edited video and also take less time to create a new video. In this, I have tried this command but it’s not working.
String[] addTextCommand = {
"-i",
"" + realVideoPath,
"-vf",
"-c:v", "libx264",
"-preset", "ultrafast",
"-crf", "24",
"-acodec", "aac",
"-ar", "44100",
"-ac", "2",
"-b", "36000k",
"-s", "1280x720",
"-aspect", "16:9",
"-metadata:s:v:0 rotate=0",
"drawtext=fontsize=50:fontfile=/storage/emulated/0/Download/Cerbetica-regular.ttf:fontcolor=red:text='"
+ strText +
"':x=0:y=0: box=1: boxcolor=black@0.5:boxborderw=10: x=0: y=(h-text_h)/2",
"-strict",
"-2",
outputFilePath};If anyone has an idea how to make command of FFmpeg please describe it and explain how to use it.
Using command of @Mulvya I got this in the console.
D/MainActivity: FAILED with output : WARNING: linker: /data/user/0/com.inheritx.videoprocessing/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/x86 --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Unrecognized option '2'.
Error splitting the argument list: Option not found
D/MainActivity: Finished command : ffmpeg -i
D/MainActivity: Finished command : ffmpeg /storage/emulated/0/Download/spacetestSMALL_512kb.mp4
D/MainActivity: Finished command : ffmpeg -vf
D/MainActivity: Finished command : ffmpeg drawtext=fontsize=50:fontfile=/system/fonts/DroidSans.ttf:fontcolor=red:text='Hello':x=0:y=0: box=1: boxcolor=black@0.5:boxborderw=10: x=0: y=(h-text_h)/2
D/MainActivity: Finished command : ffmpeg -c:v
D/MainActivity: Finished command : ffmpeg libx264
D/MainActivity: Finished command : ffmpeg -preset
D/MainActivity: Finished command : ffmpeg ultrafast
D/MainActivity: Finished command : ffmpeg -crf
D/MainActivity: Finished command : ffmpeg 24
D/MainActivity: Finished command : ffmpeg -acodec
D/MainActivity: Finished command : ffmpeg aac
D/MainActivity: Finished command : ffmpeg -ar
D/MainActivity: Finished command : ffmpeg 44100
D/MainActivity: Finished command : ffmpeg -s
D/MainActivity: Finished command : ffmpeg 1280x720
D/MainActivity: Finished command : ffmpeg -aspect
D/MainActivity: Finished command : ffmpeg 16:9
D/MainActivity: Finished command : ffmpeg -metadata:s:v:0 rotate=0
D/MainActivity: Finished command : ffmpeg -strict
D/MainActivity: Finished command : ffmpeg -2
D/MainActivity: Finished command : ffmpeg /storage/emulated/0/Movies/add_text25.mp4