
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (78)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (3027)
-
Issue with video compression using HLS from laravel protonemedia/laravel-ffmpeg package
29 mars 2023, par Mateo KantociI'm using laravel-ffmpeg package in order to compress videos and save it as .m3u8.
In another words, I have a job that is gathering all uncompressed files and compress them 1by1 and save them to google cloud storage. Furthermore, compression is using exportForHLS from package and throws an error :


ProtoneMedia\LaravelFFMpeg\Exporters\HLSPlaylistGenerator::getStreamInfoLine(): Return value must be of type string, null returned in /var/www/html/ipaparazzo/vendor/pbmedia/laravel-ffmpeg/src/Exporters/HLSPlaylistGenerator.php:32



In some cases compression works but my job is failing for most of the time.


Anyone experienced similar issue ?


P.S. It is working as expected when using public storage.


This is my code exactly as per laravel-ffmpeg documentation :


->exportForHLS()
->setSegmentLength(10) // optional
->setKeyFrameInterval(48) // optional
->addFormat($lowBitrate, function($media) {
 $media->scale(426, 240);
})
->addFormat($midBitrate, function($media) {
 $media->scale(640, 360);
})
->addFormat($highBitrate, function($media) {
 $media->scale(640, 480);
})
->onProgress(function ($percentage) {
 echo "{$percentage}% transcoded\n";
})
->toDisk('gcs2')
->save($videoPath)
->cleanupTemporaryFiles();



