
Recherche avancée
Autres articles (87)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes 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 (4582)
-
Using DirectX from subprocess executed by windows service
26 mai 2019, par Igor GorelikI need to execute ffmpeg process from windows service and capture it’s standard output. It works fine until I use hardware acceleration. Because accessing DirectX from windows service is restricted, the subprocess also fails to access it.
When I’m executing the same code from console application, everything works OK, but the same code executed from windows service fails to use hardware acceleration.
string ffmpegArgs = /*-hwaccel dxva2 */"-threads 0 -probesize 100512 -i c:/Temp/test.mp4 -vf yadif -vcodec libx264 -preset ultrafast -tune zerolatency -profile baseline -x264-params keyint=20:min-keyint=20:scenecut=-1 -acodec aac -b:a 48k -flags +cgop -f mp4 -movflags empty_moov+default_base_moof+frag_keyframe c:/temp/output.avi";
var psi = new ProcessStartInfo
{
FileName = "c:/Temp/ffmpeg4/ffmpeg.exe",
Arguments = ffmpegArgs,
WorkingDirectory = "c:/Temp/ffmpeg4",
CreateNoWindow = false,
WindowStyle = ProcessWindowStyle.Hidden,
RedirectStandardInput = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false
};
var processVideo = new Process { StartInfo = psi }.Start();I need somehow break the inherited restrictions to be able to execute ffmpeg with hardware acceleration (access DirectX API). Any suggestions ?
-
Why do I catch the "AccessViolationException" exception in av_hwframe_transfer_data () when I run it as a windows service ?
5 décembre 2024, par vakymI write Windows service witch decodig video stream from camera.
I write it on c# with FFMPEG.Autogen wrapper.



My problem is "AccessViolationException" when i run it as service. 
If i run application as Console Application i have no exceptions.



In Stacktrace i see this :



в FFmpeg.AutoGen.ffmpeg+<>c.<.cctor>b__5_572(FFmpeg.AutoGen.AVFrame*, FFmpeg.AutoGen.AVFrame*, Int32)
в FFmpeg.AutoGen.ffmpeg.av_hwframe_transfer_data(FFmpeg.AutoGen.AVFrame*, FFmpeg.AutoGen.AVFrame*,Int32)
в VideoProviderService.VideoSources.RTSPVideoSource.TryDecodeNextFrame(Boolean ByRef)




Code of TryDecodeNextFrame method :



public IntPtr TryDecodeNextFrame(out bool state)
{
 try
 {
 ffmpeg.av_frame_unref(pFrame);
 ffmpeg.av_frame_unref(cpuFrame);
 int error;
 do
 {
 try
 {
 do
 {
 timeout = DateTime.Now.AddSeconds(2);
 error = ffmpeg.av_read_frame(_pFormatContext, pPacket);
 if (error == ffmpeg.AVERROR_EOF)
 {
 state = false;
 return IntPtr.Zero;
 }
 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();
 ffmpeg.av_hwframe_transfer_data(cpuFrame, pFrame, 0).ThrowExceptionIfError();
 ptrToFrame = (IntPtr)vfc.Convert(*cpuFrame).data[0]; 
 }
 catch
 {
 state = false;
 return IntPtr.Zero;
 }
 state = true;
 return ptrToFrame;
}




What i tried to do :



- 

- I checked arguments of
av_hwframe_transfer_data
. - I changed the user for the service.
- I tried compile as x86 or x64 configuration.









I have no idea how to solve this.
Does anyone have any thoughts ?


- I checked arguments of
-
I want to reduce video file size but still have a good video quality, how should I write the code using ffmpeg ?
9 décembre 2019, par Inibuat MaengameFirst of all, I’ve downloaded some videos to watch, and each file has more than 500MB file size. But due to the vast amount of videos I have at the moment, my 3 external hard drives are crying.
Up till today, I’ve been using BENCOS to reduce the size...
I always set the preset to very slow, codec h264, profile : high, and the mode is (probably) fixed bitrate on 736kbps.
With those settings,
I was able to reduce the size from 400-600MB into 100-110MB with acceptable video quality.
But, since BENCOS has stopped its service since ages ago, I’ve been trying FFmpeg lately.Using those same settings, -crf 22, -preset veryslow, profile:high, the file size doesn’t really reduce that much... from 500MB to 200MB-ish with a much lower video quality compared to BENCOS.
How are you guys able to reduce the file size by a huge margin compared to the original but still retain the quality using FFmpeg..?
what commands I should put into the FFmpeg to get a result as good as BENCOS..?Thanks in advance...