
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (107)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 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 (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (10558)
-
Linkedin API video split upload
25 octobre 2024, par NataliaI'm working on Linkedin api integration in next.js app. Short videos I upload successfully, the problem is with video splitting. My finction split video if necessary and upload it to temp folder. I use ffmpeg from 'fluent-ffmpeg' ;


export async function splitVideoToTemp(fileName: string): Promise<boolean> {

const inputPath = path.join(process.cwd(), 'tmp', 'input', fileName);
ensureFolderExists('chunks');
const outputDir = path.join(process.cwd() + '/tmp/chunks');
const bytes = 4194303;
await splitVideo(inputPath as string, bytes, outputDir);
await deleteFileFromTemp(inputPath);

return true;
}

export async function splitVideo(inputPath: string, chunkSize: number, outputDir: 
string): Promise<void> {
 try {
 await fs.mkdir(outputDir, { recursive: true });

 const metadata: FFmpegMetadata = await new Promise((resolve, reject) => {
 ffmpeg.ffprobe(inputPath, (err, metadata) => {
 if (err) reject(err);
 else resolve(metadata as FFmpegMetadata);
 });
 });

 const duration = metadata.format.duration;
 const chunkDuration = chunkSize / (metadata.format.size / duration);
 const promises = [];

 for (let startTime = 0, chunkIndex = 0; startTime < duration; startTime += 
 chunkDuration, chunkIndex++) {
 const outputPath = path.join(outputDir, `chunk_${chunkIndex}.mp4`);
 promises.push(processChunk(inputPath, startTime, chunkDuration, outputPath));
 }

 await Promise.all(promises);
 console.log('Video split successfully');
} catch (error) {
 console.error('Error splitting video:', error);
}
}

 function processChunk(inputPath: string, startTime: number, chunkDuration: number, 
 outputPath: string): Promise<void> {
 return new Promise((resolve, reject) => {
 ffmpeg(inputPath)
 .setStartTime(startTime)
 .setDuration(chunkDuration)
 .output(outputPath)
 .on('end', () => resolve())
 .on('error', reject)
 .run();
 });
 }
</void></void></boolean>


calling this functions nicely split my video to chuks, they are not corrupted, I can play them one by one.


then I call


const response = await fetch(
 `${LN_API_BASE_URL}/${LN_API_VERSION}/videos?action=initializeUpload`,
 requestOptions
 );
 const result = await response.json();



I receive upload isntructions.


await splitVideoToTemp(fileName);
 await Promise.all(
 instructions?.map(async (instruction, index) => {
 const chunkName = `chunk_${index}.mp4`;
 const outputPath = path.join(
 process.cwd() + '/tmp/chunks',
 chunkName
 );
 const blob = await getFileAsBlob(outputPath);
 const result = uploadVideo(
 instruction.uploadUrl,
 blob,
 params.pageAccessToken
 );
 const uploadedChunkId = await result;
 if (uploadedChunkId) {
 uploadedChunksIds.push(uploadedChunkId);
 // delete file
 await deleteFileFromTemp(outputPath);
 }
 })
 );



all nice and well, when I upload, i receive bunch of chunk ids with each call, I put them in array, call finalize upload with obj


finalizeUploadRequest: {
 video: 'urn:li:video:videoId',
 uploadToken: '',
 uploadedPartIds: [ .. 'ids i received', '', '', '']
 }



then I poll result, its available, then I post. it success. But on the page I get one random chank from all of them.


Any Idea why ? I dont get any error. Upload process is smooth. All videos go through this logic, if video short and dont need to be splitted, it uploads perfectly, but whats wrong with partial uploading ? Why it post only one of the chunks and random one ?


I'll appreciate any tips


-
Anomalie #3630 : Logo d’auteur et fonction de recherche de logo
29 décembre 2015, par b bSalut, je ne comprends pas quand tu dis :
Or la description parle de "type", et non pas d’id.
Le phpdoc de la fonction mentionne bien l’id, cf : http://code.spip.net/autodoc/tree/ecrire/public/quete.php.html#function_quete_logo
Quel code utilises-tu et quel résultat attends-tu ?
-
avcodec/ralf : Check num_blocks before use
11 mai 2020, par Michael Niedermayeravcodec/ralf : Check num_blocks before use
Fixes : out of array access
Fixes : 20659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5739471895265280Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>