
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (103)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
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 (...) -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.
Sur d’autres sites (4885)
-
ffmpeg throw a silent video output when trying to merge video and audio
31 janvier 2023, par porororoI tried to combine mp4 format video and wav format audio.
The video is shorter than the audio and start second is same as 00:00.


I used command as bellows :


ffmpeg -i video.mp4 -i audio.wav -filter_complex "[0:a]volume=0.2[A];[1:a][A]amerge[Aout]" -map 0:v -map [Aout] -y -shortest output_video.mp4



The problem is the output_video.mp4 is a silent video without the sound.


How can I get the output_video.mp4 with sound from audio.wav ?


ffmpeg output is :




ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
configuration: --prefix=/tmp/build/80754af9/ffmpeg_1587154242452/\_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho --cc=/tmp/build/80754af9/ffmpeg_1587154242452/\_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --enable-avresample --enable-gmp --enable-hardcoded-tables --enable-libfreetype --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame --disable-nonfree --enable-gpl --enable-gnutls --disable-openssl --enable-libopenh264 --enable-libx264
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:00:19.04, start: 0.000000, bitrate: 510 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 373 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Guessed Channel Layout for Input Stream #1.0 : mono
Input #1, wav, from 'audio.wav':
Duration: 00:00:14.70, bitrate: 352 kb/s
Stream #1:0: Audio: pcm_s16le (\[1\]\[0\]\[0\]\[0\] / 0x0001), 22050 Hz, mono, s16, 352 kb/s
Stream mapping:
Stream #0:1 (aac) -\> volume (graph 0)
Stream #1:0 (pcm_s16le) -\> amerge:in0 (graph 0)
Stream #0:0 -\> #0:0 (h264 (native) -\> h264 (libx264))
amerge (graph 0) -\> Stream #0:1 (aac)
Press \[q\] to stop, \[?\] for help
\[libx264 @ 0x55aa9a642ac0\] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
\[libx264 @ 0x55aa9a642ac0\] profile High, level 3.1, 4:2:0, 8-bit
\[libx264 @ 0x55aa9a642ac0\] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=22 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
\[Parsed_amerge_1 @ 0x55aa9b37c140\] No channel layout for input 1
Output #0, mp4, to 'output_video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, 3.0, fltp, 197 kb/s (default)
Metadata:
encoder : Lavc58.54.100 aac
frame= 507 fps=291 q=-1.0 Lsize= 1116kB time=00:00:16.80 bitrate= 544.3kbits/s speed=9.64x 
video:760kB audio:342kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.242977%
\[libx264 @ 0x55aa9a642ac0\] frame I:3 Avg QP:16.24 size: 19770
\[libx264 @ 0x55aa9a642ac0\] frame P:154 Avg QP:20.29 size: 3227
\[libx264 @ 0x55aa9a642ac0\] frame B:350 Avg QP:19.84 size: 633
\[libx264 @ 0x55aa9a642ac0\] consecutive B-frames: 0.6% 15.8% 18.9% 64.7%
\[libx264 @ 0x55aa9a642ac0\] mb I I16..4: 23.5% 67.4% 9.1%
\[libx264 @ 0x55aa9a642ac0\] mb P I16..4: 0.7% 3.0% 0.3% P16..4: 13.0% 3.1% 1.0% 0.0% 0.0% skip:78.8%
\[libx264 @ 0x55aa9a642ac0\] mb B I16..4: 0.2% 0.1% 0.0% B16..8: 10.4% 0.3% 0.0% direct: 0.6% skip:88.3% L0:41.5% L1:57.2% BI: 1.3%
\[libx264 @ 0x55aa9a642ac0\] 8x8 transform intra:68.2% inter:81.9%
\[libx264 @ 0x55aa9a642ac0\] coded y,uvDC,uvAC intra: 24.6% 22.9% 6.1% inter: 1.2% 1.7% 0.0%
\[libx264 @ 0x55aa9a642ac0\] i16 v,h,dc,p: 68% 16% 6% 10%
\[libx264 @ 0x55aa9a642ac0\] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 10% 50% 2% 2% 3% 2% 4% 3%
\[libx264 @ 0x55aa9a642ac0\] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 25% 13% 5% 5% 6% 5% 6% 4%
\[libx264 @ 0x55aa9a642ac0\] i8c dc,h,v,p: 75% 10% 12% 2%
\[libx264 @ 0x55aa9a642ac0\] Weighted P-Frames: Y:0.0% UV:0.0%
\[libx264 @ 0x55aa9a642ac0\] ref P L0: 65.9% 16.2% 13.5% 4.4%
\[libx264 @ 0x55aa9a642ac0\] ref B L0: 84.1% 13.4% 2.5%
\[libx264 @ 0x55aa9a642ac0\] ref B L1: 97.1% 2.9%
\[libx264 @ 0x55aa9a642ac0\] kb/s:368.24
\[aac @ 0x55aa9a62a280\] Qavg: 8290.713







