Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (33)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

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

Sur d’autres sites (4362)

  • How to change mjpeg to yuyv422 from a webcam to a v4l2loopback ?

    3 janvier 2020, par Dev Null

    Backstory : One livestreaming site I use isn’t smart enough to detect the capabilities of my webcam (Logitech Brio, 4k), and instead just uses the default frames per second settings, which is 5fps.

    (full solution walk-through in the answer)

    The best solution I could think of (besides changing livestream providers) was to create a loopback virtual webcam using v4l2loopback that I could force to have the exact settings I wanted to use on that livestream site.

    For the brio, the higher frame rates come with mjpeg, not the default yuyv.

    Problem 1 :

    I could easily read mjpeg, but unfortunately kept banging my head against the wall because v4l2loopback evidently only wanted yuyv.

    I tried things like :

    ffmpeg -f v4l2              \
          -input_format mjpeg  \
          -framerate 30        \
          -video_size 1280x720 \
          -i /dev/video0       \
          -vcodec copy         \
          -f v4l2 /dev/video6

    and

    ffmpeg -f v4l2              \
          -input_format mjpeg  \
          -framerate 30        \
          -video_size 1280x720 \
          -i /dev/video0       \
          -vcodec yuyv422      \ # this line changed (even tried "copy")
          -f v4l2 /dev/video6

    But they wouldn’t work. I got errors like :

    Unknown V4L2 pixel format equivalent for yuvj422p

    and

    ...deprecated pixel format used, make sure you did set range correctly...

    ...V4L2 output device supports only a single raw video stream...

    Eventually I got this to work :

    ffmpeg -f v4l2              \
          -input_format mjpeg  \
          -framerate 30        \
          -video_size 1280x720 \
          -i /dev/video0       \
          -pix_fmt yuyv422     \ # The winning entry
          -f v4l2 /dev/video6

    Problem 2

    The next problem was getting chrome to see the virtual webcam. It worked correctly with guvcview, and on firefox I could use webcam testing sites and it would pick the virtual camera up without a problem.

    Turns out google, in it’s overly-protective nature (while it’s siphoning off all our data, btw), doesn’t want to use webcams that can be read and written to.

    So when starting v4l2loopback you have to tell it to announce that it’s "read only" to consumers like chrome.

    Here’s the exact modprobe I use that works :

    sudo modprobe v4l2loopback devices=1 exclusive_caps=1
  • Last subprocess call not working in concatenation code with FFMPEG. How should I go about fixing this ?

    28 novembre 2019, par S1mple
    clips = []

    #generates a list of mp4 files in a folder
    def clipFinder(CurrentDir, fileType):
       clips.clear()
       for r,d,f in os.walk(CurrentDir):
           for file in f:
               if fileType in file:
                   clips.append(r+file)
       random.shuffle(clips)

    #removes all files that have the string 'vod' in them as they cause problems during concatenation
    def removeVods(r):
       for f in clips:
           if 'vod' in clips:
               os.remove(r+f)

    #generates a string using the clips list to insert into the ffmpeg command
    def clipString():
       string = 'intermediate'
       clipList = []
       clipNum = 1
       for f in clips:
           clipList.append(string+str(clipNum)+'.ts'+'|')
           clipNum+=1
       string1 = ''.join(clipList)
       string2 = string1[0:len(string1)-1]
       return string2

    #concatenates the mp4 files in the clipString
    def concatFiles():
       clipFinder('***', '.mp4')
       removeVods('***')
       i = 0
       intermediates = []
       for f in clips:
           subprocess.call(['***', '-i', clips[i], '-c', 'copy', '-bsf:v', 'h264_mp4toannexb', '-f', 'mpegts', 'intermediate'+ str(i+1) +'.ts'])
           i += 1
       clipsLength = len(clips)
       subprocess.call['***', '-i', '"concat:' + clipString() + '"', '-c', 'copy', '-bsf:a
       aac_adtstoasc', 'output.mp4']

    I am trying to make a clip concatenator, but the last subprocess call won’t run and gives me no error. When I run the script the first FFmpeg call works fine and gives me my intermediate mp4 files, however, the second command, which works when I run it in terminal, does not work when I run it from python using subprocess.call.

    Problematic code :

    subprocess.call(['***', '-i', '"concat:' + clipString() + '"', '-c', 'copy', '-bsf:a aac_adtstoasc', 'output.mp4'])

    all places with * were paths such as : /davidscomputer/bin/ffmpeg/

  • TypeError : 'function' object is not subscriptable Python with ffmpeg

    25 novembre 2019, par S1mple
    clips = []

    def clipFinder(CurrentDir, fileType):
       clips.clear()
       for r,d,f in os.walk(CurrentDir):
           for file in f:
               if fileType in file:
                   clips.append(r+file)
       random.shuffle(clips)

    def removeVods(r):
       for f in clips:
           if 'vod' in clips:
               os.remove(r+f)

    def clipString():
       string = 'intermediate'
       clipList = []
       clipNum = 1
       for f in clips:
           clipList.append(string+str(clipNum)+'.ts'+'|')
           clipNum+=1
       string1 = ''.join(clipList)
       string2 = string1[0:len(string1)-1]
       return string2

    def concatFiles():
       clipFinder('***', '.mp4')
       removeVods('***')
       i = 0
       intermediates = []
       for f in clips:
           subprocess.call(['***', '-i', clips[i], '-c', 'copy', '-bsf:v', 'h264_mp4toannexb', '-f', 'mpegts', 'intermediate'+ str(i+1) +'.ts'])
           i += 1
       clipsLength = len(clips)
       subprocess.call['***', '-i', '"concat:' + clipString() + '"', '-c', 'copy', '-bsf:a
       aac_adtstoasc', 'output.mp4']

    I am trying to make a clip concatenator, but the last subprocess call won’t run and gives me the error shown in the question.

    Problematic code :

    subprocess.call(['***', '-i', '"concat:' + clipString() + '"', '-c', 'copy', '-bsf:a aac_adtstoasc', 'output.mp4'])

    all places with * were paths such as :
    /davidscomputer/bin/ffmpeg/