Recherche avancée

Médias (91)

Autres articles (44)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4879)

  • Paperclip AV Transcoder not working on remote server

    16 juin 2016, par zreitano

    I am able to upload videos locally. The videos are processed using paperclip and all the meta data is saved correctly, as well. When I tried to upload a video using our remote server, I received the error :

    Av::UnableToDetect (Unable to detect any supported library)

    I have installed ffmpeg using LinuxBrew. It says everything is installed correctly (checking which brew and which ffmpeg, as well as checking if the gem is appropriately installed).

    When I have styling in my model for the video (which is what enables the meta information to be stored and to have control over how the video is uploaded) it doesn’t work remotely.

    has_attached_file :video, path: "/posts/:id/:style.:extension",
     :styles => {
       :medium => { :geometry => "493x877", :format => 'flv' },
       :thumb => { :geometry => "100x100#", :format => 'jpg', :time => 10 },
       # :mobile => {:geometry => "640X480", :format => 'mp4', :streaming => true}
     }, :processors => [:transcoder]

    However, when I remove this from my model and have :

    has_attached_file :video, path: "/posts/:id/:style.:extension"

    The video is uploaded to S3 (without the data or styling that I need).

    Any help would be greatly appreciated. I think AV is having trouble finding ffmpeg but I am not sure why or how to go about fixing it. Thanks in advance for any advice.

  • saving ffmpeg output in a file field in django using tempfiles

    27 janvier 2017, par StarLord

    I am trying to extract audio from video when uploaded, and store it in a different model.

    this is the task code :

    def set_metadata(input_file, video_id):
       """
       Takes the file path and video id, sets the metadata and audio
       :param input_file: file url or file path
       :param video_id: video id of the file
       :return: True
       """
       # extract metadata
       command = [FFPROBE_BIN,
                  '-v', 'quiet',
                  '-print_format', 'json',
                  '-show_format',
                  '-show_streams',
                  '-select_streams', 'v:0',
                  input_file]
       output = sp.check_output(command)
       output = output.decode('utf-8')
       metadata_output = json.loads(output)
       video_instance = Video.objects.get(pk=video_id)
       stream = metadata_output['streams'][0]
       tot_frames_junk = int(stream['avg_frame_rate'].split("/")[0])
       tot_time_junk = int(stream['avg_frame_rate'].split("/")[1])
       # update the video model with newly acquired metadata
       video_instance.width = stream['width']
       video_instance.height = stream['height']
       video_instance.frame_rate = tot_frames_junk/tot_time_junk
       video_instance.duration = stream['duration']
       video_instance.total_frames = stream['nb_frames']
       video_instance.video_codec = stream['codec_name']
       video_instance.save()

       # extract audio
       tmpfile = temp.NamedTemporaryFile(suffix='.mp2')
       command = ['ffmpeg',
                  '-y',
                  '-i', input_file,
                  '-loglevel', 'quiet',
                  '-acodec', 'copy',
                  tmpfile.name]
       sp.check_output(command)
       audio_obj = Audio.objects.create(title='awesome', audio=tmpfile)
       audio_obj.save()

    I am passing video object id and the file path to the method. The file path is a url from azure storage.

    The part where I am processing for metadata, it works and the video object gets updated. But the audio model is not created.

    It throws this error :

    AttributeError("'_io.BufferedRandom' object has no attribute '_committed'",)

    at command :

    audio_obj = Audio.objects.create(title='awesome', audio=tmpfile)

    What am I doing wrong with the temp file.

  • ffprobe : how do I get the time zone of creation date ?

    29 août 2022, par Paolo Benvenuto

    I have a video made with a canon camera (actually a PowerShow G5Xm2), I want to extract the creation date metadata, and I found that I can see it with :

    


    $ ffprobe -i myfile.MP4 -show_entries stream_tags
[.....]
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myfile.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1CAEP
    make            : 
    make-eng        : 
    model           : 
    model-eng       : 
    creation_time   : 2022-08-28T15:25:09.000000Z
  Duration: 00:00:53.96, start: 0.000000, bitrate: 29939 kb/s
  Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080, 29639 kb/s, 25 fps, 25 tbr, 25k tbn, 50k tbc (default)
    Metadata:
      creation_time   : 2022-08-28T15:25:09.000000Z
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)
    Metadata:
      creation_time   : 2022-08-28T15:25:09.000000Z
      vendor_id       : [0][0][0][0]
[STREAM]
TAG:creation_time=2022-08-28T15:25:09.000000Z
TAG:language=eng
TAG:vendor_id=[0][0][0][0]
[/STREAM]
[STREAM]
TAG:creation_time=2022-08-28T15:25:09.000000Z
TAG:language=eng
TAG:vendor_id=[0][0][0][0]
[/STREAM]


    


    The creation date in in UTC, and it has the format "%Y-%m-%dT%H :%M :%S.%fZ". The camera has the info of the time zone, and actually it converted the local time to UTC time, so I suppose that the MP4 should hide somewhere the time zone info.

    


    How do I see it ?