
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (86)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
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
Sur d’autres sites (5784)
-
Build Opencv3.1 with ffmpeg
10 mai 2018, par batumanI tried to build Opencv3.1 at Ubuntu16.04 with ffmpeg.
I follow the instructions how to install ffmpeg at here.According to this discussion ,I checked.
>> mediainfo ~/Desktop/grb_2.mp4
General
Complete name : /home/nyan/Desktop/grb_2.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 445 KiB
Duration : 27s 862ms
Overall bit rate : 131 Kbps
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
Writing application : Lavf57.66.105
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 27s 862ms
Bit rate : 128 Kbps
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Original display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.012
Stream size : 435 KiB (98%)
Writing library : x264 core 148
Encoding settings : 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=12 / lookahead_threads=2 / 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
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
ffmpeg -codecs | grep -i avc
ffmpeg 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
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m h264_vaapi )
D.A.L. avc On2 Audio for Video Codec (decoders: on2avc )So my ffmpeg installation is ok.
When I cmake to my Opencv, I have set up to ffmpeg as
But when I make to compile, I have error as
make[2]: *** No rule to make target '/home/nyan/ffmpeg_build/lib/libavresample.a', needed by 'lib/libopencv_videoio.so.3.1.0'. Stop.
CMakeFiles/Makefile2:8709: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2How can I fix the problem ?
I install libavresample manually and
sudo apt-get install libavresample-dev
[sudo] password for nyan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libavresample-dev is already the newest version (7:2.8.14-0ubuntu0.16.04.1).It is newest version.
EDIT:
Actually libavresample at ffmpeg is deprecated already.
So I tried to install Opencv3.4.1 higher version.
Compile, build and installation are fine.
ButVideoCapture cap(0);
does not read from the device.
So I checked ffmpeg at Opencv3.4.1 installation aspython -c "import cv2; print(cv2.getBuildInformation())" | grep -i ffmpeg
FFMMPEG IS NO. So build with ffmpeg is not successful even though there was no error at build for Opencv3.4.1.
-
FFMPEG- Streaming Stops after few seconds
25 mars 2019, par Manjot Singh KalsiHi there dear community
This is the thing that I am dealing with, since last few days. After thorough search in the ffmpeg community, I was unable to find the solution. I am unable to Stream local flv, to facebook
rtmp
server.I am running the following command to stream my local flv video to the
rtmp
server of Facebook for Live-Streaming of my local File.```ffmpeg -re -i SampleM.flv -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 426x240 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "rtmp://live-api.facebook.com:80/rtmp/my_key"```
It has been a misfortune-situation that even after reading
ffmpeg
documentation, I have been unable to find the issue that is leading me to this situation as follows.I am still missing something that i need to know.
Following is the log to the execution of the above command.
```ffmpeg version N-91024-g293a6e8332 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.100 / 56. 18.100
libavcodec 58. 19.101 / 58. 19.101
libavformat 58. 13.102 / 58. 13.102
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
Input #0, flv, from '.\video.flv':
Metadata:
audiodelay : 0
canSeekToEnd : 1
creationdate : Fri Feb 03 11:52:46 2006
:
Duration: 00:00:16.92, start: 0.000000, bitrate: 316 kb/s
Stream #0:0: Audio: mp3, 22050 Hz, stereo, fltp, 40 kb/s
Stream #0:1: Video: vp6f, 1 reference frame, yuv420p, 360x288 (368x288), 266 kb/s, 25 fps, 25 tbr, 1k tbn
Stream mapping:
Stream #0:1 -> #0:0 (vp6f (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[graph_1_in_0_0 @ 0000020c0bcc4200] tb:1/22050 samplefmt:fltp samplerate:22050 chlayout:0x3
[format_out_0_1 @ 0000020c0bca2cc0] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_resampler_0 @ 0000020c0bca5140] ch:2 chl:stereo fmt:fltp r:22050Hz -> ch:2 chl:stereo fmt:fltp r:44100Hz
[graph 0 input from stream 0:1 @ 0000020c0c4f4600] w:360 h:288 pixfmt:yuv420p tb:1/1000 fr:25/1 sar:0/1 sws_param:flags=2
[scaler_out_0_0 @ 0000020c0c4f73c0] w:426 h:240 flags:'bicubic' interl:0
[scaler_out_0_0 @ 0000020c0c4f73c0] w:360 h:288 fmt:yuv420p sar:0/1 -> w:426 h:240 fmt:yuv420p sar:0/1 flags:0x4
[libx264 @ 0000020c0bc80600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000020c0bc80600] profile Constrained Baseline, level 3.0
[libx264 @ 0000020c0bc80600] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 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=7 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=3 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=abr mbtree=1 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1500 vbv_bufsize=6000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp://live-api.facebook.com:80/rtmp/my key:
Metadata:
audiodelay : 0
canSeekToEnd : 1
creationdate : Fri Feb 03 11:52:46 2006
:
encoder : Lavf58.13.102
Stream #0:0: Video: h264 (libx264), 1 reference frame ([7][0][0][0] / 0x0007), yuv420p, 426x240, q=-1--1, 400 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc58.19.101 libx264
Side data:
cpb: bitrate max/min/avg: 1500000/0/400000 buffer size: 6000000 vbv_delay: -1
Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, fltp, delay 1105, 128 kb/s
Metadata:
encoder : Lavc58.19.101 libmp3lame
No more output streams to write to, finishing.e=00:00:16.51 bitrate= 533.3kbits/s speed=0.992x
[flv @ 0000020c0bc97fc0] Failed to update header with correct duration.
[flv @ 0000020c0bc97fc0] Failed to update header with correct filesize.
frame= 424 fps= 25 q=-1.0 Lsize= 1153kB time=00:00:16.95 bitrate= 557.1kbits/s speed=0.997x
video:869kB audio:265kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.666647%
Input file #0 (.\video.flv):
Input stream #0:0 (audio): 649 packets read (84767 bytes); 649 frames decoded (373824 samples);
Input stream #0:1 (video): 424 packets read (566376 bytes); 424 frames decoded;
Total: 1073 packets (651143 bytes) demuxed
Output file #0 (rtmp://live-api.facebook.com:80/rtmp/my key):
Output stream #0:0 (video): 424 frames encoded; 424 packets muxed (889641 bytes);
Output stream #0:1 (audio): 649 frames encoded (747648 samples); 650 packets muxed (271673 bytes);
Total: 1074 packets (1161314 bytes) muxed
[libx264 @ 0000020c0bc80600] frame I:18 Avg QP:27.75 size: 7001
[libx264 @ 0000020c0bc80600] frame P:406 Avg QP:32.67 size: 1879
[libx264 @ 0000020c0bc80600] mb I I16..4: 39.3% 0.0% 60.7%
[libx264 @ 0000020c0bc80600] mb P I16..4: 8.3% 0.0% 2.3% P16..4: 42.2% 16.2% 4.4% 0.0% 0.0% skip:26.6%
[libx264 @ 0000020c0bc80600] final ratefactor: 28.61
[libx264 @ 0000020c0bc80600] coded y,uvDC,uvAC intra: 40.2% 33.7% 9.2% inter: 23.8% 7.5% 0.2%
[libx264 @ 0000020c0bc80600] i16 v,h,dc,p: 24% 50% 20% 6%
[libx264 @ 0000020c0bc80600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 34% 18% 5% 5% 4% 8% 4% 8%
[libx264 @ 0000020c0bc80600] i8c dc,h,v,p: 67% 24% 7% 2%
[libx264 @ 0000020c0bc80600] kb/s:418.33```This Image shows that The stream was alive few Few Seconds on Facebook
```[flv @ 0000020c0bc97fc0] Failed to update header with correct duration.
[flv @ 0000020c0bc97fc0] Failed to update header with correct filesize.```Please correct me, the above error listed in the log, seems to be the main cause that the video stops streaming after few seconds. I’ve checked for the latency issues, But they won’t help anyway.
Please Help me to tackle this issue. I’ll be very much thankful. :’)
Streaming ends even earlier, when I use Google compute engine, instead my own PC as streaming service.
-
ffmpeg - duration usage in input text file
12 mai 2018, par VoicuI am trying to use ffmpeg to concatenate video segments with some black screen. To do that I’ve first generated a blank 10-second video (no audio track) with :
$ ffmpeg -f lavfi -i color=black:s=320x240:r=1 -f lavfi -i anullsrc -t 10 -vcodec libvpx -an blank.mkv
I then created the simplest possible scenario within input.txt file (contents below) in order to have three seconds of black screen followed by some video (no audio track) :
file 'blank.mkv'
duration 3
file 'video_example.mkv'And, finally, ran the following ffmpeg command to concat the contents of that input file :
$ ffmpeg -f concat -i input.txt -codec:v copy -codec:a copy output.mkv
The issue that I have is that the
duration 3
is not considered, so the final video still has ten seconds of black frames (instead of three) followed by my video. And also "Non-monotonous DTS in output stream 0:0 ..." message is shown when usingduration x
in the file. If I remove duration the warnings are gone and getting the 10-second black screen first output as well.Full output of the ffmpeg concat command :
$ ffmpeg -hide_banner -f concat -i input.txt -codec:v copy -codec:a copy output.mkv
Input #0, concat, from 'input.txt':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: vp8, yuv420p(progressive), 320x240, SAR 1:1 DAR 4:3, 1 fps, 1 tbr, 1k tbn, 1k tbc
Metadata:
ENCODER : Lavc57.107.100 libvpx
DURATION : 00:00:10.000000000
File 'output.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to 'output.mkv':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: vp8 (VP80 / 0x30385056), yuv420p(progressive), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 1 fps, 1 tbr, 1k tbn, 1k tbc
Metadata:
ENCODER : Lavc57.107.100 libvpx
DURATION : 00:00:10.000000000
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[concat @ 000000000031a440] DTS 3000 < 9000 out of order
[matroska @ 0000000000328420] Non-monotonous DTS in output stream 0:0; previous: 9000, current: 3000; changing to 9000. This may result in incorrect timestamps in the output file.
[matroska @ 0000000000328420] Non-monotonous DTS in output stream 0:0; previous: 9000, current: 4001; changing to 9000. This may result in incorrect timestamps in the output file.
[matroska @ 0000000000328420] Non-monotonous DTS in output stream 0:0; previous: 9000, current: 4998; changing to 9000. This may result in incorrect timestamps in the output file.
[matroska @ 0000000000328420] Non-monotonous DTS in output stream 0:0; previous: 9000, current: 6004; changing to 9000. This may result in incorrect timestamps in the output file.
[matroska @ 0000000000328420] Non-monotonous DTS in output stream 0:0; previous: 9000, current: 7002; changing to 9000. This may result in incorrect timestamps in the output file.
[matroska @ 0000000000328420] Non-monotonous DTS in output stream 0:0; previous: 9000, current: 8005; changing to 9000. This may result in incorrect timestamps in the output file.
frame= 5794 fps=0.0 q=-1.0 Lsize= 7109kB time=01:37:09.70 bitrate= 10.0kbits/s speed=5.16e+004x
video:7043kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.926229%Any idea what am I doing wrong ? The warning seems to hint towards the issue here.
Other possibly useful info :
$ ffprobe -hide_banner blank.mkv
Input #0, matroska,webm, from 'blank.mkv':
Metadata:
ENCODER : Lavf57.83.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 1 kb/s
Stream #0:0: Video: vp8, yuv420p(progressive), 320x240, SAR 1:1 DAR 4:3, 1 fps, 1 tbr, 1k tbn, 1k tbc (default)
Metadata:
ENCODER : Lavc57.107.100 libvpx
DURATION : 00:00:10.000000000
$ ffprobe -hide_banner video_example.mkv
Input #0, matroska,webm, from 'video_example.mkv':
Metadata:
encoder : GStreamer matroskamux version 1.8.1.1
creation_time : 2018-05-04T17:57:04.000000Z
Duration: 01:37:08.70, start: 15434.269000, bitrate: 9 kb/s
Stream #0:0(eng): Video: vp8, yuv420p(progressive), 320x240, SAR 1:1 DAR 4:3, 1 fps, 1 tbr, 1k tbn, 1k tbc (default)
Metadata:
title : Video
$ ffmpeg -v
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)