
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (72)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
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 (7996)
-
fastest ffmpeg without caring about quality
31 mai 2019, par RedDeathI would like to convert any video into .mp4 as fast as possible without caring about quality loss. I have used the next commands with which I have been able to finish the process in 37 seconds for a 10 second video.
-vcodec h264
-crf 32
-preset ultrafastHowever 37 seconds is still too long for a 10 seconds video. Is there any improvements that I can do to the command in order to reduce the execution time ?
Edit (Extra info) :
I’m using FFmpeg Android (
implementation 'com.writingminds:FFmpegAndroid:0.3.2'
) even though commands usually work for any FFmpeg (with a few variants depending on the FFmpeg version).The command used in my case which gave me the fastest result so far is :
mFfmpeg.execute(
arrayOf(
"-i" , videoCopy?.path,
"-vcodec", "h264",
"-crf", "32",
"-preset", "ultrafast",
"-y", uploadFile?.path),
object : ExecuteBinaryResponseHandler() { ... }Which for regular FFmpeg command would be
"-ffmpeg -i {video?.path} -vcodec h264 -crf 32 -preset ultrafast -y {uploadFile?.path}"
Where
video
is my original videoFile
anduploadFile
is theFile
where I want to save the result into.In a Samsung J3 (SM-J320M, you can find its specifications online) such command takes the aforementioned 37 seconds.
After executing such command the first onProgress message returned by FFmpeg prints :
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/arm-linux-androideabi-
--arch=arm
--cpu=cortex-a8
--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/armeabi-v7a
--extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all'
--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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DCIM/Yakatak/656.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2019-05-29 11:27:56 location : +51.5202-000.1435/ location-eng : +51.5202-000.1435/ Duration: 00:00:09.47, start: 0.000000, bitrate: 12147 kb/s Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 11899 kb/s, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: rotate : 90 creation_time : 2019-05-29 11:27:56 handler_name : VideoHandle Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default) Metadata: creation_time : 2019-05-29 11:27:56 handler_name : SoundHandle[libx264 @ 0xb5428800] using cpu capabilities: none![libx264 @ 0xb5428800] profile Constrained Baseline, level 3.1[libx264 @ 0xb5428800] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=32.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/storage/emulated/0/DCIM/Yakatak/uploadFile.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 location-eng : +51.5202-000.1435/ location : +51.5202-000.1435/ encoder : Lavf57.25.100 Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x1280, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default) Metadata: handler_name : VideoHandle creation_time : 2019-05-29 11:27:56 encoder : Lavc57.24.102 libx264 Side data: unknown side data type 10 (24 bytes) Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2019-05-29 11:27:56 handler_name : SoundHandle encoder : Lavc57.24.102 aacStream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native))Press [q] to stop, [?] for helpframe= 0 fps=0.0 -
Issue in concatenating two video files using FFMPEG
12 mai 2014, par intrepidkarthiI am trying to concatenate two mp4 files taken from gallery. I am getting issue with process execution failure. I have added the code and the error log. Using the ffmpeg library taken from guardian project.
I am running this in Samsung Galaxy S3 device.
The error is thrown in this particular line.
ProcessBuilder pb = new ProcessBuilder(cmds);
pb.directory(fileExec);
Process process = pb.start();When I replace the last line above with this,
Process process = Runtime.getRuntime().exec("chmod 777 "+cmds.toArray(new String[cmds.size()]));
It works with out the exception as shown below. But the output doesn’t seem to come.
File concatenation Code :
File fileVideoOutput = new File(getApplicationContext()
.getExternalFilesDir("test") + "hello.mp4");
fileVideoOutput.delete();
File fileTmp = getApplicationContext().getCacheDir();
File fileAppRoot = new File(getApplicationContext()
.getApplicationInfo().dataDir);
try {
FfmpegController fc = new FfmpegController(fileTmp, fileAppRoot);
ArrayList<clip> listVideos = new ArrayList<clip>();
Clip clip = new Clip();
clip.path = video1;
fc.getInfo(clip);
clip.duration = clip.duration;
System.out.println("Clip1 duration " + clip.duration);
listVideos.add(clip);
Clip clip2 = new Clip();
clip2.path = video2;
fc.getInfo(clip2);
clip2.duration = clip2.duration;
System.out.println("Clip2 duration " + clip2.duration);
listVideos.add(clip2);
Clip clipOut = new Clip();
clipOut.path = fileVideoOutput.getCanonicalPath();
fc.concatAndTrimFilesMP4Stream(listVideos, clipOut, false, false,
new ShellUtils.ShellCallback() {
@Override
public void shellOut(String shellLine) {
System.out.println("fc>" + shellLine);
}
@Override
public void processComplete(int exitValue) {
if (exitValue < 0)
System.err.println("concat non-zero exit: "
+ exitValue);
}
});
} catch (Exception e1) {
e1.printStackTrace();
}
</clip></clip>Error log :
05-08 11:17:03.765: W/System.err(25209): java.io.IOException: Error running exec(). Command: [ffmpeg, -y, -i, /storage/emulated/0/DCIM/Camera/20140507_155713.mp4, -f, mpegts, -c, copy, -an, -bsf:v, h264_mp4toannexb, /data/data/com.yoyo.videoeditor/cache/0.ts] Working Directory: /data/data/com.yoyo.videoeditor/lib Environment: [VIBE_PIPE_PATH=/dev/pipes, ANDROID_ROOT=/system, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, EMULATED_STORAGE_TARGET=/storage/emulated, ANDROID_BOOTLOGO=1, LD_LIBRARY_PATH=/vendor/lib:/system/lib, EXTERNAL_STORAGE=/storage/emulated/legacy, ANDROID_SOCKET_zygote=9, ANDROID_DATA=/data, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/sec_edm.jar:/system/framework/seccamera.jar:/system/framework/scrollpause.jar:/system/framework/stayrotation.jar:/system/framework/smartfaceservice.jar:/system/framework/sc.jar:/system/framework/secocsp.jar:/system/framework/commonimsinterface.jar, ANDROID_PROPERTY_WORKSPACE=8,66560, SECONDARY_STORAGE=/storage/extSdCard:/storage/UsbDriveA:/storage/UsbDriveB:/storage/UsbDriveC:/storage/UsbDriveD:/storage/UsbDriveE:/storage/UsbDriveF, ANDROID_STORAGE=/storage]
05-08 11:17:03.770: W/System.err(25209): at java.lang.ProcessManager.exec(ProcessManager.java:211)
05-08 11:17:03.770: W/System.err(25209): at java.lang.ProcessBuilder.start(ProcessBuilder.java:195)
05-08 11:17:03.770: W/System.err(25209): at org.ffmpeg.android.FfmpegController.execProcess(FfmpegController.java:101)
05-08 11:17:03.770: W/System.err(25209): at org.ffmpeg.android.FfmpegController.execFFMPEG(FfmpegController.java:71)
05-08 11:17:03.770: W/System.err(25209): at org.ffmpeg.android.FfmpegController.execFFMPEG(FfmpegController.java:75)
05-08 11:17:03.775: W/System.err(25209): at org.ffmpeg.android.FfmpegController.convertToMP4Stream(FfmpegController.java:657)
05-08 11:17:03.775: W/System.err(25209): at org.ffmpeg.android.FfmpegController.concatAndTrimFilesMP4Stream(FfmpegController.java:1107)
05-08 11:17:03.775: W/System.err(25209): at com.yoyo.videoeditor.EditorActivity.mergeVideosOld(EditorActivity.java:271)
05-08 11:17:03.775: W/System.err(25209): at com.yoyo.videoeditor.EditorActivity.access$0(EditorActivity.java:243)
05-08 11:17:03.775: W/System.err(25209): at com.yoyo.videoeditor.EditorActivity$3.onClick(EditorActivity.java:85)
05-08 11:17:03.775: W/System.err(25209): at android.view.View.performClick(View.java:4475)
05-08 11:17:03.775: W/System.err(25209): at android.view.View$PerformClick.run(View.java:18786)
05-08 11:17:03.780: W/System.err(25209): at android.os.Handler.handleCallback(Handler.java:730)
05-08 11:17:03.780: W/System.err(25209): at android.os.Handler.dispatchMessage(Handler.java:92)
05-08 11:17:03.780: W/System.err(25209): at android.os.Looper.loop(Looper.java:176)
05-08 11:17:03.780: W/System.err(25209): at android.app.ActivityThread.main(ActivityThread.java:5419)
05-08 11:17:03.780: W/System.err(25209): at java.lang.reflect.Method.invokeNative(Native Method)
05-08 11:17:03.785: W/System.err(25209): at java.lang.reflect.Method.invoke(Method.java:525)
05-08 11:17:03.785: W/System.err(25209): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
05-08 11:17:03.785: W/System.err(25209): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
05-08 11:17:03.785: W/System.err(25209): at dalvik.system.NativeStart.main(Native Method)
05-08 11:17:03.785: W/System.err(25209): Caused by: java.io.IOException: Permission denied
05-08 11:17:03.785: W/System.err(25209): at java.lang.ProcessManager.exec(Native Method)
05-08 11:17:03.790: W/System.err(25209): at java.lang.ProcessManager.exec(ProcessManager.java:209)
05-08 11:17:03.790: W/System.err(25209): ... 20 moreHere is my ffmpeg commands as given in the ffmpeg tutorial page.
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4FFMPEG library doesn’t seem to be working as expected. When I add commands and create output file using "touch" shell command file is being created. Still I am unable to see the output from ffmpeg as expected.
-
Could not find tag for codec h264 in stream #2 when trim video and add watermark, music background
13 août 2020, par Nguyễn TrọngI'm doing cut video into chunks, then join them and add watermark and background music with the command below.


