
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (50)
-
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 -
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 -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (9357)
-
CJEU rules US cloud servers don’t comply with GDPR and what this means for web analytics
17 juillet 2020, par Jake Thornton -
ffmpeg concat two video and add watermark after concating video give me blank mp4 file on server but in local working perfectly why ?
22 février 2018, par Jinal Somaiyai have two video i want to concat them and then add watermark to them but after command run give me blank mp4 file on server but in local working perfectly and on server two video concat perfectly but after that code is not running.
My code is as follows.
$videoFileName = rand('111111', '999999').'_'.time().'.'.$request->file('video1')->getClientOriginalExtension();
$intermediateVideo1 = rand('1111111', '9999999').'_'.time().'.ts';
$intermediateVideo2 = rand('1111111', '9999999').'_'.time().'.ts';
$concatVideoFileName = rand('111111', '999999').'_'.time().'.'.$request->file('video1')->getClientOriginalExtension();
exec('ffmpeg -i '.$request->file('video1').' -c copy -bsf:v h264_mp4toannexb -f mpegts '.$intermediateVideo1);
exec('ffmpeg -i '.$request->file('video2').' -c copy -bsf:v h264_mp4toannexb -f mpegts '.$intermediateVideo2);
exec('ffmpeg -i "concat:'.$intermediateVideo1.'|'.$intermediateVideo2.'" -c copy -bsf:a aac_adtstoasc '.public_path('uploads/videos/'.$concatVideoFileName));
exec('ffmpeg -i '.public_path('uploads/videos/'.$concatVideoFileName).' -i '.storage_path("assets/image/watermark.png").' -filter_complex "overlay" '.public_path('uploads/videos/'.$videoFileName));
File::delete($intermediateVideo1);
File::delete($intermediateVideo2);
File::delete('uploads/videos/'.$concatVideoFileName);
return response()->download(public_path('uploads/videos/'.$videoFileName));output of intermediate video1 :
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the
FFmpeg developers built with gcc 5.4.0 (Ubuntu
5.4.0-6ubuntu1 16.04.4) 20160609 configuration : —prefix=/usr —extra-version=0ubuntu0.16.04.1 —build-suffix=-ffmpeg —toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —cc=cc —cxx=g++ —enable-gpl —enable-shared —disable-stripping —disable-decoder=libopenjpeg —disable-decoder=libschroedinger —enable-avresample —enable-avisynth —enable-gnutls —enable-ladspa —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libflite —enable-libfontconfig —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-libsnappy —enable-libsoxr —enable-libspeex —enable-libssh —enable-libtheora —enable-libtwolame —enable-libvorbis —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx265 —enable-libxvid —enable-libzvbi —enable-openal —enable-opengl —enable-x11grab —enable-libdc1394 —enable-libiec61883 —enable-libzmq —enable-frei0r —enable-libx264 —enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 /
56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 /
53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’storage/assets/video/vcs-ads.mp4’ : Metadata :
major_brand : mp42
minor_version : 0
compatible_brands : mp42mp41isomavc1
creation_time : 2018-01-29 00:23:59 Duration : 00:00:13.76, start : 0.000000, bitrate : 460 kb/s
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 640x360 [SAR 1:1 DAR 16:9], 327 kb/s, 29.97
fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata :
creation_time : 2018-01-29 00:23:59
handler_name : L-SMASH Video Handler
encoder : AVC Coding
Stream #0:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata :
creation_time : 2018-01-29 00:23:59
handler_name : L-SMASH Audio Handler Output #0, mpegts, to ’1234567_12324.ts’ : Metadata :
major_brand : mp42
minor_version : 0
compatible_brands : mp42mp41isomavc1
encoder : Lavf56.40.101
Stream #0:0(und) : Video : h264 (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 327 kb/s, 29.97 fps, 29.97 tbr,
90k tbn, 30k tbc (default)
Metadata :
creation_time : 2018-01-29 00:23:59
handler_name : L-SMASH Video Handler
encoder : AVC Coding
Stream #0:1(und) : Audio : aac (mp4a / 0x6134706D), 48000 Hz, stereo, 128 kb/s (default)
Metadata :
creation_time : 2018-01-29 00:23:59
handler_name : L-SMASH Audio Handler Stream mapping : Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 412 fps=0.0 q=-1.0 Lsize= 898kB
time=00:00:13.76 bitrate= 534.5kbits/s video:550kB audio:215kB
subtitle:0kB other streams:0kB global headers:0kB muxing overhead :
17.329643% -
ffmpeg webm to mp4 conversion failed
13 juin 2020, par Jaunius BumptirkluTrying to convert webm file to mp4. Getting "conversion failed" as a result. Other webm files I am working with converts just fine.



ffprobe info on inputfile.webm



