Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (68)

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

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

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

Sur d’autres sites (9046)

  • Bad file descriptor decoding mp3 to pipe with ffmpeg

    1er février 2017, par Pete Bleackley

    Can any FFMpeg gurus help me with the following ?

    I’m trying to convert a podcast to PCM and downsample it to 16KHz mono before feeding it to a speech recognition system for transcription. The command line

    ffmpeg -i http://media.blubrry.com/conlangery/content.blubrry.com/conlangery/Conlangery01.mp3 -f s16le -ac 1 -ar 16000 pipe:0

    fails with

    av_interleaved_write_frame() : Bad file descriptor

    What is the problem here and how do I fix it ?

    EDIT

    Full error message is

    ffmpeg version N-83189-gd5d474aea5-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.1 (Debian 5.4.1-4) 20161202
     configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
     libavutil      55. 44.100 / 55. 44.100
     libavcodec     57. 75.100 / 57. 75.100
     libavformat    57. 62.100 / 57. 62.100
     libavdevice    57.  2.100 / 57.  2.100
     libavfilter     6. 69.100 /  6. 69.100
     libswscale      4.  3.101 /  4.  3.101
     libswresample   2.  4.100 /  2.  4.100
     libpostproc    54.  2.100 / 54.  2.100
    Input #0, mp3, from 'http://media.blubrry.com/conlangery/content.blubrry.com/conlangery/Conlangery01.mp3':
     Metadata:
       track           : 1
       album           : Conlangery Podcast
       title           : Conlangery 01
       artist          : George Corley
       date            : 2011
     Duration: 00:44:58.08, start: 0.025057, bitrate: 128 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
       Metadata:
         encoder         : LAME3.98r
    Output #0, s16le, to 'pipe:0':
     Metadata:
       track           : 1
       album           : Conlangery Podcast
       title           : Conlangery 01
       artist          : George Corley
       date            : 2011
       encoder         : Lavf57.62.100
       Stream #0:0: Audio: pcm_s16le, 16000 Hz, mono, s16, 256 kb/s
       Metadata:
         encoder         : Lavc57.75.100 pcm_s16le
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    av_interleaved_write_frame(): Bad file descriptor
    Error writing trailer of pipe:0: Bad file descriptorsize=       1kB time=00:00:00.02 bitrate= 256.0kbits/s speed=95.2x    
    video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
    Conversion failed!
    Traceback (most recent call last):
     File "./PodcastTranscriber.py", line 206, in <module>
       PodcastTranscriber('http://conlangery.com/feed/',upload)()        
     File "./PodcastTranscriber.py", line 101, in __call__
       self.process(item)
     File "./PodcastTranscriber.py", line 136, in process
       (audio,errors)=mp3.run(stdout=subprocess.PIPE)
     File "/usr/local/lib/python2.7/site-packages/ffmpy.py", line 105, in run
       raise FFRuntimeError(self.cmd, self.process.returncode, out[0], out[1])
    ffmpy.FFRuntimeError: `ffmpeg -i http://media.blubrry.com/conlangery/content.blubrry.com/conlangery/Conlangery01.mp3 -f s16le -ac 1 -ar 16000 pipe:0` exited with status 1
    </module>

    The invoking code is

    def process(self,item):
       """Downloads the audio and transcribes it"""
       audio_url=None
       print item['title']
       for link in item.links:
           if link['rel']=='enclosure':
               audio_url=link['href']
       if audio_url is not None:
           pubDate=to_date(item.published_parsed)
           if self.lastUploadDate is None or pubDate>self.lastUploadDate:
               self.lastUploadDate=pubDate
           mp3=ffmpy.FFmpeg(inputs={audio_url:None},
                            outputs={'pipe:0':['-f','s16le','-ac','1','-ar','16000']})
           (audio,errors)=mp3.run(stdout=subprocess.PIPE)
           sphinx=subprocess.Popen(['java','-jar','transcriber.jar'],
                                   stdin=audio,
                                   stdout=subprocess.PIPE)
           wiki=threading.Thread(target=self.callback,args=(item,sphinx.stdout))
           wiki.start()
           #mp3.start()
           #mp3.join()
           sphinx.stdin.close()
           wiki.join()
           sphinx.wait()
  • ffmpeg live stream multiple outputs to same pipe (stdout Python)

    18 février 2017, par WobbaFetttttt

    So I am writing a stream ingest in Python with ffmpeg and want my Python script to receive the video and audio feeds separately without making a temporary file.

    I have tried these subprocess PIPE commands inspired by THIS BLOG and THIS FFMPEG TUTORIAL for Python integration and multiple ffmpeg outputs :

    from subprocess import Popen, PIPE

    stream = Popen([
       'ffmpeg',
       '-i', URL, '\\',

       '-f', 'image2pipe',
       '-pix_fmt', 'rgb24',
       '-vcodec', 'rawvideo', '-', '\\',

       '-f', 's16le',
       '-ac', '2',
       '-ar', '44100',
       '-vcodec', 'pcm_s16le', '-'
    ], stdout=PIPE, stderr=PIPE, bufsize=10**8)

    print 'ingesting stream'
    for i in range(300):
       video = stream.stdout.read(640*360*3)
       video = numpy.fromstring(video, dtype='uint8')
       video = video.reshape((360,640,3))

       stream.stdout.flush()

       audio = stream.stdout.read(2*44100*2/10)
       audio = numpy.fromstring(audio, dtype='int16')
       audio = audio.reshape((len(audio)/2, 2))

       stream.stdout.flush()

    stream.terminate()

    but this gives first pipe read seems to read no data :

    Traceback (most recent call last):
     File "test.py", line 63, in <module>
       video = video.reshape((360,640,3))
    ValueError: cannot reshape array of size 0 into shape (360,640,3)
    </module>

    I tried running each pipe individually and they work just fine

  • FFmpeg Live streaming Error : ffmpeg av_interleaved_write_frame broken pipe. Conversion Failed

    28 février 2017, par A Sahra

    I am trying to stream video live using ffmpeg. videos stream is coming from a camera over the network and there is bunch error that i got in initial part of doing this but here i am stacked with a error that is coming from ffmpeg where it says av_interleaved_write_frame() broken pipe,then at the end i get a message saying conversion failed ,when i want to capture the stream in any format it works like a charm but when it comes to streaming it gives the error.Why this is happening ?

    the command i am using to get the streaming is here :

    ffmpeg - i rtsp://10.63.191.250/aerostat http://10.20.1.142:8080/feed.ffm
    or
    ffmpeg - i rtsp://10.63.191.250/aerostat -acodec copy -vcodec copy http://10.20.1.142:8080/feed.ffm
    //with both the command i am getting the same error

    The ffmpeg out put is Here :

    [h264 @ 0x3965b40] decode_slice_header error
    [h264 @ 0x3965b40] no frame!
    [h264 @ 0x3965b40] non-existing PPS 0 referenced
    Last message repeated 1 times
    [h264 @ 0x3965b40] decode_slice_header error
    [h264 @ 0x3965b40] no frame!
    Input #0, rtsp, from 'rtsp://10.63.191.250/aerostat':
    Metadata:
    title : \Aerostat
    Duration: N/A, start: 63184.792467, bitrate: N/A
    Program 1
    Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 77 kb/s
    Stream #0:1: Video: h264 (Baseline) ([27][0][0][0] / 0x001B),     yuv420p(progressive), 656x368 [SAR 1:1 DAR 41:23], 29.97 fps, 29.97 tbr, 90k  tbn, 59.94 tbc
    [libvpx @ 0x397a360] v1.6.0
    Output #0, ffm, to 'http://10.20.1.142:8080/feed.ffm':
    Metadata:
    title : \Aerostat
    creation_time : now
    encoder : Lavf57.56.100
    Stream #0:0: Audio: vorbis (libvorbis), 22050 Hz, mono, fltp, 64 kb/s
    Metadata:
    encoder : Lavc57.64.101 libvorbis
    Stream #0:1: Video: vp8 (libvpx), yuv420p, 720x576 [SAR 164:115 DAR   41:23], q=10-42, 400 kb/s, 29.97 fps, 1000k tbn, 25 tbc
    Metadata:
    encoder : Lavc57.64.101 libvpx
    Side data:
    cpb: bitrate max/min/avg: 0/0/0 buffer size: 800000 vbv_delay: -1
    Stream mapping:
    Stream #0:0 -> #0:0 (aac (native) -> vorbis (libvorbis))
    Stream #0:1 -> #0:1 (h264 (native) -> vp8 (libvpx))
    Press [q] to stop, [?] for help
    av_interleaved_write_frame(): Broken pipe
    Last message repeated 6 times
    Error writing trailer of http://10.20.1.142:8080/feed.ffm: Broken pipeframe= 6 fps=0.0 q=0.0 Lsize= 52kB time=00:00:00.43 bitrate=  972.0kbits/s dup=5 drop=0 speed=0.778x
    video:43kB audio:3kB subtitle:0kB other streams:0kB global headers:4kB  muxing overhead: 13.661202%
    Conversion failed!

    Here is My FFserver.conf file :

    HTTPPort 8080 # Port to bind the server to
    HTTPBindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 10000 # Maximum bandwidth per client
    # set this high enough to exceed stream bitrate
    CustomLog -
    <feed> # This is the input feed where FFmpeg will send
    File ./feed.ffm # video stream.
    FileMaxSize 1G # Maximum file size for buffering video
    ACL allow 10.20.0.0 10.20.255.255 # Allowed IPs
    ACL allow 127.0.0.1
    ACL allow localhost
    </feed>
    <stream> # Output stream URL definition
    Feed feed.ffm # Feed from which to receive video
    Format webm
    # Audio settings
    AudioCodec vorbis
    Audi0oBitRate 64 # Audio bitrate
    # Video settings
    VideoCodec libvpx
    VideoSize 720x576 # Video resolution
    VideoFrameRate 25 # Video FPS
    AVOptionVideo flags +global_header # Parameters passed to encoder
    # (same as ffmpeg command-line parameters)
    AVOptionVideo cpu-used 0
    AVOptionVideo qmin 10
    AVOptionVideo qmax 42
    AVOptionVideo quality good
    AVOptionAudio flags +global_header
    PreRoll 15
    StartSendOnKey
    VideoBitRate 400 # Video bitrate
    </stream>
    <stream> # Server status URL
    Format status
    # Only allow local people to get the status
    ACL allow 127.0.0.1
    ACL allow 10.20.0.0 10.20.255.255
    </stream>
    <redirect> # Just an URL redirect for index
    # Redirect index.html to the appropriate site
    URL http://www.ffmpeg.org/
    </redirect>