Recherche avancée

Médias (91)

Autres articles (62)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP 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 (7926)

  • Stream webcam using ffmpeg/avconv to RTMP libx264 doesn't work

    15 mars 2016, par Erez Posner

    i have been trying to stream my webcam to Ustream using RTMP.

    using the standard command works great :

    "avconv -f video4linux2 -r 25 -s 320x240 -i /dev/video0 -f flv rtmp ://host/pass"

    but i encoutner a 15 seconds latency !
    therefore i decided to compress the video using libx264.
    i downloaded it and confirmed it is installed properly.
    but when running this command :

    "avconv -f video4linux2 -r 25 -s 320x240 -i /dev/video0 -c:v libx264 -pix_fmt yuv420p-f flv rtmp ://host/pass"

    on ffmpeg i get "Illegal instruction"
    and under avconv it starts to stream but nothing is shown in Ustream channel.

    output from avconv command

    avconv version 9.14-6:9.14-1rpi1rpi1, Copyright (c) 2000-2014 the
    Libav developers
    built on Jul 22 2014 15:08:12 with gcc 4.6 (Debian 4.6.3-14+rpi1)
    [video4linux2 @ 0x709740] The driver changed the time per frame from 1/5 to 1/30
       [video4linux2 @ 0x709740] Estimating duration from bitrate, this may
       be inaccurate
       Input #0, video4linux2, from '/dev/video0':
         Duration: N/A, start: 5069.991764, bitrate: 36864 kb/s
           Stream #0.0: Video: rawvideo, yuyv422, 320x240, 36864 kb/s, 1000k    tbn, 30 tbc
       [libx264 @ 0x70a9e0] using cpu capabilities: none!
       [libx264 @ 0x70a9e0] profile High, level 1.2
       [libx264 @ 0x70a9e0] 264 - core 130 r2282 1db4621 - H.264/MPEG-4 AVC
       codec - Copyleft 2003-2013 - 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=5 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.25
       aq=1:1.00
       Output #0, flv, to
       'rtmp:host/pass:
         Metadata:
           encoder         : Lavf54.20.4
           Stream #0.0: Video: libx264, yuv420p, 320x240, q=-1--1, 1k tbn, 5 tbc
       Stream mapping:
         Stream #0:0 -> #0:0 (rawvideo -> libx264)
       Press ctrl-c to stop encoding
       frame=   44 fps=  3 q=23.0 size=      26kB time=0.20
       bitrate=1071.8kbits/s    bits/s

    what could be the problem ?
    thank you in advanced

  • Stream from MP4 file over RTSP with ffserver

    25 octobre 2019, par sirlion

    I’m trying to stream a mp4 file over RTSP using ffserver with no luck so far. I just want to stream directly from the file, without feeding from ffmpeg (no transcoding involved). But I’ve made it work with mpg video.

    Here is my ffserver config file :

    Port 8090
    BindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 500000
    CustomLog -
    NoDaemon

    RTSPPort 7654
    RTSPBindAddress 0.0.0.0

    <stream>
       Format rtp
       File "/home/g/video_streaming/sample3-mpeg2.mpg"
    </stream>
    <stream>
       Format rtp
       File "/home/g/video.mp4"
    </stream>

    When I launch ffserver, everything seems fine based on the log output :

    $ ./dev/ffmpeg/ffserver -f ffserver-sample.conf
    ffserver version N-45673-gd0c27e8 Copyright (c) 2000-2012 the FFmpeg developers
     built on Oct 18 2012 10:36:52 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
     configuration:
     libavutil      51. 76.100 / 51. 76.100
     libavcodec     54. 66.100 / 54. 66.100
     libavformat    54. 33.100 / 54. 33.100
     libavdevice    54.  3.100 / 54.  3.100
     libavfilter     3. 19.103 /  3. 19.103
     libswscale      2.  1.101 /  2.  1.101
     libswresample   0. 16.100 /  0. 16.100
    Thu Oct 18 11:54:22 2012 Opening file '/home/g/video.mp4'
    Thu Oct 18 11:54:22 2012 Opening file '/home/g/video.mp4'
    Thu Oct 18 11:54:23 2012 Opening file '/home/g/video_streaming/sample3-mpeg2.mpg'
    Thu Oct 18 11:54:23 2012 [mpeg @ 0x1dae3c0]max_analyze_duration 5000000 reached at 5005000
    Thu Oct 18 11:54:23 2012 Opening file '/home/g/video_streaming/sample3-mpeg2.mpg'
    Thu Oct 18 11:54:23 2012 [mpeg @ 0x1dae3c0]max_analyze_duration 5000000 reached at 5005000
    Thu Oct 18 11:54:23 2012 FFserver started.

    Finally, if I run ffplay in order to test the server, everything works fine for the mpg file, but not for the mp4 :

    $ ffplay rtsp://192.168.1.99:7654/test2-rtsp
    ffplay version N-45656-g916352f Copyright (c) 2003-2012 the FFmpeg developers
     built on Oct 17 2012 16:14:14 with gcc 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5.1)
     configuration:
     libavutil      51. 76.100 / 51. 76.100
     libavcodec     54. 66.100 / 54. 66.100
     libavformat    54. 33.100 / 54. 33.100
     libavdevice    54.  3.100 / 54.  3.100
     libavfilter     3. 19.103 /  3. 19.103
     libswscale      2.  1.101 /  2.  1.101
     libswresample   0. 16.100 /  0. 16.100
    rtsp://192.168.1.99:7654/test2-rtsp: Invalid data found when processing input

    Server's output:

    Thu Oct 18 11:57:51 2012 FFserver started.
    Thu Oct 18 11:58:01 2012 192.168.1.101 - - [DESCRIBE] "rtsp://192.168.1.99:7654/test2-rtsp RTSP/1.0" 200 167
    Segmentation fault (core dumped)

    I don’t really know what I could be missing. I’ve just read in the official doc that streaming from a file is kind of broken. Since I don’t really know if that’s up to date, I decided to give it a try here.

    Any help or suggestions ? Alternatives ?

  • ffmpeg filter complex maybe too long from my script

    8 novembre 2023, par iceget

    i am using ffmepg and filter complex to blend 2 png files for a exact time.&#xA;if i use a too long time (short commands working) then the output file has only 1kb and is not openable.

    &#xA;

    i have added here my code was is not working, can anybody helps me ?

    &#xA;

    i getting this back

    &#xA;

    code :

    &#xA;

    ffmpeg -loop 1 -t 0.2225 -i /tmp/a.png -loop 1 -t 0.2225 -i /tmp/b.png -s 640x480 -to 256 -c:v libx264 -pix_fmt yuv420p -filter_complex " \&#xA;[1:v][0:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b1v]; \&#xA;[0:v][1:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b2v]; \&#xA;[1:v][0:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b3v]; \&#xA;[0:v][1:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b4v]; \&#xA;[1:v][0:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b5v]; \&#xA;[0:v][1:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b6v]; \&#xA;[1:v][0:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b7v]; \&#xA;[0:v][1:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b8v]; \&#xA;[1:v][0:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b9v]; \&#xA;[0:v][1:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b10v]; \&#xA;[1:v][0:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b11v]; \&#xA;[0:v][1:v]blend=all_expr=&#x27;A*(if(gte(T,0.2225),1,T/0.2225))&#x2B;B*(1-(if(gte(T,0.2225),1,T/0.2225)))&#x27;[b12v]; \&#xA;...&#xA;[1:v][b988v][0:v][b989v][1:v][b990v][0:v][b991v][1:v][b992v][0:v][b993v][1:v][b994v][0:v][b995v][1:v][b996v][0:v][b997v][1:v][b998v][0:v][b999v][1:v][b1000v][0:v][b1001v][1:v][b1002v][0:v][b1003v][1:v][b1004v][0:v][b1005v][1:v][b1006v][0:v][b1007v][1:v][b1008v][0:v][b1009v][1:v][b1010v][0:v][b1011v][1:v][b1012v][0:v][b1013v][1:v][b1014v][0:v][b1015v][1:v][b1016v][0:v][b1017v][1:v][b1018v][0:v][b1019v][1:v][b1020v][0:v][b1021v][1:v][b1022v][0:v][b1023v][1:v][b1024v]&#xA;[0:v]concat=n=2049:v=1:a=0,format=yuv420p[v]" -map "[v]" /tmp/test.mp4&#xA;

    &#xA;

    the output is then this :

    &#xA;

    ...&#xA;  Stream #1:0 (png) -> concat:in2038:v0&#xA;  Stream #1:0 (png) -> concat:in2042:v0&#xA;  Stream #1:0 (png) -> concat:in2046:v0&#xA;  format -> Stream #0:0 (libx264)&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x563a0f537380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512&#xA;[libx264 @ 0x563a0f537380] profile High, level 3.0&#xA;[libx264 @ 0x563a0f537380] 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=6 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&#xA;Output #0, mp4, to &#x27;/tmp/test.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.20.100&#xA;    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 640x480, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.35.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;Get&#xF6;tet   3 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x&#xA;&#xA;

    &#xA;

    i create the filter complex by php with a for loop for creating the final syntax for ffmpeg.

    &#xA;

    getting at the end of the command (debug log) :

    &#xA;

    [auto_scaler_2044 @ 0x560f0db26c40] w:640 h:480 fmt:pal8 sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x2&#xA;[auto_scaler_2045 @ 0x560f144cf240] w:640 h:480 fmt:pal8 sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x2&#xA;[Parsed_blend_1022 @ 0x560f19f96d00] [framesync @ 0x560f19f96e08] Selected 1/25 time base&#xA;[Parsed_blend_1022 @ 0x560f19f96d00] [framesync @ 0x560f19f96e08] Sync level 2&#xA;[auto_scaler_3071 @ 0x560f18cf8a40] w:640 h:480 fmt:pal8 sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x2&#xA;[auto_scaler_2046 @ 0x560f0db27180] w:640 h:480 fmt:pal8 sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x2&#xA;[auto_scaler_2047 @ 0x560f144d00c0] w:640 h:480 fmt:pal8 sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x2&#xA;[Parsed_blend_1023 @ 0x560f19f97400] [framesync @ 0x560f19f97508] Selected 1/25 time base&#xA;[Parsed_blend_1023 @ 0x560f19f97400] [framesync @ 0x560f19f97508] Sync level 2&#xA;[auto_scaler_3072 @ 0x560f18cf90c0] w:640 h:480 fmt:pal8 sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x2&#xA;[scaler_out_0_0 @ 0x560f1a625140] w:640 h:480 fmt:yuv420p sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x4&#xA;[libx264 @ 0x560f19103180] using mv_range_thread = 40&#xA;[libx264 @ 0x560f19103180] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512&#xA;[libx264 @ 0x560f19103180] profile High, level 3.0&#xA;[libx264 @ 0x560f19103180] 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=6 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&#xA;Output #0, mp4, to &#x27;/tmp/test.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.20.100&#xA;    Stream #0:0, 0, 1/12800: Video: h264 (libx264), 1 reference frame (avc1 / 0x31637661), yuv420p, 640x480, 0/1, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.35.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;Clipping frame in rate conversion by 0.000008&#xA;cur_dts is invalid (this is harmless if it occurs once at the start per stream)&#xA;cur_dts is invalid (this is harmless if it occurs once at the start per stream) 0x&#xA;cur_dts is invalid (this is harmless if it occurs once at the start per stream) 0x&#xA;cur_dts is invalid (this is harmless if it occurs once at the start per stream) 0x&#xA;Get&#xF6;tet&#xA;

    &#xA;

    is that the problem ?

    &#xA;

    i have also tried with filter complex script, but the same error appears.

    &#xA;

    thank you so much

    &#xA;

    many greets iceget

    &#xA;

    if i use a shorter time (about 10 seconds) then its working fine. but when i add 100 or 256 seconds, then i getting only a 1kb mp4 file.

    &#xA;

    thank you

    &#xA;