Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (62)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (9490)

  • Fastest Way to Compress Video Size Using Library or Algo

    3 août 2016, par Muhammd Hassan

    I’m trying to compress high quality video into less size and I’m able to reduce the size of video that I’ve compressed using the following objective-c code :

    - (BOOL)convertMovieToMP4:(NSString ) originalMovPath andStoragePath:(NSString ) compMovPath
           {
               NSURL *tmpSourceUrl = [NSURL fileURLWithPath:originalMovPath];

               compMovPath = [compMovPath stringByReplacingOccurrencesOfString:[compMovPath pathExtension] withString:@"mp4"];
               NSURL *tmpDestUrl = [NSURL fileURLWithPath:compMovPath];

               AVURLAsset* videoAsset = [[AVURLAsset alloc]initWithURL:tmpSourceUrl options:nil];
               AVMutableComposition* mixComposition = [AVMutableComposition composition];

               AVMutableCompositionTrack *compositionVideoTrack = [mixComposition addMutableTrackWithMediaType:AVMediaTypeVideo  preferredTrackID:kCMPersistentTrackID_Invalid];

               AVAssetTrack *clipVideoTrack = [[videoAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
               [compositionVideoTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, videoAsset.duration)
                                              ofTrack:clipVideoTrack
                                               atTime:kCMTimeZero error:nil];

               [compositionVideoTrack setPreferredTransform:[[[videoAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] preferredTransform]];

               CGSize videoSize = [[[videoAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] naturalSize];

               CATextLayer *titleLayer = [CATextLayer layer];
               titleLayer.string = @"Ojatro";
               titleLayer.font = (_bridge CFTypeRef Nullable)(@"Helvetica");
               titleLayer.fontSize = videoSize.height / 8;
               titleLayer.shadowOpacity = 0.2;
               titleLayer.alignmentMode = kCAAlignmentCenter;
               titleLayer.bounds = CGRectMake(0, 0, videoSize.width, videoSize.height / 6);
               titleLayer.position=CGPointMake(videoSize.width/2, videoSize.height/2);

               CALayer *parentLayer = [CALayer layer];
               CALayer *videoLayer = [CALayer layer];
               parentLayer.frame = CGRectMake(0, 0, videoSize.width, videoSize.height);
               videoLayer.frame = CGRectMake(0, 0, videoSize.width, videoSize.height);
               [parentLayer addSublayer:videoLayer];
               [parentLayer addSublayer:titleLayer];

               AVMutableVideoComposition* videoComp = [AVMutableVideoComposition videoComposition];
               videoComp.renderSize = videoSize;
               videoComp.frameDuration = CMTimeMake(1, 30);
               videoComp.animationTool = [AVVideoCompositionCoreAnimationTool      videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer:videoLayer inLayer:parentLayer];

               AVMutableVideoCompositionInstruction *instruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction];
               instruction.timeRange = CMTimeRangeMake(kCMTimeZero, [mixComposition duration]);

               AVAssetTrack *videoTrack = [[mixComposition tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];

               AVMutableVideoCompositionLayerInstruction* layerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack];

               instruction.layerInstructions = [NSArray arrayWithObject:layerInstruction];
               videoComp.instructions = [NSArray arrayWithObject: instruction];

               AVAssetExportSession* _assetExport = [[AVAssetExportSession alloc] initWithAsset:mixComposition presetName:AVAssetExportPresetMediumQuality];//AVAssetExportPresetPasst
               _assetExport.videoComposition = videoComp;
               //NSString* videoName = @"mynewwatermarkedvideo.mov";
               NSString *tmpDirPath = [compMovPath stringByReplacingOccurrencesOfString:[compMovPath lastPathComponent] withString:@""];
               if ([Utility makeDirectoryAtPath:tmpDirPath])
               {
                   NSLog(@"Directory Created");
               }
               //exportPath=[exportPath stringByAppendingString:videoName];
               NSURL    *exportUrl = tmpDestUrl;

               if ([[NSFileManager defaultManager] fileExistsAtPath:compMovPath])
               {
                   [[NSFileManager defaultManager] removeItemAtPath:compMovPath error:nil];
               }

               _assetExport.outputURL = exportUrl;
               _assetExport.shouldOptimizeForNetworkUse = YES;
               _assetExport.outputFileType = AVFileTypeMPEG4;

               //[strRecordedFilename setString: exportPath];

               [_assetExport exportAsynchronouslyWithCompletionHandler:
                ^(void ) {
                    switch (_assetExport.status)
                    {
                        case AVAssetExportSessionStatusUnknown:
                            NSLog(@"Export Status Unknown");

                            break;
                        case AVAssetExportSessionStatusWaiting:
                            NSLog(@"Export Waiting");

                            break;
                        case AVAssetExportSessionStatusExporting:
                            NSLog(@"Export Status");

                            break;
                        case AVAssetExportSessionStatusCompleted:
                            NSLog(@"Export Completed");
                            totalFilesCopied++;
                            [self startProgressBar];

                            break;
                        case AVAssetExportSessionStatusFailed:
                            NSLog(@"Export failed");

                            break;
                        case AVAssetExportSessionStatusCancelled:
                            NSLog(@"Export canceled");

                            break;
                    }
                }
                ];
               return NO;
           }

    But my main problem is that when I compress the 500MB video (i.e average video) file and it takes approximately 20 to 30+ minutes. It reduce the video size to approximately 130MB. I’m using the Native AVFoundation Library to compress the video to reduce its size.

    I need to compress the video size very fast just like Apple Compressor application, it compresses the 500MB file within 30 seconds only...

    https://itunes.apple.com/en/app/compressor/id424390742?mt=12

    I’ve also used FFMPEG library for that, but that is also slow I did not found that library anymore useful.

    I’ve also tried to find the solution using other languages like, java, python. but did not found any solution was found.

    If anyone has the solution for this particular problem, or has some libraries (i.e Paid library or Open Source Library) that can do the compression with less time at least 1 minute... Please do share with me. Or some other piece of code that can overcome the compression time problem from 20 - 30 minutes to at least 1 minute.

    Thanks...

  • FFMPEG not accepting python variables

    13 décembre 2020, par Learning Programming

    I have made a script for compressing videos using python and ffmpeg. This is the script :-

    


    import os
import sys
import subprocess
v = input("Enter video name: ")
print("Compressing......")
result = subprocess.run("D:\\Python Projects\\Compressor\\Ffmpeg\\bin\\ffmpeg.exe -i "+ (v )+ "-b 800k output.mp4")


    


    The output :-

    


    Enter video name: video
Compressing


    


    Then cmd will open and close then itself. Earlier I was using this script without input command.I will write the video name in the subprocess command itself. That time it worked. If any of you can find the solution please tell me. This is my College project

    


  • ffmpeg to batch convert MXF Quicktime files to h264 while retaining 4 track audio (pass thru)

    1er juin 2017, par 3pointedit

    I have a bunch of MXF type files which have Quicktime reference files in a folder with audio components etc.

    video to convert

    The encoded .vid file is actually a DV codec. MPEG Streamclip will play the files but won’t pass the four audio tracks through. It eaither clips 2 tracks or mixes 4 to 2.
    I was hoping that there might be a way to process them from large DV25 files to smaller h264 with audio "keep as same" ?

    It would be great to batch them perhaps by dropping a shortcut to the Quicktime pointer file.

    I can get Apple compressor to do it but I have to use a windows PC.