Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (77)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (4709)

  • UIImage setImage crash

    13 juin 2014, par Arton

    I implemented a video player with ffmpeg. Each frame is decoded successfully and can be saved to a valid jpg file and can be show in UIImageView when running in emulator. However, the memory is unbounded growing when I run my app in emulator. Moreover, the app will crash after excuting p_diaplayNextFrame 2 times when running on device. If I comment self.imageView.image = frame;, memory is not leaked and app is not crashed in emulator or on device.

    -(void)p_displayNextFrame
    {
       ZCVFrameSec *frameSec = [video getNextVideoFrameSec];
       UIImage *frame = [frameSec toUIImage];
       static int fi = 0;

       NSAssert( [NSThread isMainThread], @"Fatal error: must be main thread" );
       NSString *fileName = [Utilities documentsPath:[NSString stringWithFormat:@"image%06d.jpg",fi++]];
       NSLog(@"p_displayNextFrame write image file: %@",fileName);

       // frame is saved successfully as jpg, I can view it
       [UIImageJPEGRepresentation(frame, 0.7) writeToFile:fileName atomically:YES];

       // leak(but not crash) in emulator, crash on device
       self.imageView.image = frame;

       double delayInSeconds = 0.05;//1/30.0;
       dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
       dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
           [self p_displayNextFrame];
       });
    }

    ZCVFrameSec’s toUIImage

    - (UIImage*) toUIImage
    {
       CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault;
       CFDataRef data = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, [self.data bytes], self.width * self.height * 3,kCFAllocatorNull);
       NSAssert( [self.data length] == self.width * self.height * 3,
                @"Fatal error: data length:%d, width:%d, height:%d, mul3=%d",
                [self.data length],
                self.width, self.height, self.width * self.height * 3 );

       CGDataProviderRef provider = CGDataProviderCreateWithCFData(data);
       CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
       CGImageRef cgImage = CGImageCreate(self.width,
                                          self.height,
                                          8,
                                          24,
                                          3 * self.width,
                                          colorSpace,
                                          bitmapInfo,
                                          provider,
                                          NULL,
                                          NO,
                                          kCGRenderingIntentDefault);
       UIImage *image = [UIImage imageWithCGImage:cgImage];
       CGImageRelease(cgImage);
       CGColorSpaceRelease(colorSpace);
       CGDataProviderRelease(provider);
       CFRelease(data);

       return image;
    }

    crash info :

    vImage`__vConvert_RGB888toBGRA8888_block_invoke98:
    0x2d72aeb0:  push   {r4, r5, r6, r7, lr}
    0x2d72aeb2:  add    r7, sp, #0xc
    0x2d72aeb4:  push.w {r8, r10}
    0x2d72aeb8:  ldr    r2, [r0, #0x14]
    0x2d72aeba:  ldr    r2, [r2, #0x4]
    0x2d72aebc:  ldr    r2, [r2, #0x10]
    0x2d72aebe:  cmp    r2, #0x0
    0x2d72aec0:  beq.w  0x2d72b076                ; __vConvert_RGB888toBGRA8888_block_invoke98 + 454
    0x2d72aec4:  vldr   d16, [pc, #440]
    0x2d72aec8:  vmov.i32 q10, #0xff000000
    0x2d72aecc:  lsl.w  r9, r1, #0x3
    0x2d72aed0:  vldr   d18, [pc, #436]
    0x2d72aed4:  mov.w  r12, #0x0
    0x2d72aed8:  ldr.w  r8, [r0, #24]
    0x2d72aedc:  add.w  r5, r0, #0x1c
    0x2d72aee0:  add.w  r6, r12, r9
    0x2d72aee4:  ldm    r5, {r2, r4, r5}
    0x2d72aee6:  ldr    r3, [r0, #0x28]
    0x2d72aee8:  ldr    r1, [r0, #0x2c]
    0x2d72aeea:  mla    r2, r2, r6, r8
    0x2d72aeee:  mla    lr, r5, r6, r4
    0x2d72aef2:  mla    r3, r1, r6, r3
    0x2d72aef6:  tst.w  r3, #0xf
    0x2d72aefa:  bne    0x2d72af44                ; __vConvert_RGB888toBGRA8888_block_invoke98 + 148
    0x2d72aefc:  tst.w  r2, #0xf
    0x2d72af00:  bne    0x2d72af80                ; __vConvert_RGB888toBGRA8888_block_invoke98 + 208
    0x2d72af02:  ldr    r4, [r0, #0x30]
    0x2d72af04:  movs   r1, #0x0
    0x2d72af06:  tst.w  lr, #0xf
    0x2d72af0a:  bne    0x2d72afbc                ; __vConvert_RGB888toBGRA8888_block_invoke98 + 268
    0x2d72af0c:  cmp    r4, #0x10
    0x2d72af0e:  blo    0x2d72aff2                ; __vConvert_RGB888toBGRA8888_block_invoke98 + 322
    0x2d72af10:  ldr    r4, [r0, #0x34]
    0x2d72af12:  vld3.8 {d0, d2, d4}, [r2]!
    Thread 1: EXC_BAD_ACCESS (code=1,address=0x7403000)

    Any hint is appreciated !!!

  • FFMPEG Error Handling Not Working

    23 mars 2017, par Waverunner

    I’m fairly new to batch files and trying to create a Windows script that automatically converts all files in the extensions list I provide to MP4 and log the successes and failures. The problem I’m running into is that some of the videos are failing with zero byte outputs and even though there’s two levels of error handling so the originals don’t get deleted, they aren’t working and the originals get deleted regardless if the conversions succeed or not.

    The two protections are :

    (1) FFMPEG - abort_on empty_output option

    (2) IF/ELSE loop that checks for zero-size files

    Any ideas for better error handling would be appreciated.

    :: Name:     MKV2MP4.cmd
    :: Purpose:  Automatically converts non-MP4 video files to MP4 either by stream copy or by reencoding.
    :: Revision: March 2017 - Initial version

    :: Variables
    :: %%L = List of Extensions
    :: %%F = Files to be converted
    :: %%N = New file

    @echo OFF
    CLS
    setlocal
    echo This script automatically converts non-MP4 video files to MP4 either by stream copy or by reencoding.
    echo.
    echo Changing to data directory...
    Z:
    cd Z:\Users\Todd\
    echo.

    FOR /F "delims=*" %%L IN (Z:\Logs\Extensions.txt) DO (
    echo Collecting %%L files...
    dir /b /s *.%%L > Z:\Logs\%%L.txt
    )
    echo.
    echo File collection complete.
    echo.

    FOR /F "delims=*" %%L in (Z:\Logs\Extensions.txt) DO (
    echo Working on %%L files...
    echo.

    FOR /F "delims=*" %%F in (Z:\Logs\%%L.txt) DO (
    echo Converting "%%F"
    echo.
    ffmpeg.exe -y -i "%%F" -abort_on empty_output -aspect 16:9 -c:v copy -c:a copy "%%~dpnF.mp4" || ffmpeg.exe -y -i "%%F" -abort_on empty_output -aspect 16:9 -c:v libx265 -c:a copy "%%~dpnF.mp4"
    echo.
    set N="%%~dpnF.mp4"

    IF %%~zN==0 (
    echo Conversion failed!  Skipping file.
    echo Adding log entry...
    echo %time% - Failed - "%%F" >> "Z:\Logs\%date:~-4,4%%date:~-10,2%%date:~-7,2% - %%L.txt"
    ) ELSE (
    echo Conversion successful!  Deleting old file.
    echo Deleting "%%F"
    del "%%F" /F
    echo Adding log entry...
    echo %time% - Successful - "%%F" >> "Z:\Logs\%date:~-4,4%%date:~-10,2%%date:~-7,2% - %%L.txt"  
    )

    echo.
    )

    echo %%L files completed.
    echo. Cleaning up...
    del %%L /F /S
    )

    echo Job completed.  Exiting..
  • Firefox says some files converted from mkv to mp4 in ffmpeg are corrupt

    14 janvier 2018, par EpicKnarvik97

    I have recently converted many videos for web playback, but all videos from one "series" all show up in firefox as "Video can’t be played because the file is corrupt." (They work for google chrome and VLC. Not for firefox or edge.) All files have been converted with this command :

    ffmpeg -i "file.mkv" -vcodec h264 -movflags +faststart -map 0 -vf subtitles="file.mkv" "file.mp4"

    ffmpeg output from one of the non-working files :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Episode_7.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.3.100
     Duration: 00:23:53.52, start: -0.001333, bitrate: 1900 kb/s
       Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1920x1080 [SAR 1:1 DAR 16:9], 1763 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 130 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    ffmpeg output from a working file :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Episode_7.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.3.100
     Duration: 00:23:40.06, start: 0.000000, bitrate: 1848 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1710 kb/s, 23.81 fps, 23.81 tbr, 16k tbn, 47.62 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(jpn): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 131 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    Of a collection of over 100 files, only 12 episodes of a single series show up as corrupted in firefox. I see some differences in the information about the two files, but I don’t know why one file works and the other does not. What do I need to tell ffmpeg to make the videos playable in firefox ?