
Recherche avancée
Autres articles (36)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (6710)
-
FFMPEG failing to convert mov to flv
3 mai 2018, par scripter78FFMPEG issue that I am not familiar with. seems to only happen with this particular file. Anyone by any chance can take a look at this long out put and provide any feedback on what might actually be causing this ?
ffmpeg_18.exe -i "E:\TESTFILES\115637.mov" -vcodec libx264 -b:v 700k -s 720x480 -r 29.97 -pix_fmt yuv420p -vf yadif -aspect 4:3 -acodec libvo_aacenc -b:a 96k -ar 44100 -f mp4 -y "E:\TESTFILES\test\115637.flv"
ffmpeg version N-39877-g4fa706a Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 16 2012 14:53:47 with gcc 4.6.3
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-li
bnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 46.100 / 51. 46.100
libavcodec 54. 14.101 / 54. 14.101
libavformat 54. 3.100 / 54. 3.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 70.100 / 2. 70.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 11.100 / 0. 11.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\TESTFILES\115637.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2018-05-03 20:48:28
Duration: 00:00:30.03, start: 0.000000, bitrate: 154663 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080, 151585 kb/s, SAR 1920:1920 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
Metadata:
creation_time : 2018-05-03 20:48:28
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, 4 channels, s16, 3072 kb/s
Metadata:
creation_time : 2018-05-03 20:48:28
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2018-05-03 20:51:29
handler_name : Apple Alias Data Handler
timecode : 00:00:00;00
[buffer @ 035c33a0] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1920/1920 sws_param:flags=2
[yadif @ 01e7caa0] mode:0 parity:-1 auto_enable:0
[scale @ 01e7c6a0] w:1920 h:1080 fmt:yuv420p sar:1920/1920 -> w:720 h:480 fmt:yuv420p sar:32/27 flags:0x4
[libx264 @ 035b8c40] using SAR=8/9
[libx264 @ 035b8c40] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX FMA3
[libx264 @ 035b8c40] profile High, level 3.0
[libx264 @ 035b8c40] 264 - core 120 r2164 da19765 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - 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=24 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=abr mbtree=1 bitra
te=700 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[libvo_aacenc @ 01e7bae0] Unable to set encoding parameters
Output #0, mp4, to 'E:\TESTFILES\test\115637.flv':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2018-05-03 20:48:28
Stream #0:0(eng): Video: h264, yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=-1--1, 700 kb/s, 90k tbn, 29.97 tbc
Metadata:
creation_time : 2018-05-03 20:48:28
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Audio: aac, 44100 Hz, 4 channels, s16, 96 kb/s
Metadata:
creation_time : 2018-05-03 20:48:28
handler_name : Apple Alias Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (pcm_s16le -> libvo_aacenc)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height -
Can't read video using VideoCapture in Opencv
8 mai 2018, par batumanI have installed
Opencv 2.4.13.6
at my Ubuntu 16.04 OS.
I haveffmpeg
and duringOpencv
installation I madeWITH_FFMPEG ON
.
My ffmpeg is working.
If I type ffmpeg at command window, I haveffmpeg version N-90982-gb995ec0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --prefix=/home/nyan/ffmpeg_build --enable-shared --extra-cflags=-I/home/nyan/ffmpeg_build/include --extra-ldflags=-L/home/nyan/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/nyan/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 56. 18.100 / 56. 18.100
libavcodec 58. 19.100 / 58. 19.100
libavformat 58. 13.101 / 58. 13.101
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 21.100 / 7. 21.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...Then I have put ffmpeg paths to
.bashrc
asexport PATH=/home/bin${PATH:+:${PATH}}
export PATH=/home/ffmpeg_build${PATH:+:${PATH}}
export PATH=/home/ffmpeg_build/include${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/home/ffmpeg_build/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}In my Opencv libraries I have libopencv_video.so. So video input/output should be fine.
My following program gives me
"can't read video"
. What could be the reason ?I tried
VideoCapture cap(0);
gives me same error. What is wrong ?#include <opencv2></opencv2>opencv.hpp>
using namespace cv;
using namespace std;
int main(void){
VideoCapture cap("IMG_5715.MOV"); // open the default camera
if(!cap.isOpened()) // check if we succeeded
{
cout << "can't read video"<< endl;
return -1;
}
while(1){
Mat frame;
// Capture frame-by-frame
cap >> frame;
imshow( "Frame", frame );
waitKey(1);
// If the frame is empty, break immediately
if (frame.empty())
break;
}
cap.release();
return 0;
} -
FFMPEG : Loop multiple videos indefinitely
4 mai 2018, par stevendesuI’ve got an interesting setup. I have four videos which are all identical in duration, identical frame rate, and have identical PTS timestamps. I wish to stream these four videos to an RTMP server but keep them synchronized so that someone switching between the streams will not jump forward or back in time, but instead pick up right where they left off.
Here’s the command I’m currently using :
ffmpeg \
-re -stream_loop -1 -fflags +genpts -i 01.mp4 \
-re -stream_loop -1 -fflags +genpts -i 02.mp4 \
-re -stream_loop -1 -fflags +genpts -i 03.mp4 \
-re -stream_loop -1 -fflags +genpts -i 04.mp4 \
-map 0:v -map 0:a \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/01 \
-map 1:v -map 1:a \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/02 \
-map 2:v -map 2:a \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/03 \
-map 3:v -map 3:a \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/04This command properly synchronizes the streams and broadcasts all four, however the moment the video ends so does the stream. Due to the
-stream_loop -1
I would expect the video to keep looping indefinitely. This is the output tostdout
when the stream dies :[flv @ 0x2392d40] Failed to update header with correct duration.
[flv @ 0x2392d40] Failed to update header with correct filesize.
[flv @ 0x229b980] Failed to update header with correct duration.
[flv @ 0x229b980] Failed to update header with correct filesize.
[flv @ 0x22f3bc0] Failed to update header with correct duration.
[flv @ 0x22f3bc0] Failed to update header with correct filesize.
[flv @ 0x23a4240] Failed to update header with correct duration.
[flv @ 0x23a4240] Failed to update header with correct filesize.
[libx264 @ 0x25ebd00] frame I:236 Avg QP:29.17 size: 20892
[libx264 @ 0x25ebd00] frame P:5412 Avg QP:32.33 size: 1892
[libx264 @ 0x25ebd00] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x25ebd00] mb P I16..4: 0.2% 0.0% 0.0% P16..4: 18.5% 0.0% 0.0% 0.0% 0.0% skip:81.3%
[libx264 @ 0x25ebd00] final ratefactor: 31.62
[libx264 @ 0x25ebd00] coded y,uvDC,uvAC intra: 68.8% 62.8% 34.6% inter: 8.8% 1.8% 0.0%
[libx264 @ 0x25ebd00] i16 v,h,dc,p: 38% 25% 19% 18%
[libx264 @ 0x25ebd00] i8c dc,h,v,p: 40% 22% 27% 11%
[libx264 @ 0x25ebd00] kb/s:515.11
[libspeex @ 0x2537580] 1 frames left in the queue on closing
[libx264 @ 0x2531d00] frame I:236 Avg QP:31.85 size: 15843
[libx264 @ 0x2531d00] frame P:5412 Avg QP:34.95 size: 2086
[libx264 @ 0x2531d00] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x2531d00] mb P I16..4: 2.8% 0.0% 0.0% P16..4: 37.8% 0.0% 0.0% 0.0% 0.0% skip:59.4%
[libx264 @ 0x2531d00] final ratefactor: 32.38
[libx264 @ 0x2531d00] coded y,uvDC,uvAC intra: 48.4% 40.8% 13.5% inter: 12.1% 4.0% 0.0%
[libx264 @ 0x2531d00] i16 v,h,dc,p: 41% 21% 26% 13%
[libx264 @ 0x2531d00] i8c dc,h,v,p: 48% 20% 24% 8%
[libx264 @ 0x2531d00] kb/s:510.33
[libspeex @ 0x2533080] 1 frames left in the queue on closing
[libx264 @ 0x22da600] frame I:236 Avg QP:26.11 size: 13705
[libx264 @ 0x22da600] frame P:5412 Avg QP:29.17 size: 2185
[libx264 @ 0x22da600] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x22da600] mb P I16..4: 4.5% 0.0% 0.0% P16..4: 35.2% 0.0% 0.0% 0.0% 0.0% skip:60.3%
[libx264 @ 0x22da600] final ratefactor: 28.44
[libx264 @ 0x22da600] coded y,uvDC,uvAC intra: 37.1% 40.1% 10.4% inter: 12.3% 6.2% 0.1%
[libx264 @ 0x22da600] i16 v,h,dc,p: 40% 21% 22% 17%
[libx264 @ 0x22da600] i8c dc,h,v,p: 43% 18% 28% 11%
[libx264 @ 0x22da600] kb/s:511.43
[libspeex @ 0x22db080] 1 frames left in the queue on closing
[libx264 @ 0x22d7a00] frame I:236 Avg QP:30.31 size: 13811
[libx264 @ 0x22d7a00] frame P:5412 Avg QP:33.28 size: 2209
[libx264 @ 0x22d7a00] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x22d7a00] mb P I16..4: 5.4% 0.0% 0.0% P16..4: 37.4% 0.0% 0.0% 0.0% 0.0% skip:57.2%
[libx264 @ 0x22d7a00] final ratefactor: 31.52
[libx264 @ 0x22d7a00] coded y,uvDC,uvAC intra: 37.9% 36.7% 9.5% inter: 11.4% 5.0% 0.1%
[libx264 @ 0x22d7a00] i16 v,h,dc,p: 41% 23% 21% 16%
[libx264 @ 0x22d7a00] i8c dc,h,v,p: 45% 19% 27% 9%
[libx264 @ 0x22d7a00] kb/s:516.78
[libspeex @ 0x22d8d80] 1 frames left in the queue on closingMy FFMPEG version :
$ ffmpeg -version
ffmpeg version N-90065-g8a8d0b3 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.5) 20160609
configuration: --prefix=/home/sbarnett/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/sbarnett/ffmpeg_build/include --extra-ldflags=-L/home/sbarnett/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/sbarnett/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libspeex --enable-nonfree
libavutil 56. 7.101 / 56. 7.101
libavcodec 58. 11.101 / 58. 11.101
libavformat 58. 9.100 / 58. 9.100
libavdevice 58. 1.100 / 58. 1.100
libavfilter 7. 12.100 / 7. 12.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100How do I get the video to loop indefinitely ? Why is
-stream_loop -1
not working ?Update (Edited with new error)
Following @Gyan’s advice, I attempted to use
filter_complex
with the movie filter, however I may be doing it incorrectly :ffmpeg \
-stream_loop -1 \
-re -i 01.mp4 \
-re -i 02.mp4 \
-re -i 03.mp4 \
-re -i 04.mp4 \
-filter_complex \
"movie=01.mp4:loop=0[v1];[v1]setpts=N/FRAME_RATE/TB[v1];
amovie=01.mp4:loop=0[a1];[a1]asetpts=N/SR/TB[a1];
movie=02.mp4:loop=0[v2];[v2]setpts=N/FRAME_RATE/TB[v2];
amovie=02.mp4:loop=0[a2];[a2]asetpts=N/SR/TB[a2];
movie=03.mp4:loop=0[v3];[v3]setpts=N/FRAME_RATE/TB[v3];
amovie=03.mp4:loop=0[a3];[a3]asetpts=N/SR/TB[a3];
movie=04.mp4:loop=0[v4];[v4]setpts=N/FRAME_RATE/TB[v4];
amovie=04.mp4:loop=0[a4];[a4]asetpts=N/SR/TB[a4]" \
-map "[v1]" -map "[a1]" \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/01 \
-map "[v2]" -map "[a2]" \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/02 \
-map "[v3]" -map "[a3]" \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/03 \
-map "[v4]" -map "[a4]" \
-c:a speex -ar 16000 -ac 1 \
-c:v libx264 -preset ultrafast \
-b:v 500k -b:a 32k \
-f flv rtmp://output/04This threw the following error :
[libspeex @ 0x23f4d80] nb_samples (325) != frame_size (320) (avcodec_encode_audio2)