Recherche avancée

Médias (91)

Autres articles (75)

  • 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 ;

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (9151)

  • ffmpeg in "streaming mode" suddenly stops writing output file and resumes after several minutes

    29 juin 2018, par EliA

    I’m using ffmpeg to convert chunks of media in webm format to a wav file in a "continuous stream" mode.

    Using a python wrapper, I’m feeding ffmpeg a webm chunk (let’s say 1 chunk each second) and ffmpeg continuously writes the output wav (then, in a separate thread I’m reading this wav file and pass the new data forward).

    This works well most of the time, but some times, I get this weird behavior :

    • after some chunks are processed and output to the wav file, ffmpeg stops writing to the output file (the file stops growing but ffmpeg keeps getting the webm chunks)
    • this can go on like this for several minutes, and then ffmpeg resumes writing to the wav file
    • eventually, the complete wav file is written successfully, but this causes huge delays in the streaming process.

    Looking at CPU and memory usage, this doesn’t seem to be the issue.

    Any ideas as to what could cause ffmpeg to stop streaming for several minutes and then resume ?
    This can happen after 30 seconds, after 3 minutes or after an hour of streaming media chunks and the time it takes ffmpeg to resume also varies.

    In my python code, I’m basically opening a subprocess.Popen() process and write to the process’ stdin to feed ffmpeg the media chunks.

    So my code looks something like :

    ffmpeg_proc = subprocess.Popen('ffmpeg -y -f webm -i - -ac 1 -ar 16000  -f wav /tmp/out.wav', shell=True, stdin=subprocess.PIPE)

    for chunk in chunks:
       ffmpeg_proc.stdin.write(chunk)

    I’m using python 3.6 and ffmpeg version 2.8.14-0ubuntu0.16.04.1

    Thanks in advance !

  • NReco Error : "The specified executable is not a valid application for this OS platform"

    18 juillet 2018, par swabygw

    I’m using the NReco to convert videos. I declare the converter like the following, and add a handler to ConvertProgress.

    Dim vid_Convert As New FFMpegConverter
    AddHandler vid_Convert.ConvertProgress, Sub(sender, e) vidConvertProgress(folder,fname,fext,fverdest,fint,fcount,fhost,e)
    vid_Convert.ConvertMedia(file_temp, Nothing, file_dest, "mp4", cSettings)

    The media is converted fine. The problem is in the handler where I declare a new converter and have it do a GetVideoThumbnail (when the prior conversion is completed), like this :

    Dim vid_Extract As New FFMpegConverter
    vid_Extract.GetVideoThumbnail(inputFile, outputFile, extractposition)

    This produces the error "The specified executable is not a valid application for this OS platform". However, I’ve executed the GetVideoThumbnail method by itself elsewhere in my program with no problem. For some reason, it won’t work if it’s executed within the handler. Is there a way around this ?

  • How to write mp4 metadata with ffmpeg without affecting the video data

    13 juillet 2018, par Daniel Quinn

    I’m trying to write metadata to a video file in one step, and capture the "raw data" (no metadata) portion of a video file in another step. The trouble is, with MP4 files, adding metadata to the file appears to alter the raw video data as well, while MKV files act as expected. Here’s an example with two files : test.mkv and test.mp4 :

    MKV

    ffmpeg -i test.mkv -loglevel error -metadata 'arbitrary=string' -codec copy test-new-metadata.mkv

    ffmpeg -i test.mkv              -loglevel error -map 0:v:0 -c copy -f data - -map 0:a:0 -c copy -f data - | md5sum
    631becf821dca89b150120d25393491a  -

    ffmpeg -i test-new-metadata.mkv -loglevel error -map 0:v:0 -c copy -f data - -map 0:a:0 -c copy -f data - | md5sum
    631becf821dca89b150120d25393491a  -

    MP4

    ffmpeg -i test.mp4 -loglevel error -metadata 'arbitrary=string' -codec copy test-new-metadata.mp4

    ffmpeg -i test.mp4              -loglevel error -map 0:v:0 -c copy -f data - -map 0:a:0 -c copy -f data - | md5sum
    b9b28e4ac500be961bd07290a34cf93f  -

    ffmpeg -i test-new-metadata.mp4 -loglevel error -map 0:v:0 -c copy -f data - -map 0:a:0 -c copy -f data - | md5sum
    d13e7177fae9b341994bc1ee8f3812bc  -

    ...and now webm, just to see if I’m losing my mind :

    Webm

    ffmpeg -i test.webm -loglevel error -metadata 'arbitrary=string' -codec copy test-new-metadata.webm

    ffmpeg -i test.webm              -loglevel error -map 0:v:0 -c copy -f data - -map 0:a:0 -c copy -f data - | md5sum
    a62e053d3dbf627db4d77c5165152a81  -

    ffmpeg -i test-new-metadata.webm -loglevel error -map 0:v:0 -c copy -f data - -map 0:a:0 -c copy -f data - | md5sum
    a62e053d3dbf627db4d77c5165152a81  -

    So I’m left wondering if my understanding of how to capture the raw video is misinformed, or if MP4 is "special" in some way. Note that I’m not interested in using ffmpeg’s own hashing functions as I want to run the raw data through an external process. The use of md5sum here is just to test if the output is identical.

    Update : As requested, I’m including the output of the metadata writing step for MP4 files :

    $ ffmpeg -i test.mp4 -metadata 'arbitrary=string' -codec copy test-new-metadata.mp4
    ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 8.1.1 (GCC) 20180531
     configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvenc --enable-omx --enable-shared --enable-version3
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       creation_time   : 2010-03-20T21:29:11.000000Z
       encoder         : HandBrake 0.9.4 2009112300
     Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
       Metadata:
         creation_time   : 2010-03-20T21:29:11.000000Z
         encoder         : JVT/AVC Coding
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
       Metadata:
         creation_time   : 2010-03-20T21:29:11.000000Z
    Output #0, mp4, to 'test-new-metadata.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: mp42isomavc1
       arbitrary       : string
       encoder         : Lavf58.12.100
       Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, q=2-31, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 90k tbc (default)
       Metadata:
         creation_time   : 2010-03-20T21:29:11.000000Z
         encoder         : JVT/AVC Coding
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
       Metadata:
         creation_time   : 2010-03-20T21:29:11.000000Z
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=  166 fps=0.0 q=-1.0 Lsize=     377kB time=00:00:05.54 bitrate= 556.7kbits/s speed=4.07e+03x    
    video:315kB audio:56kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.609490%

    Update 2 : Here’s a link to the misbehaving mp4 file (375k).