
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (77)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 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, 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 (...) -
Amélioration de la version de base
13 septembre 2013Jolie 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 (4188)
-
How to write a unit test class that creates a new process in C#
12 mars 2023, par IceAgeI have a question about how to write unit test method that creates a new process.


At the moment I write a normal unit test to create a process, but it's very difficult to setup.


This is my code I want to test.


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace xxx
{
 public class FFmPeg
 {
 private Process _process;
 private string ffmpegPath { get; set; }
 private Regex _durationRegex;

 public event EventHandler<string> OutputData;
 public event EventHandler<int> ProgressChange;

 public FFmPeg()
 {
 _process = new Process();
 ffmpegPath = Path.Combine(Directory.GetCurrentDirectory(), "engine", "ffmpeg.exe");
 }

 public void Run(string Argument)
 {
 _process.StartInfo.FileName = ffmpegPath;
 _process.StartInfo.Arguments = $"{Argument} -y";
 _process.StartInfo.UseShellExecute = false;
 _process.StartInfo.RedirectStandardOutput = true;
 _process.StartInfo.RedirectStandardError = true;
 _process.StartInfo.StandardOutputEncoding = Encoding.UTF8;
 _process.StartInfo.CreateNoWindow = true;
 _process.OutputDataReceived +=(o,e) =>
 {
 };
 _process.ErrorDataReceived += (o, e) =>
 {
 if (string.IsNullOrEmpty(e.Data) == false)
 {
 OnProgressChange(OutputExtractor.GetProgress(e.Data));
 }//end if.check data is not empty
 };

 _process.Start();
 _process.BeginOutputReadLine();
 _process.BeginErrorReadLine();
 _process.WaitForExit();
 } //end method

 protected virtual void OnProgressChange(int progress)
 {
 ProgressChange?.Invoke(this,progress);
 } //end method

 protected virtual void OnOutputData(string data)
 {
 OutputData?.Invoke(this, data);
 }
 }
}
</int></string>


Thanks for any helpful answers, and sorry for my English.


-
Assertion error when encoding video using ffmpeg library on visual studio c++
18 juin 2015, par Leon PhanI have a project, that i need to received data from a rtsp link, decode,resize video, encode it and save to .mp4 file.
- I Using ffmpeg from http://ffmpeg.zeranoe.com/builds/
- I am using visual studio 2010, run on windows 7 and windows 8.
- This is rtsp link i am using : rtsp ://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
- I decode and save to ppm file is ok. But encode isn’t.
- I following there tutorials : http://dranger.com/ffmpeg/tutorial01.html
this is my code :
AVPacket destPacket;
av_init_packet(&destPacket);
destPacket.data = NULL;
destPacket.size = 0;
while(av_read_frame(i_format_context, &packet)>=0) {
if(packet.stream_index==video_stream_index) {
int rest = avcodec_decode_video2(copyInputCodec, pFrame, &frameFinished, &packet);
if(frameFinished) {
av_init_packet(&destPacket);
destPacket.data = NULL;
destPacket.size = 0;
av_free_packet(&destPacket);
//deocde here
int ret_scale = sws_scale(sws_ctx,pFrame->data,pFrame->linesize,0,copyInputCodec->height,encodeFrame->data,encodeFrame->linesize);
encodeFrame->pts=i;
int ret_enc = avcodec_encode_video2(copyOutputCodec,&destPacket,encodeFrame,&encodeFinishsed);//<--- Problem here.
getchar();
}
}
}And this is output error
[swscaler @ 00607880] Warning : data is not aligned ! This can lead to a
speedlo ss
Assertion avctx->codec->encode2 failed at /home/kyle/software/ffmpeg/source/ffmp
eg-git/libavcodec/utils.c:2134I try to run many sample code to encode video, the result is same.
Thanks for help.
PS : sorry about my English skill.
-
Windows - FFmpeg - How to map a jpg file to video stream 0:0 and include only audio stream 0:2 and not stream 0:1 and 0:2 together
21 juin 2020, par slyfox1186I am trying to write a batch script that begins by extracting a thumbnail "Cover.jpg" from an mkv video. My end goal is to have this script recursively loop a folder full of videos to encode them all in one go.



:: create cover art jpg
for %%G in (*.mkv) do (
%FF% -hide_banner -ss 30 -y -i "%%G" -vframes 1 -an Cover.jpg
)




Then I am trying to encode the 4K mkv video that I got the jpg thumbnail from to 1920x1080 resolution instead of it's native 4K to make it easier to play back on my home plex server.



I have surround sound 6 channel speaker system so I want to take audio stream 0:2 which is Dolby DTS 6 channel and save some HDD space by converting it to
-c:a ac3 -b:a 640k -ac 6
.


I have gotten stuck because I can achieve everything I want except I keep encoding 2 of the 4 audio streams available in the end. I only want to keep 1 audio stream to maximize my space savings.



Here is the entire script so far.



@echo off
setlocal enabledelayedexpansion
prompt $g
color 0a

pushd "%~dp0"

set FF=C:\MAB\local64\bin-video\ffmpeg.exe
set TITLE=MOVIETITLE

:: create cover art jpg file
for %%G in (*.mkv) do (
%FF% -hide_banner -ss 30 -y -i "%%G" -vframes 1 -an Cover.jpg
)

:: run ffmpeg x265
for %%I in (*.mkv) do (
set fname="%%~nxI"
set fout="%%~nI-temp.mkv"
call :runff !fname! !fout!
del /s /q *.jpg
pause
goto:eof
)

:runff
%FF% -ss 0 ^
-y ^
-i "%~1" ^
-attach "Cover.jpg" ^
-map_metadata 0 ^
-map_chapters 0 ^
-metadata title="%TITLE%" ^
-map 0:0 -metadata:s:v:0 language=eng ^
-map 0:2 -metadata:s:a:0 language=eng -metadata:s:a:0 title="Surround 5.1 (DTS)" ^
-map 0:3 -metadata:s:s:0 language=eng -metadata:s:s:0 title="English" -metadata:s:t:0 filename="Cover.jpg" -metadata:s:t:0 mimetype="image/jpeg" ^
-c:v libx265 -preset medium ^
-x265-params crf=18:qcomp=0.8:aq-mode=1:aq_strength=1.0:qg-size=16:psy-rd=0.7:psy-rdoq=5.0:rdoq-level=1:merange=44 ^
-c:a ac3 -b:a 640k -ac 6 ^
-t 3 ^
"%~2"
exit /b




Here are the output logs.
https://pastebin.com/hVMy3VJW



You can see towards the bottom that it is encoding both audio streams.



Any ideas guys ?