Recherche avancée

Médias (0)

Mot : - Tags -/médias

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

Autres articles (35)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

Sur d’autres sites (4389)

  • ffmpeg cannot write single-channel float32 exr image ?

    24 janvier 2024, par Hugues

    I am trying to use ffmpeg to write an EXR image containing a single channel of float32 values.
Here is the code :

    


    def test_ffmpeg_float_gray_to_exr():
  import numpy as np
  import subprocess

  array1 = np.array([[0.1, 0.2], [0.4, 0.7]], np.float32)  # Single-channel 2x2 image.
  array1.tofile('temp1.raw')
  ffmpeg_command_write = [
      'ffmpeg', '-hide_banner',
      '-f', 'rawvideo',
      '-pix_fmt', 'grayf32le',
      '-s', '2x2',
      '-i', 'temp1.raw',
      '-pix_fmt', 'grayf32le',
      '-compression', 'zip1',  # ['none', 'rle', 'zip1', zip16']
      '-format', 'float',  # ['half', 'float']
      '-vcodec', 'exr',
      '-y', 'output.exr',
  ]
  subprocess.run(ffmpeg_command_write, check=True)

  ffmpeg_command_read = [
      'ffmpeg', '-hide_banner',
      '-i', 'output.exr',
      '-f', 'image2pipe',
      '-pix_fmt', 'grayf32le',
      '-y', 'temp2.raw',
  ]
  subprocess.run(ffmpeg_command_read, check=True)
  array2 = np.fromfile('temp2.raw', dtype=np.float32).reshape(2, 2)
  print(array2)

test_ffmpeg_float_gray_to_exr()


    


    When writing, ffmpeg gives the message Incompatible pixel format 'grayf32le' for codec 'exr', auto-selecting format 'gbrpf32le' and then reading back the values gives incorrect results.

    


    If I create a single-channel exr image (using OpenCV), it does read correctly using the ffmpeg_command_read command in the above code, so only the writing part is broken.

    


    And, I am able to create 3-channel (gbrpf32le) and 4-channel (gbrapf32le) exr images using ffmpeg and variants of the above code. Just not 1-channel.

    


    The source code https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/exrenc.c suggests that it should be possible to encode grayf32le (but I'm no expert).

    


    Am I missing some command-line option to enable this ?

    


  • Serving a single JPEG using ffserver

    4 mai 2016, par Magnus

    I have a setup where a local application writes a sequence of JPEG images into a FIFO (Unix named pipe on Linux). On the other end I have ffmpeg picking up the sequence and passing it into an instance of ffserver :

    % ffmpeg -i fifo.mjpeg http://127.0.0.1:8090/feed.ffm

    The configuration for ffserver looks like this :

    HTTPPort 8090
    HTTPBindAddress 0.0.0.0
    MaxHTTPConnections 20
    MaxClients 10
    MaxBandwidth 1000

    <feed>
     File /tmp/feed.ffm
     FileMaxSize 200k

     ACL allow 127.0.0.1
    </feed>

    <stream>
     Format mpjpeg
     Feed feed.ffm

     VideoSize 960x600
     VideoFrameRate 2
     VideoIntraOnly
     Strict -1

     NoAudio
     NoDefaults
    </stream>

    This works fine, I can point my web browser to http://127.0.0.1:8090/stream.mpjpeg and see the video.

    Now I want to add a way to download a single JPEG (I think of it as snapshot of the video). I added the following to the ffserver configuration :

    <stream>
     Format singlejpeg
     Feed feed.ffm

     VideoSize 960x600
     VideoFrameRate 2
     VideoIntraOnly
     Strict -1

     NoAudio
     NoDefaults
    </stream>

    That only sort of works. Sure, if I point my browser to http://127.0.0.1:8090/image.jpg I do so a still picture from the video, but the browser never stops loading !

    Indeed, if I run wget http://127.0.0.1:8090/image.jpg I see that the MIME type is good (image/jpeg), but there seems to be no end to the image.

    Am I missing something in my configuration that makes ffserver sending more than a single image ?

    I should add I’ve tried this setup on both 2.8.6 (Debian Jessie, package comes from jessie-backports) and 3.0 (Arch Linux), with the same result in both cases.

  • Not able to concatenate encrypted .ts segments into single .ts segment using FFMPEG encoder

    19 juillet 2017, par Shivam657

    We are trying to concatenate segments encrypted with AES-128 bit encryption keys into a single .ts segment by ffmpeg encoder.

    Command used to concatenate :-

    ffmpeg -i "concat:segment_namev4_0.ts|segment_name_v4_1.ts" -c copy  output.ts

    But unfortunately, we are getting the following error :

    [concat @ 0x7fe02f800000] Impossible to open ’/Users/userName/Documents/uploads/segment_name_v4_aef7e05a-dfb2-4d88-a007-8be9ebad9600/./segment_name_v4_0.ts’
    /dev/fd/63 : Invalid data found when processing input

    We also tried using cat command,
    cat sample_0_av.ts sample_1_av.ts sample_2_av.ts sample_3_av.ts > alltest.ts

    though this concatenated the file, but when we tried to stream the file using the same AES-128 bit key, the video is stopping at merging points.

    Any advice/suggestions are most welcome :)