-
How to make ffmpeg to throw exception on try/catch for working directory and for arguments ?
30 juin 2022, par Sharo SAIf for example i'm setting the FileName(outputDirectory) to null it will throw exception.


The class when i'm using process of the ffmpeg.exe :


public void Start()
 {
 process = new Process();
 process.StartInfo.FileName = outputDirectory; // Change the directory where ffmpeg.exe is. 
 process.EnableRaisingEvents = false;
 process.StartInfo.WorkingDirectory = workingDirectory; // The output directory 
 process.StartInfo.Arguments = arguments;
 process.StartInfo.UseShellExecute = false;
 process.StartInfo.RedirectStandardInput = true; //Redirect stdin
 process.StartInfo.CreateNoWindow = true;
 process.Start();

 errorMessage = false;
 startRecord = true;
 }



but if i'm setting the WorkingDirectory to null or entering some not valid Arguments like "sadasdasd" it will not throw exception not on the WorkingDirectory and not on the Arguments.


In Form1 :


private void recordStripMenuItem_Click(object sender, EventArgs e)
 {
 recordToggle = !recordToggle;

 if (recordToggle)
 {
 try
 {
 record.workingDirectory = settingsForm.workingDirectory;
 record.outputDirectory = settingsForm.outputDirectory;
 record.arguments = settingsForm.arguments;
 record.Start();
 }
 catch(Exception ex)
 {
 recordStripMenuItem.Text = "Record";
 Icon = iconGreen;
 TextInfo("Waiting");
 recordToggle = false;
 MessageBox.Show("Arguments are not valid : " + ex.Message);
 
 }
 if (!FFmpeg_Capture.errorMessage)
 {
 settingsForm.Close();
 recordStripMenuItem.Text = "Stop";
 Icon = iconRed;
 TextInfo("Recording");
 }
 }
 else
 {
 recordStripMenuItem.Text = "Record";
 Icon = iconGreen;
 TextInfo("Waiting");
 record.Stop();
 }
 }



The variable record is instance of the FFmpeg_Capture class with the process of the ffmpeg.
It's throwing exception only on the FileName(outputDirectory).


-
fileapi::WriteFile() doesn't send an input, if processthreadsapi::STARTUPINFO::hStdError is set (ffmpeg)
23 avril 2021, par LidekysI'm trying to capture my screen using
ffmpeg
in a different thread (which I create usingprocessthreadsapi::CreateProcess())
so I'd be able to do something else in the main thread, and redirectffmpeg
output, so it wouldn't pop up in the console for the user to see. To stop filming, I send a 'q' input usingWriteFile()
, and after that I want to saveffmpeg
accumulated output usingReadFile()
.

However, if I set
STARTUPINFO::hStdError
(note, thatffmpeg
output goes tostderr
) to a pipe, from which I could read the accumulated data, the inputs I send usingWriteFile()
are no longer registered and ffmpeg.exe keeps running.

I've tried redirecting
ffmpeg
output in a simple command line, but I can still stop the process by pressing the q button.

Also, if I record for less than 8 seconds, the input is registered and
ffmpeg.exe
closes.

Is there something wrong with my code, or is it processthreadsapi issue, any hints will be kindly appreciared !


Here's a minimal code of how I am trying to do it :



#include <iostream>

#include 
#include 

using namespace std;

HANDLE g_hChildStd_IN_Rd = NULL;
HANDLE g_hChildStd_IN_Wr = NULL;
HANDLE g_hChildStd_OUT_Rd = NULL;
HANDLE g_hChildStd_OUT_Wr = NULL;

int main()
{
 //Create IN and OUT pipes
 SECURITY_ATTRIBUTES saAttr;
 saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
 saAttr.lpSecurityDescriptor = NULL;


 if (! CreatePipe(&g_hChildStd_OUT_Rd, &g_hChildStd_OUT_Wr, &saAttr, 0) )
 cout<<"StdoutRd CreatePipe error"</Start recording
 if(!CreateProcess(NULL,
 "ffmpeg -y -f gdigrab -framerate 2 -i desktop record.avi", // command line
 NULL, // process security attributes
 NULL, // primary thread security attributes
 TRUE, // handles are inherited
 0, // creation flags
 NULL, // use parent's environment
 NULL, // use parent's current directory
 &siStartInfo, // STARTUPINFO pointer
 &piProcInfo)) // receives PROCESS_INFORMATION
 {
 cout<<"Error create process"</Record for a while
 while(getch() != 'k'){
 cout<<"While press k"</Stop recording by emulating a Q button push
 DWORD dwWritten;
 CHAR chBufW[1] = {'q'};

 if ( ! WriteFile(g_hChildStd_IN_Wr, chBufW, 1, &dwWritten, NULL) )
 cout<<"Error write file"</Save stdError (ffmpeg) data
 DWORD dwRead;
 char stdErrorData[4096];
 bool bSuccess;

 bSuccess = ReadFile( g_hChildStd_OUT_Wr, stdErrorData, 4096, &dwRead, NULL);

 if(!bSuccess || dwRead == 0)
 cout<<"Read failed"<code></iostream>