Recherche avancée

Médias (91)

Autres articles (59)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

Sur d’autres sites (3606)

  • Dealing with problems in FLAC audio files with ffmpeg

    15 janvier 2020, par Seamus

    I have gotten a set of FLAC (audio) files from a friend. I copied them to my Sonos music library, and got set to enjoy a nice album. Unfortunately, Sonos would not play the files. As a result I have been getting to know ffmpeg.

    Sonos’ complaint with the FLAC files was that it was "encoded at an unsupported sample rate". With rolling eyes and shaking head, I note that the free VLC media player happily plays these files, but the product I’ve paid for (Sonos) - does not. But I digress...

    ffprobe revealed that the FLAC files contain both an Audio channel and a Video channel :

    $ ffprobe -hide_banner  -show_streams "/path/to/Myaudio.flac"


       Duration: 00:02:23.17, start: 0.000000, bitrate: 6176 kb/s  
       Stream #0:0: Audio: flac, 176400 Hz, stereo, s32 (24 bit)  
       Stream #0:1: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 450x446 [SAR 72:72 DAR 225:223], 90k tbr, 90k tbn, 90k tbc (attached pic)  
       Metadata:  
         comment         : Cover (front)  

    Cool ! I guess this is how some audio players are able to display the ’album artwork’ when they play a song ? Note also that the Audio stream is reported at 176400 Hz ! Apparently I’m out of touch ; I thought that 44.1khz sampling rate effectively removed all of the ’sampling artifacts’ we could hear. Anyway, I learned that Sonos would support a max of 48kHz sampling rate, and this (the 176.4kHz rate) is what Sonos was unhappy about. I used ffmpeg to ’dumb it down’ for them :

    $ ffmpeg -i "/path/to/Myaudio.flac" -sample_fmt s32 -ar 48000 "/path/to/Myaudio48K.flac"

    This seemed to work - at least I got a FLAC file that Sonos would play. However, I also got what looks like a warning of some sort :

    [swscaler @ 0x108e0d000] deprecated pixel format used, make sure you did set range correctly
    [flac @ 0x7feefd812a00] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2

    A bit more research turned up this answer which I don’t quite understand, and then in a comment says, "not to worry" - at least wrt the swscaler part of the warning.

    And that (finally) brings me to my questions :

    1.a. What framerate, muxer & other specifications make a graphic compatible with a majority of programs that use the graphic ?

    1.b. How should I use ffmpeg to modify the Video channel to set these specifications (ref. Q 1.a.) ?

    2.a. How do I remove the Video channel from the .flac audio file ?

    2.b. How do I add a Video channel into a .flac file ?

    EDIT :

    I asked the above (4) questions after failing to accomplish a ’direct’ conversion (a single ffmpeg command) from FLAC at 176.4 kHz to ALAC (.m4a) at 48 kHz (max supported by Sonos). I reasoned that an ’incremental’ approach through a series of conversions might get me there. With the advantage of hindsight, I now see I should have posted my original failed direct conversion incantation... we live and learn.

    That said, the accepted answer below meets my final objective to convert a FLAC file encoded at 176.4kHz to an ALAC (.m4a) at 48kHz, and preserve the cover art/video channel.

  • FFMPEG - Adding a full-frame image to the beginning of a video

    17 janvier 2020, par lyinawake

    I have tried many different ways to try to create a 10 second video file out of an image file and have used all the same switches and codecs as I used to encode my video file. However, when I concat the two using anything but complex_filter (which forces the video through another round of transcoding), the resulting video file is corrupt. I believe this is due to the inherent differences of the 10 second clip that ffmpeg created from the image, but there must be some way to get it to encode the exact same way as my video file.

    Here is the command I am using to turn the image into a 10s video clip (I added a silent mp3 because I thought that an audio stream starting partway through the video was messing things up) :

    ffmpeg -loop 1 -i splash.jpg -i silence.mp3 -c:v libx264 -preset slow -g 60 -r 29.97 -crf 16 -c:a libfdk_aac -b:a 256k -cutoff 18000 -t 5 tmpoutput1.mp4

    Here is the command I am using to encode my video :

    ffmpeg -i input.f4v -c:v libx264 -preset slow -g 60 -r 29.97 -crf 16 -c:a libfdk_aac -b:a 256k -cutoff 18000 tmpoutput2.mp4

    Here is the command I use to convert both of them to .ts to get ready for concat :

    ffmpeg -i tmpoutput1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts tmpoutput1.ts

    And finally the concat (which is where I get crazy video corruption, everything along the way looks fine) :

    ffmpeg -i "concat:tmpoutput1.ts|tmpoutput2.ts" -c copy output.mp4

    Again, the issue is that I’m already transcoding everything once and I should be able to get it to transcode in a similar enough structure so that it can be concatenated without another transcode tacked onto the end.

    Has anyone successfully added a full-frame splash graphic to the front of a video with ffmpeg before ? I am using a brand new cross-compile of ffmpeg as I thought that might be the issue, but alas, the issue persists after the update.

    Thanks !

  • ffmpeg-python : mp3 + jpg = mp4

    15 janvier 2020, par Martin

    I’m trying to make a python program using ffmpeg-python that will combine an audio file and image into a music video mp4 file. I’ve done this in a working ffmpeg bash command before, but now I’m trying to do it in a pure python3 program, I’ve ran some of the example ffmpeg python applications to ensure it works, but haven’t found any examples related to my case. So far I have this :

    import ffmpeg
    print('test')

    audioInput = ffmpeg.input('fighter.mp3')
    imageInput = ffmpeg.input('front.jpg')
    (
       ffmpeg
       .filter([audioInput, imageInput], 'overlay', 10, 10)
       .output('out.mp4')
       .run()
    )

    But that just leads to an error saying Stream specifier '' in filtergraph description [0][1]overlay=10:10[s0] matches no streams.. Can anyone with experience using this ffmpeg-python library help ?