"[-y, -i, /storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20200726-WA0154.mp4, -i, /storage/emulated/0/FXMotion/.cache/.watermark/logo_watermark.png, -stream_loop, -1, -i, /storage/emulated/0/WhatsApp/Media/WhatsApp Documents/DripReport_-_Skechers_(Lyrics)(MP3_160K).mp3, -filter_complex, [1:v]scale=640/4:-1[logo1];[0:v]trim=0:2.483,setpts=PTS-STARTPTS[v1];[0:v]trim=2.483:7.45,setpts=2.0*(PTS-STARTPTS)[v2];[0:v]trim=7.45:9.933,setpts=PTS-STARTPTS[v3];[v1][v2][v3]concat=n=3:v=1[video];[video][logo1]overlay=main_w-overlay_w-10:main_h-overlay_h-10[vw], -map, [vw], -map, 2, -c:v, libx264, -crf, 23, -preset, veryfast, -shortest, /storage/emulated/0/FXMotion/FXMotion-200810e.mp4, -hide_banner]"



But when running I get the following error :



Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20200726-WA0154.mp4':\n 
Metadata:
major_brand : mp4v
 minor_version : 0
 compatible_brands: mp4vmp42isom\n Duration: 00:00:09.93, start: 0.000000, bitrate: 2080 kb/s
 Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 640x352, 2078 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default)
 Metadata:\n rotate : 270
 Side data:
 displaymatrix: rotation of 90.00 degrees\nInput #1, png_pipe, from '/storage/emulated/0/FXMotion/.cache/.watermark/logo_watermark.png':
 Duration: N/A, bitrate: N/A
 Stream #1:0: Video: png, rgba(pc), 335x51, 25 tbr, 25 tbn, 25 tbc