$ ffprobe -v quiet -print_format json -show_format -show_streams inputfile.webm
{
 "streams": [
 {
 "index": 0,
 "codec_name": "vp8",
 "codec_long_name": "On2 VP8",
 "profile": "0",
 "codec_type": "video",
 "codec_time_base": "1/30",
 "codec_tag_string": "[0][0][0][0]",
 "codec_tag": "0x0000",
 "width": 640,
 "height": 480,
 "coded_width": 640,
 "coded_height": 480,
 "has_b_frames": 0,
 "sample_aspect_ratio": "1:1",
 "display_aspect_ratio": "4:3",
 "pix_fmt": "yuv420p",
 "level": -99,
 "field_order": "progressive",
 "refs": 1,
 "r_frame_rate": "30/1",
 "avg_frame_rate": "30/1",
 "time_base": "1/1000",
 "start_pts": 0,
 "start_time": "0.000000",
 "disposition": {
 "default": 1,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0
 }
 },
 {
 "index": 1,
 "codec_name": "opus",
 "codec_long_name": "Opus (Opus Interactive Audio Codec)",
 "codec_type": "audio",
 "codec_time_base": "1/48000",
 "codec_tag_string": "[0][0][0][0]",
 "codec_tag": "0x0000",
 "sample_fmt": "fltp",
 "sample_rate": "48000",
 "channels": 1,
 "channel_layout": "mono",
 "bits_per_sample": 0,
 "r_frame_rate": "0/0",
 "avg_frame_rate": "0/0",
 "time_base": "1/1000",
 "start_pts": 0,
 "start_time": "0.000000",
 "duration_ts": 12333,
 "duration": "12.333000",
 "disposition": {
 "default": 1,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0
 }
 }
 ],
 "format": {
 "filename": "inputfile.webm",
 "nb_streams": 2,
 "nb_programs": 0,
 "format_name": "matroska,webm",
 "format_long_name": "Matroska / WebM",
 "start_time": "0.000000",
 "duration": "12.333000",
 "size": "1609303",
 "bit_rate": "1043900",
 "probe_score": 100,
 "tags": {
 "encoder": "Lavf56.40.101",
 "creation_time": "2020-06-12T11:32:05.000000Z"
 }
 }
}




ffmpeg conversion log for command "ffmpeg -i inputfile.webm out.mp4" is below.



$ ffmpeg -i inputfile.webm out.mp4
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with Apple clang version 11.0.3 (clang-1103.0.32.59)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, matroska,webm, from 'inputfile.webm':
 Metadata:
 encoder : Lavf56.40.101
 creation_time : 2020-06-12T11:32:05.000000Z
 Duration: 00:00:12.33, start: 0.000000, bitrate: 1043 kb/s
 Stream #0:0: Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
 Stream #0:1: Audio: opus, 48000 Hz, mono, fltp (default)
Stream mapping:
 Stream #0:0 -> #0:0 (vp8 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (opus (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7f9e64811600] using SAR=1/1
[libx264 @ 0x7f9e64811600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f9e64811600] profile High, level 5.0
[libx264 @ 0x7f9e64811600] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=18 lookahead_threads=3 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=25 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
Too many packets buffered for output stream 0:0.577014:32:22.77 bitrate= -0.0kbits/s dup=45 drop=0 speed=N/A
[libx264 @ 0x7f9e64811600] frame I:1 Avg QP:16.69 size: 56001
[libx264 @ 0x7f9e64811600] frame P:33 Avg QP:19.46 size: 9705
[libx264 @ 0x7f9e64811600] frame B:95 Avg QP:19.23 size: 662
[libx264 @ 0x7f9e64811600] consecutive B-frames: 0.8% 0.0% 4.6% 94.7%
[libx264 @ 0x7f9e64811600] mb I I16..4: 46.7% 36.4% 16.9%
[libx264 @ 0x7f9e64811600] mb P I16..4: 4.0% 9.4% 0.5% P16..4: 6.5% 1.2% 0.6% 0.0% 0.0% skip:77.8%
[libx264 @ 0x7f9e64811600] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 6.0% 0.1% 0.0% direct: 0.7% skip:93.0% L0:44.7% L1:54.8% BI: 0.4%
[libx264 @ 0x7f9e64811600] 8x8 transform intra:61.3% inter:37.9%
[libx264 @ 0x7f9e64811600] coded y,uvDC,uvAC intra: 8.6% 3.3% 1.3% inter: 0.9% 0.9% 0.1%
[libx264 @ 0x7f9e64811600] i16 v,h,dc,p: 41% 52% 6% 1%
[libx264 @ 0x7f9e64811600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 42% 16% 41% 0% 0% 0% 0% 0% 0%
[libx264 @ 0x7f9e64811600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 40% 17% 2% 2% 2% 2% 1% 3%
[libx264 @ 0x7f9e64811600] i8c dc,h,v,p: 88% 8% 3% 0%
[libx264 @ 0x7f9e64811600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f9e64811600] ref P L0: 75.5% 13.1% 9.1% 2.3%
[libx264 @ 0x7f9e64811600] ref B L0: 82.1% 16.4% 1.5%
[libx264 @ 0x7f9e64811600] ref B L1: 97.0% 3.0%
[libx264 @ 0x7f9e64811600] kb/s:816.97
Conversion failed!




I don't have deeper experience with ffmpeg conversions and codecs. It seems to me that this is a frames related problem. Do you have a clue why does it fail ? What options should I use in ffmpeg command to solve this ? Thanks for any help.