
Recherche avancée
Autres articles (103)
-
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 (...) -
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 (4458)
-
ffmpeg mp4 fade output appears faulty [duplicate]
19 septembre 2015, par DaveTheRaveThis question already has an answer here :
I can add a fade in and out to an existing MP4 with the following command and it works perfectly (from and to black) - it plays in all browsers and a range of Android devices
ffmpeg -i phpF21_i_v.mp4 -vf "fade=in:1:30, fade=out:st=4:d=1.0" -y phpF21_i_final.mp4 >phpF21_i_f.log 2>&1
But if I try to fade from and to white, the following command doesn’t work - it only plays in Chrome - no other browser - not on Android
ffmpeg -i phpF21_i_v.mp4 -vf "fade=in:1:30:color=white, fade=out:st=4:d=1.0:color=white" -y phpF21_i_final.mp4 >phpF21_i_f.log 2>&1
Am I missing something obvious ?
Cheers
Dave
The ffmpeg log when if fails :
`
ffmpeg version N-72298-g02cf59f Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 40.100 / 56. 40.100
libavformat 56. 33.101 / 56. 33.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'phpF21_i_v.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.33.101
Duration: 00:00:05.00, start: 0.000000, bitrate: 910 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 906 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 00000000055144c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 00000000055144c0] profile High 4:4:4 Predictive, level 4.0, 4:4:4 8-bit
[libx264 @ 00000000055144c0] 264 - core 146 r2538 121396c - 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=4 threads=9 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=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
Output #0, mp4, to 'phpF21_i_final.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.33.101
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 1920x1080, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc56.40.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 16 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
frame= 35 fps= 34 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
frame= 47 fps= 25 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
frame= 55 fps= 23 q=28.0 size= 1kB time=00:00:00.00 bitrate=N/A
frame= 64 fps= 21 q=28.0 size= 154kB time=00:00:00.36 bitrate=3502.7kbits/s
frame= 74 fps= 21 q=28.0 size= 427kB time=00:00:00.76 bitrate=4600.5kbits/s
frame= 87 fps= 21 q=28.0 size= 746kB time=00:00:01.28 bitrate=4776.4kbits/s
frame= 107 fps= 23 q=28.0 size= 814kB time=00:00:02.08 bitrate=3206.4kbits/s
frame= 125 fps= 24 q=28.0 size= 836kB time=00:00:02.80 bitrate=2446.0kbits/s
frame= 125 fps= 21 q=-1.0 Lsize= 876kB time=00:00:04.92 bitrate=1458.0kbits/s
video:873kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.253249%
[libx264 @ 00000000055144c0] frame I:2 Avg QP:15.56 size: 9114
[libx264 @ 00000000055144c0] frame P:39 Avg QP:18.53 size: 21193
[libx264 @ 00000000055144c0] frame B:84 Avg QP:17.81 size: 582
[libx264 @ 00000000055144c0] consecutive B-frames: 8.8% 4.8% 0.0% 86.4%
[libx264 @ 00000000055144c0] mb I I16..4: 17.0% 82.3% 0.7%
[libx264 @ 00000000055144c0] mb P I16..4: 2.8% 4.7% 0.2% P16..4: 17.6% 2.9% 2.7% 0.0% 0.0% skip:69.1%
[libx264 @ 00000000055144c0] mb B I16..4: 0.2% 0.2% 0.0% B16..8: 5.1% 0.0% 0.0% direct: 0.0% skip:94.4% L0:15.6% L1:54.1% BI:30.3%
[libx264 @ 00000000055144c0] 8x8 transform intra:68.2% inter:64.0%
[libx264 @ 00000000055144c0] coded y,u,v intra: 18.5% 6.4% 6.4% inter: 3.7% 1.6% 1.7%
[libx264 @ 00000000055144c0] i16 v,h,dc,p: 20% 45% 7% 28%
[libx264 @ 00000000055144c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 19% 49% 2% 2% 2% 3% 1% 3%
[libx264 @ 00000000055144c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 27% 33% 4% 6% 3% 6% 3% 4%
[libx264 @ 00000000055144c0] Weighted P-Frames: Y:53.8% UV:53.8%
[libx264 @ 00000000055144c0] ref P L0: 72.5% 14.0% 8.7% 4.8% 0.0%
[libx264 @ 00000000055144c0] ref B L0: 39.9% 48.3% 11.7%
[libx264 @ 00000000055144c0] ref B L1: 95.8% 4.2%
[libx264 @ 00000000055144c0] kb/s:1429.90`
-
Restreaming hls stream to rtmp stream using ffmpeg
7 décembre 2018, par dhruv shahI am trying to re-stream an hls stream to rtmp stream using ffmpeg :
as example :
ffmpeg -loglevel debug -re -i "https://hddn01.skylinewebcams.com/live.m3u8?a=c6kekc4h116t1m5jbtei273bq0" -bufsize 4000k -preset ultrafast -vcodec libx264 -tune zerolatency -b:v 900k -an -f flv rtmp://127.0.0.1/live/stream.flv
The stream is available on the website :
https://www.skylinewebcams.com/en/webcam/malta/malta/traffic/traffic-cam2.htmlThe issue is that input
fps
value is very low andq
value is very high or -1 most of the times.Please take a look at the following log :
ffmpeg version 3.4.2-1~16.04.york0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0.2' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avi
synth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --e
nable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --e
nable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi
--enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[hls,applehttp @ 0x5649bd7463e0] Opening 'https://hddn01.skylinewebcams.com/03042101ANC5-1544185331502.ts' for reading
[hls,applehttp @ 0x5649bd7463e0] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, hls,applehttp, from 'https://hddn01.skylinewebcams.com/live.m3u8?a=c6kekc4h116t1m5jbtei273bq0':
Duration: N/A, start: 22431.033000, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x1024, 12 fps, 12 tbr, 90k tbn, 180k tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp
Metadata:
variant_bitrate : 0
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x5649bdc1ba80] VBV maxrate unspecified, assuming CBR
[libx264 @ 0x5649bdc1ba80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x5649bdc1ba80] profile Constrained Baseline, level 3.2
[libx264 @ 0x5649bdc1ba80] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=12 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=cbr mbtree=0 bitrate=900 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=900 vbv_bufsize=4000 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://127.0.0.1/live/dhruv.flv':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x1024, q=-1--1, 900 kb/s, 12 fps, 1k tbn, 12 tbc
Metadata:
variant_bitrate : 0
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/900000 buffer size: 4000000 vbv_delay: -1
[hls,applehttp @ 0x5649bd7463e0] Opening 'https://hddn01.skylinewebcams.com/03042101ANC5-1544185339480.ts' for reading
[hls,applehttp @ 0x5649bd7463e0] Opening 'https://hddn01.skylinewebcams.com/03042101ANC5-1544185347525.ts' for reading
[hls,applehttp @ 0x5649bd7463e0] Opening 'https://hddn01.skylinewebcams.com/03042101ANC5-1544185355483.ts' for reading
[hls,applehttp @ 0x5649bd7463e0] Opening 'https://hddn01.skylinewebcams.com/03042101ANC5-1544185363466.ts' for reading
[hls,applehttp @ 0x5649bd7463e0] Opening 'https://hddn01.skylinewebcams.com/03042101ANC5-1544185371496.ts' for reading
[flv @ 0x5649bdc1aae0] Failed to update header with correct duration.939.0kbits/s speed=0.991x
[flv @ 0x5649bdc1aae0] Failed to update header with correct filesize.
frame= 552 fps= 12 q=33.0 Lsize= 5261kB time=00:00:45.91 bitrate= 938.6kbits/s speed=0.992xDoes anyone know how to stream in real-time ?
-
Trying to add Watermark to Video FFMPEG
8 mai 2021, par Michael BouixI'm trying to add watermark to my video
When I upload some videos work fine, but some videos I get an error that retrieve the file with 0kb.
I don't know if its why the video is 4k... I have no idea
And I'm running another command to scale the video with the same file and work fine too, only when adding my watermark I get the error