-
Presentation of Piwik’s collaborative translations platform : oTrance [Interview]
19 avril 2013, par matt — Community, translationPiwik enables domain administrators, hobbyists, power users, personal website builders and everyone in between to access enormous amounts of data for website analytics. To support all those users, Piwik needs to be available in a number of different languages. From the start, we made internationalization (i18n) part of Piwik’s DNA. There are now dozens active volunteers who help make sure each language is well represented in the latest official release of Piwik. As of now, Piwik is available in 48 languages.
Recently a new tool became available that makes the translation of Piwik much easier. The software we are using is an open source platform called oTrance. It has made our translation architecture more robust, and it allows us to expedite the timely delivery of high quality and up-to-date translations to the thousands of people who rely on Piwik every day.
We’ve met with oTrance creator and lead developer Daniel Schlichtholz who answered a few questions for us.
What is oTrance ?
oTranCe is the short form of “Online Translation Center”. It was born because I needed a translation platform for my project MySQLDumper.
Many languages have been added by the community and manual maintenance became more and more time consuming. I wanted to change that. So I searched for an existing platform I could use and tested a lot of approaches. To put a long story short : none of the given solutions satisfied my needs.
From the view of a translator maintaining a language should be as easy as possible. In most cases they have to install a program on their local machine or the workflow was too difficult. A translator doesn’t want to struggle with technical things ; he just wants to translate the phrases and wants to know the progress.
That’s the main goal we want to reach : to make the translation process as easy as possible.
What sets oTrance apart from the other ways to manage translations ?
Ease of use is one advantage of oTranCe compared to other solutions. Another advantage is that project administrators can install oTranCe on their own server – so nobody is dependant of a third party provider.
We love to get feedback from other users. User feedback influences the way oTranCe is developed. We believe that this way oTranCe satisfies the requirements of the real world.
We also have extensive user documentation, in our “Working with oTranCe” wiki. We try to document use cases in an understandable way. We don’t write down marketing buzz words, but try to explain the use from the view of the user/administrator.
Now that oTranCe 1.0 is out, what will you be working on next ?
The language files can be exported to version control and oTranCe can commit changes to the target repository. Currently we support export to Subversion, and we are working on a Git export adapter, which will be released soon.
Another issue we are trying to solve is the context problem. When your project uses many different phrases the translator often doesn’t know in which context the current phrase is used. Version 1.1.0 (not released yet, but you can grab the latest developer version from GitHub) introduces the oTranCe-connector. The idea behind it : a small plug in grabs the used phrases/keys on the current page, and on click this list is submitted to oTranCe, where the translator can edit the words. This way the translator knows in which context these phrases are used. I wrote a small plug in for OXID eShop. Since it is really easy to implement, my hope is that other plug ins for other applications will be added by the community.
Matthieu : Congratulations Daniel for having created such an awesome Translation Platform. At Piwik we are really thankful for oTranCe, which has resulted in much better translation process, and happier translators. Keep up the good work !
If you are a Piwik user, and if you want to participate in translating Piwik, please sign up for an account on oTrance and become part of the team making Piwik available in more languages across the world.
-
Decode multiple video on GPU (FFmpeg.autogen + C#)
5 décembre 2024, par Sang NguyenI'm trying to use the basic example about decoding video (FFmpeg.AutoGen.Example) in the FFmpeg.autogen 4.3.0.3 library https://github.com/Ruslan-B/FFmpeg.AutoGen to decode multiple videos on a GPU (AMD radeon R7 430). My main function is as follows :


private static void Main(string[] args)
 {
 var url = @".\abc.mp4";
 for (int i = 0; i < 11; i++)
 {
 url = @"D:\video\abc" + i + ".mp4";
 new Thread(() =>
 {
 DecodeAllFramesToImages(AVHWDeviceType.AV_HWDEVICE_TYPE_D3D11VA, url);
 }).Start();
 }
 }



I try to decode video abc.mp4 with GPU Hardware Acceleration. However, an error occurs when i run thread count greater than 10. The error images is as follows :


- 

- "System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory." enter image description here
- And in the console screen there is an error message "Failed to create D3D11VA video decoder" and "Failed setup for format d3d11 : hwaccel innitialisation returned error"
enter image description here.






I'm new to the ffmpeg library recently, so I don't know the problem very well, I would love to have your help with this error !!


private static unsafe void DecodeAllFramesToImages(AVHWDeviceType HWDevice, string url)
 { 
 using (var vsd = new VideoStreamDecoder(url,HWDevice))
 {
 Console.WriteLine($"codec name: {vsd.CodecName}");

 var info = vsd.GetContextInfo();
 info.ToList().ForEach(x => Console.WriteLine($"{x.Key} = {x.Value}"));

 var sourceSize = vsd.FrameSize;
 var sourcePixelFormat = HWDevice == AVHWDeviceType.AV_HWDEVICE_TYPE_NONE ? vsd.PixelFormat : GetHWPixelFormat(HWDevice);
 var destinationSize = sourceSize;
 var destinationPixelFormat = AVPixelFormat.AV_PIX_FMT_YUV420P;
 using (var vfc = new VideoFrameConverter(sourceSize, sourcePixelFormat, destinationSize, destinationPixelFormat))
 {
 var frameNumber = 0;
 while (vsd.TryDecodeNextFrame(out var frame))
 {
 //var convertedFrame = vfc.Convert(frame); 
 // using (var bitmap = new Bitmap(convertedFrame.width, convertedFrame.height, convertedFrame.linesize[0], PixelFormat.Format24bppRgb, (IntPtr) convertedFrame.data[0]))
 // bitmap.Save($"frame.{frameNumber:D8}.jpg", ImageFormat.Jpeg);
 
 Console.WriteLine($"frame: {frameNumber}");
 frameNumber++;
 }
 }
 }
 }



using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;

namespace FFmpeg.AutoGen.Example
{
 public sealed unsafe class VideoStreamDecoder : IDisposable
 {
 private readonly AVCodecContext* _pCodecContext;
 private readonly AVFormatContext* _pFormatContext;
 private readonly int _streamIndex;
 private readonly AVFrame* _pFrame;
 private readonly AVFrame* _receivedFrame;
 private readonly AVPacket* _pPacket;

 public VideoStreamDecoder(string url, AVHWDeviceType HWDeviceType = AVHWDeviceType.AV_HWDEVICE_TYPE_NONE)
 {
 _pFormatContext = ffmpeg.avformat_alloc_context();
 _receivedFrame = ffmpeg.av_frame_alloc();
 var pFormatContext = _pFormatContext;
 ffmpeg.avformat_open_input(&pFormatContext, url, null, null).ThrowExceptionIfError();
 ffmpeg.avformat_find_stream_info(_pFormatContext, null).ThrowExceptionIfError();
 AVCodec* codec = null;
 _streamIndex = ffmpeg.av_find_best_stream(_pFormatContext, AVMediaType.AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0).ThrowExceptionIfError();
 _pCodecContext = ffmpeg.avcodec_alloc_context3(codec);
 if (HWDeviceType != AVHWDeviceType.AV_HWDEVICE_TYPE_NONE)
 {
 ffmpeg.av_hwdevice_ctx_create(&_pCodecContext->hw_device_ctx, HWDeviceType, null, null, 0).ThrowExceptionIfError();
 }
 ffmpeg.avcodec_parameters_to_context(_pCodecContext, _pFormatContext->streams[_streamIndex]->codecpar).ThrowExceptionIfError();
 ffmpeg.avcodec_open2(_pCodecContext, codec, null).ThrowExceptionIfError(); 
 CodecName = ffmpeg.avcodec_get_name(codec->id);
 FrameSize = new Size(_pCodecContext->width, _pCodecContext->height);
 PixelFormat = _pCodecContext->pix_fmt;
 _pPacket = ffmpeg.av_packet_alloc();
 _pFrame = ffmpeg.av_frame_alloc();
 }

 public string CodecName { get; }
 public Size FrameSize { get; }
 public AVPixelFormat PixelFormat { get; }

 public void Dispose()
 {
 ffmpeg.av_frame_unref(_pFrame);
 ffmpeg.av_free(_pFrame);

 ffmpeg.av_packet_unref(_pPacket);
 ffmpeg.av_free(_pPacket);

 ffmpeg.avcodec_close(_pCodecContext);
 var pFormatContext = _pFormatContext;
 ffmpeg.avformat_close_input(&pFormatContext);
 }

 public bool TryDecodeNextFrame(out AVFrame frame)
 {
 ffmpeg.av_frame_unref(_pFrame);
 ffmpeg.av_frame_unref(_receivedFrame);
 int error;
 do
 {
 try
 {
 do
 {
 error = ffmpeg.av_read_frame(_pFormatContext, _pPacket);
 if (error == ffmpeg.AVERROR_EOF)
 {
 frame = *_pFrame;
 return false;
 }

 error.ThrowExceptionIfError();
 } while (_pPacket->stream_index != _streamIndex);

 ffmpeg.avcodec_send_packet(_pCodecContext, _pPacket).ThrowExceptionIfError();
 }
 finally
 {
 ffmpeg.av_packet_unref(_pPacket);
 }

 error = ffmpeg.avcodec_receive_frame(_pCodecContext, _pFrame);
 } while (error == ffmpeg.AVERROR(ffmpeg.EAGAIN));
 error.ThrowExceptionIfError();
 if (_pCodecContext->hw_device_ctx != null)
 {
 ffmpeg.av_hwframe_transfer_data(_receivedFrame, _pFrame, 0).ThrowExceptionIfError();
 frame = *_receivedFrame;
 }
 else
 {
 frame = *_pFrame;
 }
 return true;
 }
 public IReadOnlyDictionary GetContextInfo()
 {
 AVDictionaryEntry* tag = null;
 var result = new Dictionary();
 while ((tag = ffmpeg.av_dict_get(_pFormatContext->metadata, "", tag, ffmpeg.AV_DICT_IGNORE_SUFFIX)) != null)
 {
 var key = Marshal.PtrToStringAnsi((IntPtr) tag->key);
 var value = Marshal.PtrToStringAnsi((IntPtr) tag->value);
 result.Add(key, value);
 }
 return result;
 }
 }
}