Recherche avancée

Médias (91)

Autres articles (21)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (6044)

  • ffmpeg transcoding stop after few seconds

    9 avril 2018, par Salem F

    Hi i’m trying to do this over week now with no success ,
    What’s i’m trying to do is transcoding video from live streaming source and downscale it with FFmpeg , but every time I start transcoding it broadcasting fro 11 Sec and stop . here last command I tried

     ffmpeg  -re  -i 'http://source.com/1034.ts' -preset ultrafast http://localhost:2052/feed1.ffm

    I tried to download the .ts file with IDM and it finish downloading the file on the exact 12 Sec that FFmpeg stop trans coding on it .

    does that means that FFmpeg download that file as one segment and not continued reading the source video As what video players does usually . BTW I tried with source with VLC player and it didn’t stop playing the the same source video .

    Edit :- I decide to pass FFmpeg command via FFserver config file ffserver.conf

    Launch ffmpeg -i 'http://source.com/1.ts' -copyinkf -codec copy  

    The stream works fine for a while but after testing couple sources I notice it’s struggle to trans-coding HD videos .

    I guess the issue with my VPS KVM server being very limited CPU and RAM ( 128MB only ) ! Since I tried using ultrafast preset but din’t solve the issue , another thing , I notice when I enable AVOptionVideo crf setting on ffserver.conf trans-coding runs bit smoothly without frame-rate dropping .
    Las my server uses Xeon L5520 CPU which is outdated CPU specially I gout 1/4 power of V single core (if they count HT it will be 1/8 of the real core ) :(

    Edit 2 :-

    # vlc -I dummy 'https://source.com/1034.ts' --sout '#standard{access=http,mux=flv,dst=localhost:2052}'
    VLC media player 2.2.8 Weatherwax (revision 2.2.7-14-g3cc1d8cba9)
    [09d3fdf0] pulse audio output error: PulseAudio server connection failure: Connection refused
    [09d279c0] core interface error: no suitable interface module
    [09c9b8f8] core libvlc error: interface "globalhotkeys,none" initialization failed
    [09d279c0] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
    [09d279c0] core interface error: no suitable interface module
    [09c9b8f8] core libvlc error: interface "dbus,none" initialization failed
    [09d279c0] dummy interface: using the dummy interface module...
    [b5e04ae0] access_output_http access out: Consider passing --http-host=IP on the command line instead.
    [b5e38ab8] ts demux: MPEG-4 descriptor not found for pid 0x101 type 0xf
    [b5e90ae0] packetizer_mpeg4audio decoder: AAC channels: 2 samplerate: 48000
    [flv @ 0xb5e33b40] dimensions not set
    [b5e06360] avformat mux error: could not write header: Invalid argument
    [b5e88ef0] core decoder error: cannot continue streaming due to errors
    [b5e90ae0] core decoder error: cannot continue streaming due to errors

    Here output with -loglevel verbose

    :~# ffmpeg -i http://source.com/1.ts -copyinkf -codec copy  -loglevel verbose  http://127.0.0.1:8090/feed1.ffm
    ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Debian 4.9.2-10)
     configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/i386-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/i386-linux-gnu
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Invalid UE golomb code
       Last message repeated 2 times
    Input #0, mpegts, from 'http://source.com/1.ts':
     Duration: N/A, start: 30472.768167, bitrate: N/A
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x540 (960x544) [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
       Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 105 kb/s
    [graph 0 input from stream 0:1 @ 0x971f2c0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
    [audio format for output stream 0:0 @ 0x9844de0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0'
    [auto-inserted resampler 0 @ 0x97115e0] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:1 chl:mono fmt:fltp r:22050Hz
    [graph 1 input from stream 0:0 @ 0x96f5d00] w:960 h:540 pixfmt:yuv420p tb:1/90000 fr:50/1 sar:1/1 sws_param:flags=2
    [scaler for output stream 0:1 @ 0x96f5e80] w:352 h:240 flags:'0x4' interl:0
    [scaler for output stream 0:1 @ 0x96f5e80] w:960 h:540 fmt:yuv420p sar:1/1 -> w:352 h:240 fmt:yuv420p sar:40/33 flags:0x4
    Output #0, ffm, to 'http://127.0.0.1:8090/feed1.ffm':
     Metadata:
       creation_time   : now
       encoder         : Lavf56.25.101
       Stream #0:0: Audio: wmav2, 22050 Hz, mono, fltp, 64 kb/s
       Metadata:
         encoder         : Lavc56.26.100 wmav2
       Stream #0:1: Video: msmpeg4v3 (msmpeg4), yuv420p, 352x240 [SAR 40:33 DAR 16:9], q=2-31, 256 kb/s, 50 fps, 1000k tbn, 15 tbc
       Metadata:
         encoder         : Lavc56.26.100 msmpeg4
    Stream mapping:
     Stream #0:1 -> #0:0 (aac (native) -> wmav2 (native))
     Stream #0:0 -> #0:1 (h264 (native) -> msmpeg4v3 (msmpeg4))
    Press [q] to stop, [?] for help
    Invalid UE golomb code
    *** dropping frame 3 from stream 1 at ts 1
       Last message repeated 1 times
    [msmpeg4 @ 0x970f060] warning, clipping 1 dct coefficients to -127..127
    *** dropping frame 4 from stream 1 at ts 2
       Last message repeated 1 times
    *** dropping frame 5 from stream 1 at ts 3
       Last message repeated 1 times
    *** dropping frame 5 from stream 1 at ts 4
    *** dropping frame 6 from stream 1 at ts 4
       Last message repeated 1 times
    *** dropping frame 7 from stream 1 at ts 5
       Last message repeated 1 times
    [msmpeg4 @ 0x970f060] warning, clipping 1 dct coefficients to -127..127
    *** dropping frame 8 from stream 1 at ts 6
       Last message repeated 1 times
    *** dropping frame 8 from stream 1 at ts 7
    *** dropping frame 9 from stream 1 at ts 7
       Last message repeated 1 times
    *** dropping frame 10 from stream 1 at ts 8
       Last message repeated 1 times
    *** dropping frame 11 from stream 1 at ts 9
       Last message repeated 1 times
    *** dropping frame 11 from stream 1 at ts 10
    *** dropping frame 12 from stream 1 at ts 10
       Last message repeated 1 times
    *** dropping frame 13 from stream 1 at ts 11
       Last message repeated 1 times
    *** dropping frame 14 from stream 1 at ts 12
       Last message repeated 1 times
    *** dropping frame 14 from stream 1 at ts 13
    *** dropping frame 15 from stream 1 at ts 13
       Last message repeated 1 times
    *** dropping frame 16 from stream 1 at ts 14
       Last message repeated 1 times
    *** dropping frame 17 from stream 1 at ts 15
       Last message repeated 1 times
    *** dropping frame 17 from stream 1 at ts 16
    *** dropping frame 18 from stream 1 at ts 16
       Last message repeated 1 times
    *** dropping frame 19 from stream 1 at ts 17
       Last message repeated 1 times
    *** dropping frame 20 from stream 1 at ts 18me=00:00:01.33 bitrate= 270.3kbits/s dup=0 drop=39
       Last message repeated 1 times
    *** dropping frame 20 from stream 1 at ts 19
    *** dropping frame 21 from stream 1 at ts 19
       Last message repeated 1 times
    *** dropping frame 22 from stream 1 at ts 20
       Last message repeated 1 times
    *** dropping frame 23 from stream 1 at ts 21
       Last message repeated 1 times
    *** dropping frame 23 from stream 1 at ts 22
    *** dropping frame 24 from stream 1 at ts 22
       Last message repeated 1 times
    *** dropping frame 25 from stream 1 at ts 23
       Last message repeated 1 times
    *** dropping frame 26 from stream 1 at ts 24
       Last message repeated 1 times
    *** dropping frame 26 from stream 1 at ts 25
    *** dropping frame 27 from stream 1 at ts 25
       Last message repeated 1 times
    *** dropping frame 28 from stream 1 at ts 26
       Last message repeated 1 times
    *** dropping frame 29 from stream 1 at ts 27
       Last message repeated 1 times
    *** dropping frame 29 from stream 1 at ts 28
    *** dropping frame 30 from stream 1 at ts 28
       Last message repeated 1 times
    *** dropping frame 31 from stream 1 at ts 29
       Last message repeated 1 times
    *** dropping frame 32 from stream 1 at ts 30
       Last message repeated 1 times
    *** dropping frame 32 from stream 1 at ts 31
    *** dropping frame 33 from stream 1 at ts 31
       Last message repeated 1 times
    *** dropping frame 34 from stream 1 at ts 32
       Last message repeated 1 times
    *** dropping frame 34 from stream 1 at ts 33
    *** dropping frame 35 from stream 1 at ts 33
    *** dropping frame 35 from stream 1 at ts 34
    *** dropping frame 36 from stream 1 at ts 34
       Last message repeated 1 times
    *** dropping frame 37 from stream 1 at ts 35
       Last message repeated 1 times
    Invalid UE golomb code
    *** dropping frame 38 from stream 1 at ts 36
       Last message repeated 1 times
    *** dropping frame 38 from stream 1 at ts 37
    *** dropping frame 39 from stream 1 at ts 37
       Last message repeated 1 times
    *** dropping frame 40 from stream 1 at ts 38
       Last message repeated 1 times
    *** dropping frame 41 from stream 1 at ts 39me=00:00:02.73 bitrate= 311.7kbits/s dup=0 drop=88
       Last message repeated 1 times
    *** dropping frame 41 from stream 1 at ts 40
    *** dropping frame 42 from stream 1 at ts 40
       Last message repeated 1 times
    *** dropping frame 43 from stream 1 at ts 41
       Last message repeated 1 times
    *** dropping frame 44 from stream 1 at ts 42
       Last message repeated 1 times
    *** dropping frame 44 from stream 1 at ts 43
    *** dropping frame 45 from stream 1 at ts 43
       Last message repeated 1 times
    *** dropping frame 46 from stream 1 at ts 44
       Last message repeated 1 times
    *** dropping frame 47 from stream 1 at ts 45
       Last message repeated 1 times
    *** dropping frame 47 from stream 1 at ts 46
    *** dropping frame 48 from stream 1 at ts 46
       Last message repeated 1 times
    *** dropping frame 49 from stream 1 at ts 47
       Last message repeated 1 times
    *** dropping frame 50 from stream 1 at ts 48
       Last message repeated 1 times
    *** dropping frame 50 from stream 1 at ts 49
    *** dropping frame 51 from stream 1 at ts 49
       Last message repeated 1 times
    *** dropping frame 52 from stream 1 at ts 50
       Last message repeated 1 times
    *** dropping frame 53 from stream 1 at ts 51
       Last message repeated 1 times
    [h264 @ 0x9844a00] error while decoding MB 58 12, bytestream -5
    [h264 @ 0x9844a00] concealing 1311 DC, 1311 AC, 1311 MV errors in B frame
    *** dropping frame 53 from stream 1 at ts 52
    No more output streams to write to, finishing.
    frame=   55 fps= 42 q=4.3 Lsize=     152kB time=00:00:03.66 bitrate= 339.6kbits/s dup=0 drop=119
    video:116kB audio:26kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.760316%
    Input file #0 (http://source.com/1.ts):
     Input stream #0:0 (video): 174 packets read (220322 bytes); 174 frames decoded;
     Input stream #0:1 (audio): 156 packets read (36657 bytes); 156 frames decoded (159744 samples);
     Total: 330 packets (256979 bytes) demuxed
    Output file #0 (http://127.0.0.1:8090/feed1.ffm):
     Output stream #0:0 (audio): 72 frames encoded (73383 samples); 72 packets muxed (26712 bytes);
     Output stream #0:1 (video): 55 frames encoded; 55 packets muxed (119080 bytes);
     Total: 127 packets (145792 bytes) muxed

    Here input url file info After i download it to my PC with IDM

    General
    ID                             : 1 (0x1)
    Complete name                  : D:\1.ts
    Format                         : MPEG-TS
    File size                      : 256 KiB
    Duration                       : 2 s 520 ms
    Overall bit rate mode          : Variable
    Overall bit rate               : 788 kb/s

    Video
    ID                             : 256 (0x100)
    Menu ID                        : 1 (0x1)
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L3.1
    Format settings, CABAC         : Yes
    Format settings, RefFrames     : 2 frames
    Codec ID                       : 27
    Duration                       : 2 s 680 ms
    Width                          : 960 pixels
    Height                         : 540 pixels
    Display aspect ratio           : 16:9
    Frame rate                     : 50.000 FPS
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive

    Audio
    ID                             : 257 (0x101)
    Menu ID                        : 1 (0x1)
    Format                         : AAC
    Format/Info                    : Advanced Audio Codec
    Format version                 : Version 4
    Format profile                 : LC
    Muxing mode                    : ADTS
    Codec ID                       : 15
    Duration                       : 2 s 69 ms
    Bit rate mode                  : Variable
    Channel(s)                     : 2 channels
    Channel positions              : Front: L R
    Sampling rate                  : 48.0 kHz
    Frame rate                     : 46.875 FPS (1024 SPF)
    Compression mode               : Lossy
    Delay relative to video        : -12 ms

    Menu
    ID                             : 4096 (0x1000)
    Menu ID                        : 1 (0x1)
    Duration                       : 2 s 520 ms
    List                           : 256 (0x100) (AVC) / 257 (0x101) (AAC)
    Service name                   : Service01
    Service provider               : FFmpeg
    Service type                   : digital television
  • Demultiplex UDP live stream to multiple single live stream outputs using FFMPEG & FFSERVE

    22 mars 2018, par tiras muturi

    i have a problem with ffmpeg. i have an input live stream that has 8 inputs and i want to use ffmpeg to convert it from udp live steram to tcp livestream and then extract each of the 8 input stream differently.

    i have been reading about the ffmpeg documentation at they havent provided a clear way of solving my problem.

    am running

    ffmpeg version 3.2.4-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2~16.04.york1) 20170210 configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100

    am running this command to help me split my input into multiple output that can be accessed differently.

    ffmpeg \
    -i udp://@localhost:4000 -loglevel debug \
    -map 0:0 http://localhost:8090/feed1.ffm \
    -map 0:1 http://localhost:8090/feed2.ffm \
    -map 0:2 http://localhost:8090/feed3.ffm \
    -map 0:3 http://localhost:8090/feed4.ffm \
    -map 0:4 http://localhost:8090/feed5.ffm \
    -map 0:5 http://localhost:8090/feed6.ffm \
    -map 0:6 http://localhost:8090/feed7.ffm \
    -map 0:7 http://localhost:8090/feed8.ffm

    this is my full output

    ubuntu@ip-172-31-40-57:~$ ffmpeg -i udp://@localhost:4000  -map 0:0  http://localhost:8090/feed1.ffm  -map 0:1 http://localhost:8090/feed2.ffm  -map 0:2 http://localhost:8090/feed3.ffm  -map 0:3 http://localhost:8090/feed4.ffm  -map 0:4 http://localhost:8090/feed5.ffm  -map 0:5 http://localhost:8090/feed6.ffm  -map 0:6 http://localhost:8090/feed7.ffm  -map 0:7 http://localhost:8090/feed8.ffm

    ffmpeg version 3.2.4-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2~16.04.york1) 20170210 configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil      55. 34.101 / 55. 34.101 libavcodec     57. 64.101 / 57. 64.101 libavformat    57. 56.101 / 57. 56.101 libavdevice    57.  1.100 / 57.  1.100 libavfilter     6. 65.100 /  6. 65.100 libavresample   3.  1.  0 /  3.  1.  0 libswscale      4.  2.100 /  4.  2.100 libswresample   2.  3.100 /  2.  3.100 libpostproc    54.  1.100 / 54.  1.100


    Input #0, mpegts, from 'udp://@localhost:4000':
    Duration: N/A, start: 14580.980000, bitrate: 768 kb/s
    Program 1
    Metadata:
     service_name    : STREAM1
     service_provider: RAL
    Stream #0:0[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 2
    Metadata:
     service_name    : STREAM2
     service_provider: RAL
    Stream #0:1[0x111]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 3
    Metadata:
     service_name    : STREAM3
     service_provider: RAL
    Stream #0:2[0x121]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 4
     Metadata:
     service_name    : STREAM4
     service_provider: RAL
    Stream #0:3[0x131]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 5
    Metadata:
     service_name    : STREAM5
     service_provider: RAL
    Stream #0:4[0x141]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 6
    Metadata:
     service_name    : STREAM6
     service_provider: RAL
    Stream #0:5[0x151]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 7
    Metadata:
     service_name    : STREAM7
     service_provider: RAL
    Stream #0:6[0x161]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 8
    Metadata:
     service_name    : STREAM8
     service_provider: RAL
    Stream #0:7[0x171]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #0:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #1, ffm, to 'http://localhost:8090/feed2.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #1:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #2, ffm, to 'http://localhost:8090/feed3.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #2:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #3, ffm, to 'http://localhost:8090/feed4.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #3:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #4, ffm, to 'http://localhost:8090/feed5.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #4:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #5, ffm, to 'http://localhost:8090/feed6.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #5:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #6, ffm, to 'http://localhost:8090/feed7.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #6:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #7, ffm, to 'http://localhost:8090/feed8.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #7:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Stream mapping:
    Stream #0:0 -> #0:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #1:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #2:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #3:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #4:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #5:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #6:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #7:0 (mp2 (native) -> mp2 (native))
    Press [q] to stop, [?] for help
    size=      72kB time=00:00:07.66 bitrate=  76.9kbits/s speed=2.68x
    video:0kB audio:480kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Exiting normally, received signal 2.

    these are my live feeds.

    <feed>


    File /tmp/feed2.ffm
    FileMaxSize 64M

    ACL allow 127.0.0.1

    </feed>

    <feed>


     File /tmp/feed3.ffm
     FileMaxSize 64M

     ACL allow 127.0.0.1

    </feed>


    <feed>


     File /tmp/feed4.ffm
     FileMaxSize 64M

     ACL allow 127.0.0.1

    </feed>

    these are my stream

    MP3 audio

    <stream>
    Feed feed1.ffm
    Format mp2
    #AudioCodec mp3
    AudioBitRate 64
    AudioChannels 2
    AudioSampleRate 44100
    NoVideo
    </stream>

    <stream>
    Feed feed2.ffm
    Format mp2
    #AudioCodec mp3
    AudioBitRate 64
    AudioChannels 2
    AudioSampleRate 44100
    NoVideo
    </stream>

    <stream>
    Feed feed3.ffm
    Format mp2
    #AudioCodec mp3
    AudioBitRate 64
    AudioChannels 2
    AudioSampleRate 44100
    NoVideo
    </stream>
  • Extract Video Frames In Python

    28 février 2024, par TheNone

    I want to extract video frames and save them as image.

    &#xA;&#xA;

    import os, sys&#xA;from PIL import Image&#xA;&#xA;a, b, c = os.popen3("ffmpeg -i test.avi")&#xA;out = c.read()&#xA;dp = out.index("Duration: ")&#xA;duration = out[dp&#x2B;10:dp&#x2B;out[dp:].index(",")]&#xA;hh, mm, ss = map(float, duration.split(":"))&#xA;total = (hh*60 &#x2B; mm)*60 &#x2B; ss&#xA;for i in xrange(9):&#xA;    t = (i &#x2B; 1) * total / 10&#xA;    os.system("ffmpeg -i test.avi -ss %0.3fs frame%i.png" % (t, i))&#xA;

    &#xA;&#xA;

    But I have this error :

    &#xA;&#xA;

    FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard&#xA;Mac OSX universal build for ffmpegX&#xA;  configuration:  --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264 &#xA;  libavutil version: 49.0.0&#xA;  libavcodec version: 51.9.0&#xA;  libavformat version: 50.4.0&#xA;  built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)&#xA;Input #0, avi, from &#x27;test.avi&#x27;:&#xA;  Duration: 00:00:30.5, start: 0.000000, bitrate: 465 kb/s&#xA;  Stream #0.0, 25.00 fps(r): Video: mpeg4, yuv420p, 640x480&#xA;  Stream #0.1: Audio: mp3, 32000 Hz, mono, 32 kb/s&#xA;Unable for find a suitable output format for &#x27;frame0.png&#x27;&#xA;

    &#xA;&#xA;

    Edit : ffmpeg -formats

    &#xA;&#xA;

    FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard&#xA;Mac OSX universal build for ffmpegX&#xA;  configuration:  --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264 &#xA;  libavutil version: 49.0.0&#xA;  libavcodec version: 51.9.0&#xA;  libavformat version: 50.4.0&#xA;  built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)&#xA;File formats:&#xA;  E 3g2             3gp2 format&#xA;  E 3gp             3gp format&#xA; D  4xm             4X Technologies format&#xA; D  RoQ             Id RoQ format&#xA; D  aac             ADTS AAC&#xA; DE ac3             raw ac3&#xA;  E adts            ADTS AAC&#xA; DE aiff            Audio IFF&#xA; DE alaw            pcm A law format&#xA; DE amr             3gpp amr file format&#xA; DE asf             asf format&#xA;  E asf_stream      asf format&#xA; DE au              SUN AU Format&#xA; DE avi             avi format&#xA; D  avs             avs format&#xA;  E crc             crc testing format&#xA; D  daud            D-Cinema audio format&#xA; D  dts             raw dts&#xA; DE dv              DV video format&#xA;  E dvd             MPEG2 PS format (DVD VOB)&#xA; D  ea              Electronic Arts Multimedia Format&#xA; DE ffm             ffm format&#xA; D  film_cpk        Sega FILM/CPK format&#xA; D  flic            FLI/FLC/FLX animation format&#xA; DE flv             flv format&#xA;  E framecrc        framecrc testing format&#xA; DE gif             GIF Animation&#xA; DE h261            raw h261&#xA; DE h263            raw h263&#xA; DE h264            raw H264 video format&#xA; D  idcin           Id CIN format&#xA; DE image           image sequence&#xA; DE image2          image2 sequence&#xA; DE image2pipe      piped image2 sequence&#xA; DE imagepipe       piped image sequence&#xA; D  ingenient       Ingenient MJPEG&#xA; D  ipmovie         Interplay MVE format&#xA; DE m4v             raw MPEG4 video format&#xA; D  matroska        Matroska file format&#xA; DE mjpeg           MJPEG video&#xA; D  mm              American Laser Games MM format&#xA; DE mmf             mmf format&#xA;  E mov             mov format&#xA; D  mov,mp4,m4a,3gp,3g2,mj2 QuickTime/MPEG4/Motion JPEG 2000 format&#xA;  E mp2             MPEG audio layer 2&#xA; DE mp3             MPEG audio layer 3&#xA;  E mp4             mp4 format&#xA; DE mpeg            MPEG1 System format&#xA;  E mpeg1video      MPEG video&#xA;  E mpeg2video      MPEG2 video&#xA; DE mpegts          MPEG2 transport stream format&#xA; D  mpegvideo       MPEG video&#xA;  E mpjpeg          Mime multipart JPEG format&#xA; DE mulaw           pcm mu law format&#xA; D  nsv             NullSoft Video format&#xA;  E null            null video format&#xA; DE nut             nut format&#xA; D  nuv             NuppelVideo format&#xA; D  ogg             Ogg&#xA;  E psp             psp mp4 format&#xA; D  psxstr          Sony Playstation STR format&#xA; DE rawvideo        raw video format&#xA; D  redir           Redirector format&#xA; DE rm              rm format&#xA;  E rtp             RTP output format&#xA; D  rtsp            RTSP input format&#xA; DE s16be           pcm signed 16 bit big endian format&#xA; DE s16le           pcm signed 16 bit little endian format&#xA; DE s8              pcm signed 8 bit format&#xA; D  sdp             SDP&#xA; D  shn             raw shorten&#xA; D  smk             Smacker Video&#xA; D  sol             Sierra SOL Format&#xA;  E svcd            MPEG2 PS format (VOB)&#xA; DE swf             Flash format&#xA; D  tta             true-audio&#xA; DE u16be           pcm unsigned 16 bit big endian format&#xA; DE u16le           pcm unsigned 16 bit little endian format&#xA; DE u8              pcm unsigned 8 bit format&#xA;  E vcd             MPEG1 System format (VCD)&#xA; D  vmd             Sierra VMD format&#xA;  E vob             MPEG2 PS format (VOB)&#xA; DE voc             Creative Voice File format&#xA; DE wav             wav format&#xA; D  wc3movie        Wing Commander III movie format&#xA; D  wsaud           Westwood Studios audio format&#xA; D  wsvqa           Westwood Studios VQA format&#xA; DE yuv4mpegpipe    YUV4MPEG pipe format&#xA;&#xA;Image formats (filename extensions, if any, follow):&#xA; DE gif    gif&#xA;&#xA;Codecs:&#xA; D V    4xm&#xA; D V D  8bps&#xA; DEA    aac&#xA; D V D  aasc&#xA; DEA    ac3&#xA; DEA    adpcm_4xm&#xA; DEA    adpcm_adx&#xA; DEA    adpcm_ct&#xA; DEA    adpcm_ea&#xA; DEA    adpcm_ima_dk3&#xA; DEA    adpcm_ima_dk4&#xA; DEA    adpcm_ima_qt&#xA; DEA    adpcm_ima_smjpeg&#xA; DEA    adpcm_ima_wav&#xA; DEA    adpcm_ima_ws&#xA; DEA    adpcm_ms&#xA; DEA    adpcm_sbpro_2&#xA; DEA    adpcm_sbpro_3&#xA; DEA    adpcm_sbpro_4&#xA; DEA    adpcm_swf&#xA; DEA    adpcm_xa&#xA; DEA    adpcm_yamaha&#xA; D A    alac&#xA; DEA    amr_nb&#xA; DEA    amr_wb&#xA; DEV D  asv1&#xA; DEV D  asv2&#xA; D V D  avs&#xA; D V    bmp&#xA; D V D  camstudio&#xA; D V D  camtasia&#xA; D V D  cinepak&#xA; D V D  cljr&#xA; D A    cook&#xA; D V D  cyuv&#xA; DES    dvbsub&#xA; DES    dvdsub&#xA; DEV D  dvvideo&#xA; DEV D  ffv1&#xA; DEVSD  ffvhuff&#xA; D A    flac&#xA; D V D  flic&#xA; DEVSD  flv&#xA; D V D  fraps&#xA; DEA    g726&#xA; DEV D  h261&#xA; DEVSDT h263&#xA; D VSD  h263i&#xA;  EV    h263p&#xA; DEV DT h264&#xA; DEVSD  huffyuv&#xA; D V D  idcinvideo&#xA; D V D  indeo2&#xA; D V    indeo3&#xA; D A    interplay_dpcm&#xA; D V D  interplayvideo&#xA;  EV    jpegls&#xA; D V    kmvc&#xA;  EV    ljpeg&#xA; D V D  loco&#xA; D A    mace3&#xA; D A    mace6&#xA; D V D  mdec&#xA; DEV D  mjpeg&#xA; D V D  mjpegb&#xA; D V D  mmvideo&#xA; DEA    mp2&#xA; DEA    mp3&#xA; D A    mp3adu&#xA; D A    mp3on4&#xA; DEVSDT mpeg1video&#xA; DEVSDT mpeg2video&#xA; DEVSDT mpeg4&#xA; D A    mpeg4aac&#xA; D VSDT mpegvideo&#xA; DEVSD  msmpeg4&#xA; DEVSD  msmpeg4v1&#xA; DEVSD  msmpeg4v2&#xA; D V D  msrle&#xA; D V D  msvideo1&#xA; D V D  mszh&#xA; D V D  nuv&#xA; DEV    pam&#xA; DEV    pbm&#xA; DEA    pcm_alaw&#xA; DEA    pcm_mulaw&#xA; DEA    pcm_s16be&#xA; DEA    pcm_s16le&#xA; DEA    pcm_s24be&#xA; DEA    pcm_s24daud&#xA; DEA    pcm_s24le&#xA; DEA    pcm_s32be&#xA; DEA    pcm_s32le&#xA; DEA    pcm_s8&#xA; DEA    pcm_u16be&#xA; DEA    pcm_u16le&#xA; DEA    pcm_u24be&#xA; DEA    pcm_u24le&#xA; DEA    pcm_u32be&#xA; DEA    pcm_u32le&#xA; DEA    pcm_u8&#xA; DEV    pgm&#xA; DEV    pgmyuv&#xA; DEV    png&#xA; DEV    ppm&#xA; D A    qdm2&#xA; D V D  qdraw&#xA; D V D  qpeg&#xA; D V D  qtrle&#xA; DEV    rawvideo&#xA; D A    real_144&#xA; D A    real_288&#xA; D A    roq_dpcm&#xA; D V D  roqvideo&#xA; D V D  rpza&#xA; DEV D  rv10&#xA; DEV D  rv20&#xA; D A    shorten&#xA; D A    smackaud&#xA; D V    smackvid&#xA; D V D  smc&#xA; DEV    snow&#xA; D A    sol_dpcm&#xA; DEA    sonic&#xA;  EA    sonicls&#xA; D V D  sp5x&#xA; DEV D  svq1&#xA; D VSD  svq3&#xA; D V    theora&#xA; D V D  truemotion1&#xA; D V D  truemotion2&#xA; D A    truespeech&#xA; D A    tta&#xA; D V D  ultimotion&#xA; D V    vc9&#xA; D V D  vcr1&#xA; D A    vmdaudio&#xA; D V D  vmdvideo&#xA; D A    vorbis&#xA; D V    vp3&#xA; D V D  vqavideo&#xA; D A    wmav1&#xA; D A    wmav2&#xA; DEVSD  wmv1&#xA; DEVSD  wmv2&#xA; D V D  wnv1&#xA; D A    ws_snd1&#xA; D A    xan_dpcm&#xA; D V D  xan_wc3&#xA; D V D  xl&#xA;  EV    xvid&#xA; DEV D  zlib&#xA; D V    zmbv&#xA;&#xA;Supported file protocols:&#xA; file: pipe: udp: rtp: tcp: http:&#xA;Frame size, frame rate abbreviations:&#xA; ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif&#xA;Motion estimation methods:&#xA; zero(fastest) full(slowest) log phods epzs(default) x1 hex umh iter&#xA;&#xA;Note, the names of encoders and decoders dont always match, so there are&#xA;several cases where the above table shows encoder only or decoder only entries&#xA;even though both encoding and decoding are supported for example, the h263&#xA;decoder corresponds to the h263 and h263p encoders, for file formats its even&#xA;worse&#xA;

    &#xA;&#xA;

    What is wrong in my code ? Thanks in advance

    &#xA;