This is the command :


$comando_arquivo_water = "/usr/bin/ffmpeg -nostdin -i ".$path_video." -i ".$path_logo." -filter_complex '[1][0]scale2ref=w=oh*mdar:h=ih*0.2[logo][video];[video][logo]overlay=(W-w)/2:(H-h)/2' -y ".$water_final_nome." > out.txt 2> err.txt";



And this is what I'm getting


ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/bamboostock/wp-content/uploads/2021/05/earth_-_18491-7.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf56.4.101
 Duration: 00:00:08.36, start: 0.000000, bitrate: 4698 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], 4698 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Input #1, png_pipe, from '/var/www/bamboostock/wp-content/uploads/2021/02/BAMBOO_LOGO_BRANCO.png':
 Duration: N/A, bitrate: N/A
 Stream #1:0: Video: png, rgba(pc), 1444x418 [SAR 2835:2835 DAR 38:11], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 (h264) -> scale2ref:ref (graph 0)
 Stream #1:0 (png) -> scale2ref:default (graph 0)
 overlay (graph 0) -> Stream #0:0 (libx264)
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
[libx264 @ 0x55efea5b3f00] using SAR=1/1
[libx264 @ 0x55efea5b3f00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55efea5b3f00] profile High, level 5.1
[libx264 @ 0x55efea5b3f00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=1 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=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
Output #0, mp4, to '/var/www/bamboostock/uploads_temp/watermark/WATERMARK_729483_1_0.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf57.83.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
 Metadata:
 encoder : Lavc57.107.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 encoder : Lavc57.107.100 aac
Past duration 0.663322 too large
Past duration 0.829155 too large
Past duration 0.994987 too large
frame= 8 fps=0.0 q=0.0 size= 0kB time=00:00:00.21 bitrate= 0.0kbits/s speed=0.396x 
frame= 16 fps= 14 q=0.0 size= 0kB time=00:00:00.53 bitrate= 0.0kbits/s dup=0 drop=1 speed=0.467x 
frame= 22 fps= 11 q=0.0 size= 0kB time=00:00:00.74 bitrate= 0.0kbits/s dup=0 drop=2 speed=0.362x 
frame= 23 fps=8.6 q=0.0 size= 0kB time=00:00:00.78 bitrate= 0.0kbits/s dup=0 drop=2 speed=0.295x 
frame= 25 fps=7.8 q=0.0 size= 0kB time=00:00:00.89 bitrate= 0.0kbits/s dup=0 drop=3 speed=0.278x 
frame= 27 fps=7.2 q=0.0 size= 0kB time=00:00:00.96 bitrate= 0.0kbits/s dup=0 drop=3 speed=0.255x 
frame= 30 fps=6.4 q=0.0 size= 0kB time=00:00:01.08 bitrate= 0.0kbits/s dup=0 drop=4 speed=0.233x 
Killed



What can I do ?