Recherche avancée

Médias (91)

Autres articles (107)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (11932)

  • Best ffmpeg options for creating TikTok-like app ? [closed]

    27 août 2022, par nickcoding

    My app is essentially vertical videos, so I'd like the videos to more or less be cropped to that dimension (especially in the case they are 'landscape mode' videos. In the below picture, if the video is that horizontal black rectangle, we should just crop the video to that dimension of the phone (the red vertical rectangle). I've tried messing around with aspect ratios, but can't seem to get it to work right (where the video is essentially cropped to the correct aspect ratio), but not necessarily hard-coding the dimensions (this would look bad on different size devices).

    


    I'm using this module : https://www.npmjs.com/package/fluent-ffmpeg

    


    How should I do this ?

    


    https://i.stack.imgur.com/bb8qR.png

    


    var ffmpeg = require('fluent-ffmpeg');

  ffmpeg('./original.mp4')
    .fps(25)
    .videoCodec('libx264')
    // here, I've tried .withAspectRatio('16:9') and playing around with .size(), but that seems to do nothing.
    .save('./new.mp4');


    


  • ffmpeg how to add pcm codec tag to output

    27 septembre 2021, par Alex

    In Python script I want to convert bytes from ogg to wav without coping any data on hard disk. I do it in such a way :

    


    args = (
        ffmpeg
        .input('pipe:')
        .output('pipe:', format='s16le', acodec='pcm_s16le')
        .get_args()
       )
p = subprocess.Popen(['ffmpeg'] + args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
wav = p.communicate(input=bindata)[0]


    


    it works, but produce result different from what ffmpeg -i sample.ogg sample.wav does. The difference can be found in ffmpeg's otput in Metadata section :

    


    ffmpeg -i sample.ogg sample.wav

    


    Metadata:
    ...
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
    ...


    


    Python

    


    Metadata:
    ...
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    ...


    


    So, I wonder, how to add this ([1][0][0][0] / 0x0001) tag to Python variant

    


  • Opening video from file using OpenCV in Python

    7 septembre 2022, par Noise in the street

    I am trying to use OpenCV2 with my Conda environment for Python 2.7.

    



    My installation was basically the same as what was described in 
this question.

    



    I retrieved OpenCV like so :

    



    conda install --channel https://conda.anaconda.org/menpo opencv3


    



    I can import the library cv2 and print the version, which is 3.1.0. So far so good. I can even load an image and display it :

    



    import cv2

img = cv2.imread('desertfloor.jpg')
cv2.imshow('foo',img)
cv2.waitKey(0)
cv2.destroyAllWindows()


    



    This works just fine. But when I go to load a video in the same directory :

    



    vid = cv2.VideoCapture('bbb.avi') # Big Buck Bunny
returnval,frame = vid.read()
print returnval


    



    The returned value is False, which tells me that the frame wasn't returned correctly. When I check vid.isOpened(), it is False as well. Since it doesn't return an error, it's really hard to tell what's going on. I've heard that ffmpeg can cause some issues if it's not installed properly (whatever that means), but I can't tell if that's what's going on here.

    



    Can anyone tell me why the video isn't opening properly ?