Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (31)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

Sur d’autres sites (4032)

  • FFServer streaming H.264 from Logitech C920

    23 octobre 2014, par Ricardo Frederico Leote Mota

    I’m having some trouble trying to implement a web live stream from my Logitech C920 webcam w/ H.264 encoding using ffmpeg/ffserver.

    Here is the configuration file I’m using for the ffserver :

    # Port on which the server is listening. You must select a different
    # port from your standard HTTP web server if it is running on the same
    # computer.
    Port 8090

    # Address on which the server is bound. Only useful if you have
    # several network interfaces.
    BindAddress 0.0.0.0

    # Number of simultaneous HTTP connections that can be handled. It has
    # to be defined *before* the MaxClients parameter, since it defines the
    # MaxClients maximum limit.
    MaxHTTPConnections 2000

    # Number of simultaneous requests that can be handled. Since FFServer
    # is very fast, it is more likely that you will want to leave this high
    # and use MaxBandwidth, below.
    MaxClients 1000

    # This the maximum amount of kbit/sec that you are prepared to
    # consume when streaming to clients.
    MaxBandwidth 1000

    # Access log file (uses standard Apache log file format)
    # '-' is the standard output.
    CustomLog -

    ##################################################################
    # Definition of the live feeds. Each live feed contains one video
    # and/or audio sequence coming from an ffmpeg encoder or another
    # ffserver. This sequence may be encoded simultaneously with several
    # codecs at several resolutions.

    <feed>

    # You must use 'ffmpeg' to send a live feed to ffserver. In this
    # example, you can type:
    #

    File /tmp/feed.ffm
    FileMaxSize 100M

    # You could specify
    # ReadOnlyFile /saved/specialvideo.ffm
    # This marks the file as readonly and it will not be deleted or updated.

    # Only allow connections from localhost to the feed.
    ACL allow 127.0.0.1

    </feed>


    ##################################################################
    # Now you can define each stream which will be generated from the
    # original audio and video stream. Each format has a filename (here
    # 'test1.mpg'). FFServer will send this stream when answering a
    # request containing this filename.

    <stream>

    Feed feed.ffm
    Format mp4

    # Audio settings
    NoAudio

    # Video Settings
    #VideoSize 1280x720                      # Video resolution
    #VideoFrameRate 30                      # Video FPS
    #AVOptionVideo flags +global_header          # Parameters passed to encoder
    #AVOptionVideo cpu-used 0
    #AVOptionVideo qmin 10
    #AVOptionVideo qmax 42
    #AVOptionVideo quality good
    PreRoll 0
    StartSendOnKey
    #VideoBitRate 400                      # Video bitrate

    </stream>

    # Server status

    <stream>
    Format status

    # Only allow local people to get the status
    ACL allow localhost
    ACL allow 192.168.0.0 192.168.255.255

    </stream>


    # Redirect index.html to the appropriate site

    And here is the command I’m issuing through the command line and the respective output :

    ffmpeg -s 1280x720 -f video4linux2 -r 30 -vcodec h264 -re -i /dev/video0 -copyinkf -codec copy h**p://localhost:8090/feed.ffm
    ffmpeg version N-67036-g04a4fb8 Copyright (c) 2000-2014 the FFmpeg developers
     built on Oct 20 2014 17:39:50 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
     configuration: --enable-gpl --enable-libx264
     libavutil      54. 10.100 / 54. 10.100
     libavcodec     56.  8.102 / 56.  8.102
     libavformat    56.  9.101 / 56.  9.101
     libavdevice    56.  1.100 / 56.  1.100
     libavfilter     5.  2.100 /  5.  2.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 12614.859199, bitrate: N/A
       Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 60 tbc
    Output #0, ffm, to 'h**p://localhost:8090/feed.ffm':
     Metadata:
       creation_time   : now
       encoder         : Lavf56.9.101
       Stream #0:0: Video: h264, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, -5 kb/s, 30 fps, 1000k tbn, 30 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -166263; changing to 1. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1, current: -134365; changing to 2. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 2, current: -102381; changing to 3. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 3, current: -66434; changing to 4. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 4, current: -34548; changing to 5. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 5, current: -2645; changing to 6. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232857, current: 138514; changing to 232858. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232858, current: 167942; changing to 232859. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232859, current: 197415; changing to 232860. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232860, current: 227037; changing to 232861. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 997959, current: 938599; changing to 997960. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 997960, current: 995052; changing to 997961. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1240745, current: 1232841; changing to 1240746. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1293561, current: 1282157; changing to 1293562. This may result in incorrect timestamps in the output file.
    frame=   69 fps= 34 q=-1.0 Lsize=     912kB time=00:00:02.01 bitrate=3702.1kbits/s

    When I try to play the stream with VLC for example - vlc h**p ://localhost:8090/stream.mp4 - i get the following error :

    [00007f5234003948] core stream error : cannot pre fill buffer

    And I can’t watch the stream on the web browser side also.

    Could someone give me an hint on this ?

    Many thanks and your help is much appreciated ! ;)

  • ffmpeg zoom in for 5 seconds, then zoom out for 15 seconds to repeat the entire video

    24 janvier 2020, par Monso

    I have 1 video, I want to watch 15 seconds, I will zoom in to 5 seconds to repeat the whole video
    Audio and video must be equal

    ffmpeg -y -i 1.mp4 -vf "scale=2*iw:-1, crop=iw/2:ih/2:enable='lt(mod(t,27),3)*gte(t,27,3)'" output.mp4
  • ffmpeg status & quality / cuda (CPU/GPU)

    18 avril 2015, par cocco

    ffmpeg am i doing it right ?

    So much time has passed since i use ffmpeg to convert clips on my home web server, now that mp4 (h264 & aac) is the current overall standard (works on every console, smartphone, smartTV, pc) i decided to convert my old clips from various digital cameras to to this new container/codecs.

    1. less space & the same quality.
    2. compatibility
    3. support for tags (subler for mac)

    after some research i opted for ffmpeg because of various reasons

    1. commandline (i made my simple web interface with default settings wich i execute with php’s exec)
    2. the quality/size amount

    I read that many expensive video conversion softwares are not able to handle low bitrate videos properly. I also tested some of them and personally i could not find the proper export settings or i was not impressed by the results... some had fixed default export setings, most had a lower video quality at the same filesize. ffmpeg allows me to set the -crf (18-24 usually) and -preset (veryslow, fast..) witch allows me to reduce the filesize drastically mantaining the same
    visible quality.

    Said that i’m using the preset at veryslow.(there is also placebo but the final video file is only 1% smaller in size).

    And here is the command i use

    ffmpeg
    -y //overwrite the file if it exists

    -i INPUTFILE // replace with the input file

    -metadata title=THETITLE // set a nice title, visible on modern devices
    -metadata date=THEDATE // set a nice title, visible on modern devices

    -c:v libx264 // use the h264 codec
    -crf 21 // try different numbers between 18-26
    -preset veryslow // placebo,slow,fast,ultrafast==big file
    -tune film // tune it a little
    -pix_fmt yuv420p // preferred on most modern devices
    -profile:v main // preferred on most modern devices
    -level 3.1 // preferred on most modern devices
    -refs 4 // preferred on most modern devices

    -c:a libfdk_aac // use aac
    -metadata:s:a language=eng // set a language, visible on modern devices
    -b:a 128k // audio bitrate 128k is like mp3 192k
    -ar 48000 // 44100 ... whatever
    -ac 2 // audiochannels
    -movflags +faststart //move the metadata in the front of the video so it loads faster

    OUTPUTFILE

    some camcorder clips with m2ts already have the avc/h264 compatible codec so i just copy the stream.
    some have the ac3/dolby sorround audio. I convert the audio but keep the ac3 as second audio track mapping the ffmpeg streams.this allows me to watch the mp4 on browsers and mobile devices but i’m able to keep the surround sound to playback on some tv’s, advanced media players or devices like apple tv.

    not that i’m not happy with the speed (using quad core’s) but i recently read again about cuda opencl and there is also the simple fact that i’m not using other converters than ffmpeg since alot of time.

    Is ffmpeg (with the setting i use) a good converter to keep the same video quality than the source reducing the space occupied by and average of 30-40% ?

    Is GPU conversion really that bad (cuda .. testing a gtx970) ?
    it would be nice to add some more speed to the conversions by using both the gpu and the cpu..but for my understanding they cannot work together ??? and using only gpu is a drastical quality loss...cpu si more precise, gpu is faster in calculation are too imprecise from what i read.. so expensive softwares use cuda only for preview purpose... right ?

    Is ffmpeg or another software compatible with CPU+GPU encoding ?
    i really don’t remember where, but i read that the ffmpeg is not a good videoconverter.

    i’m really happy with the size/quality, i gained an average of 30% in space with no visible quality loss. With some extra parameters i can adjust some really old analog videos that are deinterlaced in a really bad way.

    maybe i could gain more size/quality with another software ???

    note : i like ffmpeg.it’s free and it has commandline so i can create my own interface with php html & js and use it on various machines without the need to install it in every device i use. i uplad the idevice clips directly to the ffmpeg server.

    btw. : explain the downvotes...

    EDIT :

    @talonmies ...cuda tag removed :

    http://www.nvidia.com/object/cuda_home_new.html

    CUDA® is a parallel computing platform and programming model invented
    by NVIDIA. It enables dramatic increases in computing performance by
    harnessing the power of the graphics processing unit (GPU). With
    millions of CUDA-enabled GPUs sold to date, software developers,
    scientists and researchers are finding broad-ranging uses for GPU
    computing with CUDA. Here are a few examples : - See more at :
    http://www.nvidia.com/object/cuda_home_new.html#sthash.dEYaqae7.dpuf

    isn’t cuda the programming model that a theoretical ffmpeg library should support to handle GPU encoding on nvidia cards like the gtx 970 ?? like the badaboom software http://www.geforce.com/games-applications/pc-applications/badaboom-media-converter.