
Recherche avancée
Autres articles (49)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (4594)
-
How to change the stream info and codec info of mp4 via Ffmpeg mux/remux code ?
2 avril 2017, par Gohan1987Is it really possible to change stream information and video codec information using FFMPEG muxing / remixing code ?
Consider this example :
Major brand : isom
Minor version : 0
Compatible brand : isommp41
Resolution : 1280 x 780Convert into another mp4 file
Major brand : mp42
Minor version : 512
Compatible brand : isomavc1mp41
Resolution : 359 x 288Note : without command line. Like using decode, sws_scale code wise ?.
-
ffmpeg audio video synchronisation mux
19 juillet 2013, par Rahul KumarI am trying to mux audio and video but the resultant is not what expected. The video is not shown in the output.
rahul@hp : $ ffmpeg -i /Desktop/a.m4a -i /Desktop/a.mp4 -acodec copy -vcodec copy /Desktop/output.mkv ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Apr 2 2013 17:00:59 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/rahul/Desktop/a.m4a' : Metadata : major_brand : dash minor_version : 0 compatible_brands : iso6mp41 creation_time : 2013-05-17 06:34:22 Duration : 00:16:41.01, start : 500.506122, bitrate : 127 kb/s Stream #0.0(und) : Audio : aac, 44100 Hz, stereo, s16 Metadata : creation_time : 2013-05-17 06:34:22
Seems stream 0 codec frame rate differs from container frame rate : 47.95 (48000/1001) -> 23.97 (45000/1877)
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/home/rahul/Desktop/a.mp4' :
Metadata :
major_brand : dash
minor_version : 0
compatible_brands : iso6avc1mp41
creation_time : 2013-05-17 06:34:22
Duration : 00:16:40.61, start : 500.316311, bitrate : 675 kb/s
Stream #1.0(und) : Video : h264 (Main), yuv420p, 1280x720, 23.97 tbr, 90k tbn, 47.95 tbc
Metadata :
creation_time : 2013-05-17 06:34:22
Output #0, matroska, to '/home/rahul/Desktop/output.mkv' :
Metadata :
major_brand : dash
minor_version : 0
compatible_brands : iso6mp41
creation_time : 2013-05-17 06:34:22
encoder : Lavf53.21.1
Stream #0.0(und) : Video : avc1 / 0x31637661, yuv420p, 1280x720, q=2-31, 1k tbn, 23.98 tbc
Metadata :
creation_time : 2013-05-17 06:34:22
Stream #0.1(und) : Audio : aac, 44100 Hz, stereo
Metadata :
creation_time : 2013-05-17 06:34:22
Stream mapping :
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press ctrl-c to stop encoding
frame= 0 fps= 0 q=-1.0 Lsize= 15643kB time=500.51 bitrate= 256.0kbits/s
video:0kB audio:15493kB global headers:0kB muxing overhead 0.967810%
rahul@hp : $i tried using
-map 0:v:0
-map 1:v:0
-map 0:v:1
but all showed
Number of stream maps must match number of output streams
-
Why when recording video using ffmpeg command line when playing the video it's running very fast ?
31 mai 2013, par Revuen Ben DrorThis is my code in Form1 :
private void StartRecording_Click(object sender, EventArgs e)
{
ffmp.Start("test.avi", 25);
timer1.Enabled = true;
}The timer tick event :
private void timer1_Tick(object sender, EventArgs e)
{
using (bitmap = (Bitmap)ScreenCapture.CaptureScreen(true))//(Bitmap)ScreenCapture.CaptureScreen(true))
{
ffmp.PushFrame(bitmap);
}
}Then the code in the ffmpeg class i did :
namespace ScreenVideoRecorder
{
class Ffmpeg
{
NamedPipeServerStream p;
String pipename = "mytestpipe";
byte[] b;
//int i, j;
System.Diagnostics.Process process;
//IAsyncResult ar;
public Ffmpeg()
{
}
public void Start(string FileName, int BitmapRate)
{
p = new NamedPipeServerStream(pipename, PipeDirection.Out, 1, PipeTransmissionMode.Byte);
b = new byte[1920 * 1080 * 3]; // some buffer for the r g and b of pixels of an image of size 720p
process = new System.Diagnostics.Process();
//process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.FileName = @"D:\pipetest\pipetest\ffmpegx86\ffmpeg.exe";
process.EnableRaisingEvents = false;
process.StartInfo.WorkingDirectory = @"D:\pipetest\pipetest\ffmpegx86";
process.StartInfo.Arguments = @"-f rawvideo -pix_fmt bgr0 -video_size 1920x1080 -i \\.\pipe\mytestpipe -map 0 -c:v libx264 -r " + BitmapRate + " " + FileName;
process.Start();
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = false;
//ar = p.BeginWaitForConnection(EndWait,null);
p.WaitForConnection();
}
public void PushFrame(Bitmap bmp)
{
int length;
// Lock the bitmap's bits.
//bmp = new Bitmap(1920, 1080);
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
//Rectangle rect = new Rectangle(0, 0, 1280, 720);
System.Drawing.Imaging.BitmapData bmpData =
bmp.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadOnly,
bmp.PixelFormat);
int absStride = Math.Abs(bmpData.Stride);
// Get the address of the first line.
IntPtr ptr = bmpData.Scan0;
// Declare an array to hold the bytes of the bitmap.
//length = 3 * bmp.Width * bmp.Height;
length = absStride * bmpData.Height;
byte[] rgbValues = new byte[length];
//Marshal.Copy(ptr, rgbValues, 0, length);
int j = bmp.Height - 1;
for (int i = 0; i < bmp.Height; i++)
{
IntPtr pointer = new IntPtr(bmpData.Scan0.ToInt32() + (bmpData.Stride * j));
System.Runtime.InteropServices.Marshal.Copy(pointer, rgbValues, absStride * (bmp.Height - i - 1), absStride);
j--;
}
p.Write(rgbValues, 0, length);
bmp.UnlockBits(bmpData);The ffmpeg command line is :
process.StartInfo.Arguments = @"-f rawvideo -pix_fmt bgr0 -video_size 1920x1080 -i \\.\pipe\mytestpipe -map 0 -c:v libx264 -r " + BitmapRate + " " + FileName;
And i checked with a breakpoint and saw that the variable BitmapRate is 25 .
And the timer interval is 40 .So it should fit for 25 frames per seconds.
But when i'm running the video file using MPC Media Player Class everything in the video is running very fast. I mean the video is 2,326KB size the video Length is 16 seconds .And everything in the video seems to mvoe very fast if i opend a new window or dragged a window somewhere in the screen i see it moving very fast and as it i moved and did everything in real .
I see on the video file details that : length 16 seconds. 1920x1080 and 25 frames per second.
So where is the problem ? i can't figure out.