
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (46)
-
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 (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)
Sur d’autres sites (7379)
-
Bewildering issue - FFmpeg segment filter desyncs video
14 mai 2018, par r_jeiI need to segment a large (72GB) Prores video file and merge the segments to get a file identical to the original.
./ffmpeg -i video.mov -codec copy -f segment -segment_time 300 -segment_list list.ffcat -reset_timestamps 1 -v error chunk_%d.mov
Unfortunately the segments that come from running this command get out of sync after a few seconds of playback with Quicktime Player. Interestingly, seeking, rewinding or fast forwarding appears to resync the video correctly for at least a few seconds.
The following warning appears whenever a new segment is written :
[segment @ 0x7f87ae001200] Opening 'chunk_0.mov' for writing
[mov @ 0x7f87ad807200] Valid timecode frame rate must be specified. Minimum value is 1Yet, setting the framerate with
-r 24
doesn’t help.Some potentially relevant metadata :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'A004_04121423_C001.mov':
Duration: 00:13:31.25, start: 0.000000, bitrate: 710117 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 3840x2160, 707415 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc (default)
Metadata:
creation_time : 2018-04-12T20:23:16.000000Z
handler_name : ?Apple Alias Data Handler
timecode : 14:23:16:02
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2018-04-12T20:23:16.000000Z
handler_name : ?Apple Alias Data Handler
timecode : 14:23:16:02
Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2018-04-12T20:23:16.000000Z
handler_name : ?Apple Alias Data Handler
timecode : 14:23:16:02
Output #0, segment, to 'chunk_%d.mov':
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 707415 kb/s, 24 fps, 24 tbr, 12288 tbn, 24 tbc (default)
Metadata:
creation_time : 2018-04-12T20:23:16.000000Z
handler_name : ?Apple Alias Data Handler
timecode : 14:23:16:02
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2018-04-12T20:23:16.000000Z
handler_name : ?Apple Alias Data Handler
timecode : 14:23:16:02
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)I’m on OS X.
Thanks so much for your time and help on this issue ! I certainly hope I’m not missing something obvious :)
UPDATE (May 10) : Comparing the original video file with the segments, I’ve found some interesting differences. Adobe Premiere reports that the original video has the following properties :
QuickTime Details:
Movie contains 1 video track(s), 1 audio track(s), 0 closed caption track(s), **and 1 timecode track(s).**
Video:
There are 19470 frames with a **duration of 1/24th.**
Video track 1:
Duration is **0:13:31:06**
Video data block #1:
Frame Size = 3840 x 2160
Compressor =
**Quality = Most (-2623.00)
Temporal = Most (1.00)**
Timecode data block #1:
Start Time = 14:23:16:02
Reel name =On the other hand, when examining the video resulting from stitching together the segments, we find the following :
QuickTime Details:
Movie contains 1 video track(s), 1 audio track(s), 0 closed caption track(s), **and 0 timecode track(s).**
Video:
There are 19470 frames with a **duration of 41/1000ths.**
Video track 1:
Duration is **0:01:06:00**
Video data block #1:
Frame Size = 3840 x 2160
Compressor =
**Quality = Normal (3.00)
Temporal = Normal (3.00)** -
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)
-
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;
}