
Recherche avancée
Autres articles (60)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Configuration spécifique d’Apache
4 février 2011, parModules 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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (7747)
-
File Decryption in (AESMode.ctr) mode showing Exception Failed to decode data using encoding 'utf-8' in dart ?
20 novembre 2020, par JaiWhile decoding the video file using
aes-ctr
mode am getting error like below,

Unhandled Exception: FileSystemException: Failed to decode data using encoding 'utf-8'


Used ffmpeg for encrypting file :


ffmpeg -i samplevideo.mp4 -vcodec copy -acodec copy -encryption_scheme cenc-aes-ctr -encryption_key 76a6c65c5ea762046bd749a2e632ccbb -encryption_kid a7e61c373e219033c21091fa607bf3b8 enc_v1_file.mp4


Used Dart to decode video file :


Future<string> decryptFile(filePath) async {
 // filePath - Local encrypted file path
 var encodedKey = 'NzZhNmM2NWM1ZWE3NjIwNDZiZDc0OWEyZTYzMmNjYmI=';
 var encodedIv = 'YTdlNjFjMzczZTIxOTAzM2MyMTA5MWZhNjA3YmYzYjg=';
 var encryptedBase64EncodedString = new File(filePath).readAsStringSync();
 var decoded = base64.decode(encryptedBase64EncodedString); // Error in this line
 final key1 = enc.Key.fromBase64(encodedKey);
 final iv = enc.IV.fromBase64(encodedIv);
 final encrypter = enc.Encrypter(enc.AES(key1, mode: enc.AESMode.ctr));
 final decrypted = encrypter.decryptBytes(enc.Encrypted(decoded), iv: iv);
 final filename = '${p.basenameWithoutExtension(filePath)}.mp4';
 final directoryName = p.dirname(filePath);
 final newFilePath = p.join(directoryName, filename);
 var newFile = new File(newFilePath);
 await newFile.writeAsBytes(decrypted);
 return newFilePath;
}
</string>


-
How to merge video and audio without re-encoding ?
6 mars 2024, par real_smThere are 2 files :


General
Complete name : D:\TEMP\videofile.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (avc1/mp42/dash)
File size : 5.93 GiB
Duration : 1 h 49 min
Overall bit rate : 7 776 kb/s

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Format settings, GOP : M=4, N=50
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1 h 49 min
Bit rate : 7 773 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.150
Stream size : 5.93 GiB (100%)
Title : Anvato eDASH 2.1
Codec configuration box : avcC

Text #1
ID : 1-CC1
Format : EIA-608
Muxing mode : SCTE 128 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 1 h 49 min
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC1

Text #2
ID : 1-CC4
Format : EIA-608
Muxing mode : SCTE 128 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 1 h 49 min
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC4



and


Audiofile Mediainfo : https://pastebin.com/Sn0rBAXg (moved to Pastebin, because SOF did not allow "so much code" in a question).


When I open them in PotPlayer - I can watch the video (though, it opens quite long, up to 40 seconds). But I want to merge these 2 files into 1, I tried using ffmpeg :


ffmpeg.exe -i videofile.mp4 -i audiofile.mp4 -map 0:v -map 1:a -c copy -y output.mp4



And it produces video only 33 minutes long. How to merge these video and audio without re-encoding ?


-
Cutting a video without re encoding using ffmpeg and nodejs (fluent-ffmpeg)
22 septembre 2020, par foufrixI have a quick question,
I'm trying to do a cloud video editor, and i want to be able to cut out video usng nodejs.


I'm using fluent-ffmpeg. Here is my code :


const cutVideo = async (sourcePath, outputPath, startTime, duration) => {
 console.log('start cut video');

 await new Promise((resolve, reject) => {
 ffmpeg(sourcePath)
 .setFfmpegPath(pathToFfmpeg)
 .setFfprobePath(ffprobe.path)
 .output(outputPath)
 .setStartTime(startTime)
 .setDuration(duration)
 .on('end', function (err) {
 if (!err) {
 console.log('conversion Done');
 resolve();
 }
 })
 .on('error', function (err) {
 console.log('error: ', err);
 reject(err);
 })
 .run();
 });
};



It's working but not optimal, and as soon as i try to edit to a long video (getting 10 min from a video instead of 1 min out) it's super long.


What i understand is that ffmpeg re encode everything, so that's why the longer the edit is the longer the process will.
Is there way to cut out using node-fluent-ffmpeg without re encoding everything ?


Thanks to the community !