Input #2, mp3, from '/storage/emulated/0/WhatsApp/Media/WhatsApp Documents/DripReport_-_Skechers_(Lyrics)(MP3_160K).mp3':
 Metadata:
 encoder : Lavf57.56.101
 title : DripReport - Skechers (Lyrics)
 artist : DripReport
 album : DripReport\n Duration: 00:01:46.06, start: 0.011021, bitrate: 167 kb/s
 Stream #2:0: Audio: mp3, 48000 Hz, stereo, fltp, 160 kb/s
 Metadata:
 encoder : Lavc57.64
 Stream #2:1: Video: png, rgb24(pc), 400x225, 90k tbr, 90k tbn, 90k tbc (attached pic)
 Metadata:
 title : attached picture
 comment : Cover (front)
Stream mapping:
 Stream #0:0 (h264) -> trim (graph 0)
 Stream #0:0 (h264) -> trim (graph 0)
 Stream #0:0 (h264) -> trim (graph 0)
 Stream #1:0 (png) -> scale (graph 0)
 overlay (graph 0) -> Stream #0:0 (libx264)
 Stream #2:0 -> #0:1 (mp3 (mp3float) -> aac (native))
 Stream #2:1 -> #0:2 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help\n[graph 0 input from stream 1:0 @ 0x6f73832bc0] sws_param option is deprecated and ignored
[graph 0 input from stream 0:0 @ 0x6f73832c80] sws_param option is deprecated and ignored\n[graph 0 input from stream 0:0 @ 0x6f73833400] sws_param option is deprecated and ignored\n[graph 0 input from stream 0:0 @ 0x6f73833580] sws_param option is deprecated and ignored
[libx264 @ 0x6f44476300] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x6f44476300] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x6f44476300] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=4 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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[graph 2 input from stream 2:1 @ 0x6ed501c380] sws_param option is deprecated and ignored
[mp4 @ 0x6ed53b9a00] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2\n[libx264 @ 0x6f445de500] MB rate (33750000) > level limit (16711680)
[libx264 @ 0x6f445de500] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x6f445de500] profile High 4:4:4 Predictive, level 6.2, 4:4:4, 8-bit\n[libx264 @ 0x6f445de500] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=7 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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x6ed53b9a00] Could not find tag for codec h264 in stream #2, codec not currently supported in container\nCould not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --[aac @ 0x6f44478600] Qavg: nan\nConversion failed!",
 
 



i run ffmpeg on :


Device
"os_version" : "10"
"model" : "SM-A217F"
"brand" : "samsung"




How to fix it ? thank advance !