Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (111)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (7403)

  • ffmpeg to generate dash and HLS - best practise

    8 septembre 2017, par LaborC

    Looking for the correct way to encode a given input video in multiple bitrates and then package it for dash and HLS. I thought this is a basic task, but for me it was quite a challenge. So the way I do it is as follows :

    First I split my video (mp4) into video and audio (I encode the audio, because I need to make sure that the output codec is aac, which is a requirement for web I think).

    ffmpeg -c:v copy -an video_na.mp4 -i source_input.mp4
    ffmpeg -c:a aac -ac 2 -async 1 -vn audio.mp4 -i source_input.mp4

    Then I encode the video with the following commands :

       ffmpeg.exe -i video_na.mp4 -an -c:v libx264 -crf 18 \
    -preset fast -profile:v high -level 4.2 -b:v 2000k -minrate 2000k \
    -maxrate 2000k -bufsize 4000k -g 96 -keyint_min 96 -sc_threshold 0 \
    -filter:v "scale='trunc(oh*a/2)*2:576'" -movflags +faststart \
    -pix_fmt yuv420p -threads 4 -f mp4 video-2000k.mp4

       ffmpeg.exe -i video_na.mp4 -an -c:v libx264 -crf 18 \
    -preset fast -profile:v high -level 4.2 -b:v 1500k -minrate 1500k \
    -maxrate 1500k -bufsize 3000k -g 96 -keyint_min 96 -sc_threshold 0 \
    -filter:v "scale='trunc(oh*a/2)*2:480'" -movflags +faststart \
    -pix_fmt yuv420p -threads 4 -f mp4 video-1500k.mp4

    After that I fragment the videos (I used the parameter —timescale 10000 but then the result was out of sync).
    Sidenote : the -g parameter is 4 times 24 (frames). this is important because the fragmentation is 4000 (4 seconds)

    mp4fragment --fragment-duration 4000 video-2000k.mp4 \
    video-2000k-f.mp4

    mp4fragment --fragment-duration 4000 video-1500k.mp4 \
    video-1500k-f.mp4

    And finally package everything together again for dash (I used to use —use-segment-timeline but then again the result was out-of-sync).
    I use mp4dash and not mp4box because I want to be able to encrypt everything later on for DRM.

    mp4dash --media-prefix=out  \
         video-2000k-f.mp4  \
         video-1500k-f.mp4  \
        --out dash

    The result works in Firefox, Chrome, IE Edge via a webserver and via Cloudfront AWS Streaming also on older browsers.

    So for me there are still 2 tasks to accomplish.
    First I need to generate a HLS package for Apple Phone, IPad Users.
    And second : I need to encrypt everything.

    So far my HLS command is :

    ffmpeg -y -loglevel info ^
           -i video-2000k.mp4 \
           -i video-1500k.mp4 \
           -i audio.mp4 \
           -profile:v baseline -start_number 0 -hls_time 10 \
           -flags -global_header -hls_list_size 0 -f hls hls/master.m3u8

    This basically works, but generates only 1 bandwith without the posibility of multi-streams.
    I am not certain about that statement, but it looks that way.
    Has anyone an idea on what I am doing wrong ?

  • mpegvideo : drop support for real (non-emulated) edges

    20 décembre 2013, par Anton Khirnov
    mpegvideo : drop support for real (non-emulated) edges
    

    Several decoders disable those anyway and they are not measurably faster
    on x86. They might be somewhat faster on other platforms due to missing
    emu edge SIMD, but the gain is not large enough (and those decoders
    relevant enough) to justify the added complexity.

    • [DH] libavcodec/mpegvideo.c
    • [DH] libavcodec/mpegvideo.h
    • [DH] libavcodec/mpegvideo_enc.c
    • [DH] libavcodec/mpegvideo_motion.c
    • [DH] libavcodec/mss2.c
    • [DH] libavcodec/rv10.c
    • [DH] libavcodec/rv34.c
    • [DH] libavcodec/svq3.c
    • [DH] libavcodec/vc1dec.c
    • [DH] libavcodec/wmv2.c
  • FFmpeg iOS -> output file is invalid

    15 juillet 2016, par Vive

    I’m using following library to convert mkv to mp4 : https://github.com/SterlingOnLoop/FFmpegWrapper.

    - (void)convertUsingFFmpegWrapper {
       NSString *mp4Extension = @"mp4";
       NSString *mkvExtension = @"mkv";

       NSString *videoName = @"file1";
    //    NSString *videoName = @"file2";

       NSString *mkvVideoFilePath = [[NSBundle mainBundle] pathForResource:videoName ofType:mkvExtension];
       NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
       NSString *documentsDirectory = paths[0];
       NSString *mp4VideoFilePath = [NSString stringWithFormat:@"%@/%@.%@", documentsDirectory, videoName, mp4Extension];

       FFmpegWrapper *ffmpegWrapper = [[FFmpegWrapper alloc] init];
       NSDictionary *options = @{kFFmpegInputFormatKey: mkvExtension, kFFmpegOutputFormatKey: mp4Extension};
       [ffmpegWrapper convertInputPath:mkvVideoFilePath outputPath:mp4VideoFilePath options:options progressBlock:nil completionBlock:^(BOOL success, NSError *error) {
           if (success && !error) {
               // delete mp4 file
           } else if (error) {
               NSLog(@"Error during .MKV -> .MP4 conversion occured: %@", error.localizedDescription);
           } else {
               NSLog(@"Unknown error during .MKV -> .MP4 conversion occured.");
           }
       }];
    }

    Here are the values from LLDB about the automatically detected codec types :

    (lldb) po inputStream.codecName
    aac

    (lldb) po outputStream.codecName
    aac

    I should mention here, that originally the file is generated on Linux with following codecs : vaapiencode_h264 for video and faac for sound.

    The issue is that the file simply does not work. I get huge amount of logs in the console, where most important is :

    [aac @ 0x7f7f65019200] Format aac detected only with low score of 1, misdetection possible!

    Inside the library, the following function is used :

    int streamInfoValue = avformat_find_stream_info(inputFormatContext, NULL);

    And exactly this line does the whole mess with the logs. Obviously, without this line I receive an error with invalid argument.

    When that line is turned on, the .mp4 file is generated. It lasts > 5 minutes, while input file is 11 seconds long. It cannot be played using VLC on my mac (seems to be broken). I get following errors (I’m pasting few of them, full track can be found here, it’s too long to quote it here) :

    [aac @ 0x7ff07c00b000] More than one AAC RDB per ADTS frame is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    [aac @ 0x7ff07c00b000] channel element 0.0 is not allocated
    [aac @ 0x7ff07c00b000] Sample rate index in program config element does not match the sample rate index configured by the container.
    [aac @ 0x7ff07c00b000] Inconsistent channel configuration.
    [aac @ 0x7ff07c00b000] get_buffer() failed
    [aac @ 0x7ff07c00b000] channel element 3.10 is not allocated
    [aac @ 0x7ff07c00b000] Reserved bit set.
    [aac @ 0x7ff07c00b000] invalid band type
    [aac @ 0x7ff07c00b000] Number of scalefactor bands in group (50) exceeds limit (41).
    [aac @ 0x7ff07c00b000] Reserved bit set.
    [aac @ 0x7ff07c00b000] Number of bands (7) exceeds limit (4).
    [aac @ 0x7ff07c00b000] Reserved bit set.
    [aac @ 0x7ff07c00b000] Dependent coupling is not supported together with LTP

    Any idea how to simply convert mkv to mp4 ? I don’t have any idea why the errors occurs. I’d claim that the file is not aac, but the linux uses this encoding, so it should be valid.