Recherche avancée

Médias (1)

Mot : - Tags -/blender

Autres articles (97)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (6636)

  • Why can't I get a manually modified MPEG-4 extended box (chunk) size to work ?

    15 avril 2019, par Moshe Rubin

    Overview

    As part of a project to write an MPEG-4 (MP4) file parser, I need to understand how an extended box (or chunk) size is processed within an MP4 file. When I tried to manually simulate an MP4 file with an extended box size, media players report that the file is invalid.

    Technical Information

    Paraphrasing the MPEG-4 specification :

    An MP4 file is formed as a series of objects called ’boxes’. All data is contained in boxes, there is no other data within the file.

    Here is a screen capture of Section 4.2 : Object Structure, which describes the box header and its size and type fields :

    MPEG-4 Object Structure (part 1)

    enter image description here

    Most MP4 box headers contain two fields : a 32-bit compact box size and a 32-bit box type. The compact box size supports a box’s data up to 4 GB. Occasionally an MP4 box may have more data than that (e.g., a large video file). In this case, the compact box size is set to 1, and eight (8) octets are added immediately following the box type. This 64-bit number is known as the ’extended box size’, and supports a box’s size up to 2^64.

    To understand the extended box size better, I took a simple MP4 file and wanted to modify the moov/trak/mdia box to use the extended box size, rather than the compact size.

    Here is what the MP4 file looks like before modifying it. The three box headers are highlighted in RED :

    MP4 file before inserting an extended box size

    My plan was as follows :

    1. Modify the moov/trak/mdia box
      • In the moov/trak/mdia, insert eight (8) octets immediately following the box type (’mdia’). This will eventually be our extended box size.
      • Copy the compact box size to the newly-inserted extended box size, adding 8 to the size to compensate for the newly inserted octets. The size is inserted in big-endian order.
      • Set the compact size to 1.
    2. Modify the moov/trak box
      • Add 8 to the existing compact box size (to compensate for the eight octets added to mdia).
    3. Modify the moov box
      • Add 8 to the existing compact box size (again, to compensate for the eight octets in mdia)

    Here’s what the MP4 file looks like now, with the modified octets are in RED :

    MP4 file after inserting an extended box size

    What have we done ?

    We have told the MP4 parser/player to take the moov/trak/mdia box size from the extended field rather than the compact size field, and have increased all parent boxes by eight (8) to compensate for the newly-inserted extended box size in the mdia box.

    What’s the problem ?

    When I attempt to play the modified MP4 file I receive error messages from different media players :

    Windows Media Player

    Windows Movies & TV App

    Why do the media players see the modified file as invalid MP4 ?

    • Did I need to alter any other fields ?
    • Does the extended box size have to be greater than 2^32 ?
    • Can it be that only specific box types support extended box size (e.g., Media Data) ?
  • Swift Process Fails to Properly Send Metadata Args to FFMPEG

    30 avril 2019, par Ryan Stone

    I’m writing a Swift Process that concatenates a series of audio files using FFMPEG and libfdk_aac. The concatenation works, but when I pass metadata information through the process I get a Unrecognized option 'metadata artist="ff"' ... Option not found error.

    When debugging, if I use a breakpoint and print using e print(args.joined(separator: " ")) I’m able to take the exact output and paste it in the console, FFMPEG runs and doesn’t throw an error.

    I’m assuming there’s an oddity with how Swift process works, but even there I’ve tested and I’m stumped. I created a ruby script that took the args and looped over them and printed them and there is nothing given to the script that is unexpected. (Output below)

    Swift Process

    private func export() {
           guard let ffmpegPath = Bundle.main.path(forResource: "ffmpeg", ofType: "") else { return }


           var task = Process()
           task.launchPath = ffmpegPath

           let args: [String] = [
               "-i",
               #"concat:"\#(fileContents)""#,
               title(),
               artist(),
               narrator(),
               "-c:a",
               "libfdk_aac",
               "-vn",
               #"\#(exportPath)\#(exportFilename)"#
           ].compactMap { $0 }

           task.arguments = args

           var pipe = Pipe()
           setStdErrPipe(pipe: &pipe, task: &task)
           setTerminationNotification(task: task)

           task.launch()
       }

       func title() -> String? {
           guard metadata.titleText != "" else {
               return nil
           }
           return #"-metadata title="\#(metadata.titleText)""#
       }

       func artist() -> String? {
           guard metadata.authorText != "" else { return nil }
           return #"-metadata artist="\#(metadata.authorText)""#
       }

       func narrator() -> String? {
           guard metadata.narratorText != "" else { return nil }
           return #"-metadata album_artist="\#(metadata.narratorText)""#
       }

    Arg tester Output

    -i
    concat:"/Users/sharkmaul/Downloads/Bringing Up BÈbÈ/Bringing Up BÈbÈ-Part01.mp3|/Users/sharkmaul/Downloads/Bringing Up BÈbÈ/Bringing Up BÈbÈ-Part02.mp3"
    -metadata title="title"
    -metadata artist="author"
    -metadata album_artist="narrator"
    -c:a
    libfdk_aac
    -vn
    /Users/sharkmaul/Desktop/068F4F43-89EE-47F6-838D-7AD3E02E7F8A.m4a
  • Matlab VideoReader reading frames as green images or just not at all

    2 mai 2019, par Jordan

    I’m trying to read a video file and store the frames as a series of images. I’m using VideoReader but for some reason I’m having trouble. I want to store the frames of two videos encoded differently and measure the structural similarity and PSNR between the two on a frame-by-frame basis.

    Essentially I’ve three video files, an original (which reads fine), one compressed with VP9 using ffmpeg, and one compressed with H.624 using ffmpeg. The original video was originally just a set of frames merged into a .avi video using VirtualDub. The compressed videos are also .avi container.

    The VP9 video appeared to work fine but when I open the images using imshow() they appear to be just a solid green color. The video opens fine on VLC so I’m not sure what the problem is.

    The H.264 video doesn’t read at all. When it attempts to enter the "while hasFrame()" loop, it skips over it which leads to believe Matlab thinks the video frames aren’t there ? Again, this video opens fine in VLC and the three videos look almost identical.

    Anyone got any ideas why this is happening ? Is it to do with the way Matlab decodes the video or some parameters set by ffmpeg ?

    Original vs VP9 in Matlab

    Console output for ffmpeg - VP9

    Console output for ffmpeg - H264

    Main file :

    test_vid = 'vp9.avi';
    images = readVideos(test_vid);

    for i=1:length(images)

     % Convert from cells to matrices
     image1 = cell2mat(images(1,i));
     image2 = cell2mat(images(2,i));

     % Do stuff with the images here

     subplot(1,2,1);
     imshow(image1);
     subplot(1,2,2);
     imshow(image2);
    end

    ReadVideos() :

    function images = readVideos(test_video)

       % Video directories
       test_video_dir = strcat('src/', test_video);
       v_original = VideoReader('src/input.avi');
       v_test = VideoReader(test_video_dir);

       % Read original video
       i = 1;
       v_original.CurrentTime = 5;
       while hasFrame(v_original)
           frame = readFrame(v_original);
           originalImages{i} = frame;
           i = i + 1;
       end

       % Read test video
       i = 1;
       v_test.CurrentTime = 5;
       while hasFrame(v_test)
            frame = readFrame(v_test);
            testImages{i} = frame;
            i = i + 1;
       end

       images = cat(1, originalImages, testImages);
    end

    On a side note, is Matlab the best choice for the task or is there specialised software out there for doing this ?