Recherche avancée

Médias (91)

Autres articles (60)

  • Contribute to documentation

    13 avril 2011

    Documentation 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 (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (9121)

  • FFMPEG- Streaming Stops after few seconds

    25 mars 2019, par Manjot Singh Kalsi

    Hi 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.

  • Method to generate a .ts file with PMT update (PCR pid) using ffmpeg or other tools

    6 juin 2018, par C.B. Akshay Kumar

    is there a way to generate a ts file with PMT update of PCR PID using FFmpeg or any other tools ? I tried to combine two streams of the same file with their ’streamids’ (using FFmpeg’s concat filter) changed but to no avail. Is there any way to generate a stream according to my requirements ?

    Here are the sample streams that I used :

    Input #0, mpegts, from 'trial.ts':
    Duration: 00:02:00.12, start: 1.400000, bitrate: 2162 kb/s
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x101](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s


    Input #0, mpegts, from 'trial2.ts':
     Duration: 00:02:00.12, start: 1.400000, bitrate: 2162 kb/s
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x32]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x33](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s

    Note that only the AV PIDs for the streams have been changed. After using concat filter, I was able to combine the two streams, but I lost the PID information of the second .tsfile. Thus, there was no change in PID information as required usually for a PMT update.

  • FFmpeg creating multicast with multiple streams from one source (live source)

    1er mai 2018, par Netheme

    Hi :) I’m facing problems when creating multicast with multiple streams from one source (live source). The issue is that the encoding is slower than realtime. That is big issue for me as I’m processing live feed. The exact command and it’s output you can find here :

    Command

    ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -vsync 0 -deint 2 -drop_second_field 1 -surfaces 10 -i 'udp://@239.10.150.2:5004?fifo_size=100000000&bitrate=12000000'  -map i:0xc77 -r:v:0 25 -filter:v:0 fps=25,scale_npp=640:360:format=same:interp_algo=lanczos -aspect:v:0 16:9 -g:v:0 80 -vcodec:v:0 h264_nvenc -b:v:0 400K -minrate:v:0 400k -maxrate:v:0 400k  -map i:0xc77 -r:v:1 25 -filter:v:1 fps=25,scale_npp=720:405:format=same:interp_algo=lanczos -aspect:v:1 16:9 -g:v:1 80 -vcodec:v:1 h264_nvenc -b:v:1 1000K -minrate:v:1 1000k -maxrate:v:1 1000k  -map i:0xc77 -r:v:2 25 -filter:v:2 fps=25,scale_npp=1280:720:format=same:interp_algo=lanczos -aspect:v:2 16:9 -g:v:2 80 -vcodec:v:2 h264_nvenc -b:v:2 2500K -minrate:v:2 2500K -maxrate:v:2 2500K  -map i:0xc77 -r:v:3 25 -filter:v:3 fps=25,scale_npp=1920:1080:format=same:interp_algo=lanczos -aspect:v:3 16:9 -g:v:3 80 -vcodec:v:3 h264_nvenc -b:v:3 4500K -minrate:v:3 4500K -maxrate:v:3 4500K  -map i:0xc7a -ab:a:0 128k -ar:a:0 48k -acodec:a:0 aac -ac:a:0 2  -map i:0xc7b -ab:a:1 128k -ar:a:1 48k -acodec:a:1 aac -ac:a:1 2  -map i:0xc7c -ab:a:2 128k -ar:a:2 48k -acodec:a:2 aac -ac:a:2 2  -map i:0xc7d -ab:a:3 128k -ar:a:3 48k -acodec:a:3 aac -ac:a:3 2  -f mpegts "udp://@239.100.0.23:3234?overrun_nonfatal_option=1&pkt_size=1316

    And the output (speed should be 1> i hope)

    Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
    Stream #0:0 -> #0:1 (h264 (h264_cuvid) -> h264 (h264_nvenc))
    Stream #0:0 -> #0:2 (h264 (h264_cuvid) -> h264 (h264_nvenc))
    Stream #0:0 -> #0:3 (h264 (h264_cuvid) -> h264 (h264_nvenc))
    Stream #0:1 -> #0:4 (mp2 (native) -> aac (native))
    Stream #0:2 -> #0:5 (mp2 (native) -> aac (native))
    Stream #0:3 -> #0:6 (mp2 (native) -> aac (native))
    Stream #0:4 -> #0:7 (mp2 (native) -> aac (native))
    Press [q] to stop, [?] for help
    Output #0, mpegts, to 'udp://@239.100.0.23:3234?overrun_nonfatal_option=1&pkt_size=1316':=  -0.0kbits/s speed=N/A    
    Metadata:
      encoder         : Lavf57.83.100
      Stream #0:0: Video: h264 (h264_nvenc) (Main), cuda, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 400 kb/s, 25 fps, 90k tbn, 25 tbc
      Metadata:
        encoder         : Lavc57.107.100 h264_nvenc
      Side data:
        cpb: bitrate max/min/avg: 400000/0/400000 buffer size: 800000 vbv_delay: -1
      Stream #0:1: Video: h264 (h264_nvenc) (Main), cuda, 720x405 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 25 fps, 90k tbn, 25 tbc
      Metadata:
        encoder         : Lavc57.107.100 h264_nvenc
      Side data:
        cpb: bitrate max/min/avg: 1000000/0/1000000 buffer size: 2000000 vbv_delay: -1
      Stream #0:2: Video: h264 (h264_nvenc) (Main), cuda, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2500 kb/s, 25 fps, 90k tbn, 25 tbc
      Metadata:
        encoder         : Lavc57.107.100 h264_nvenc
      Side data:
        cpb: bitrate max/min/avg: 2500000/0/2500000 buffer size: 5000000 vbv_delay: -1
      Stream #0:3: Video: h264 (h264_nvenc) (Main), cuda, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 4500 kb/s, 25 fps, 90k tbn, 25 tbc
      Metadata:
        encoder         : Lavc57.107.100 h264_nvenc
      Side data:
        cpb: bitrate max/min/avg: 4500000/0/4500000 buffer size: 9000000 vbv_delay: -1
      Stream #0:4(cze): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        encoder         : Lavc57.107.100 aac
      Stream #0:5(eng): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        encoder         : Lavc57.107.100 aac
      Stream #0:6(hun): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        encoder         : Lavc57.107.100 aac
      Stream #0:7(ron): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        encoder         : Lavc57.107.100 aac
    frame= 2868 fps= 19 q=18.0 Lq=14.0 q=15.0 q=16.0 size=  134155kB time=00:01:55.88 bitrate=9484.0kbits/s speed=0.768x

    Does anyone have experiences with something like this ?