
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (40)
-
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 -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)
Sur d’autres sites (5460)
-
ffmpeg : What is the best practice to keep a live connection/socket with a camera, and save time on ffprobe
15 mai 2022, par Jeff StrongmanToday... I used the following command : with
subprocess.PIPE
andsubprocess.Popen
in python 3 :

ffmpeg -i udp://{address_of_camera} \
 -vf select='if(eq(pict_type,I),st(1,t),gt(t,ld(1)))' setpts=N/FRAME_RATE/TB \
 -f rawvideo -an -vframes {NUM_WANTED_FRAMES} pipe:`



This command helps me to capture
NUM_WANTED_FRAMES
frames from a live camera at a given moment.

However... it takes me about 4 seconds to read the frames, and about 2.5 seconds to open a socket between my computer and the camera's computer.


Is there a way, to have a socket/connection always open between my computer and the camera's computer, to save the 2.5 seconds ?


I read something about
fifo_size
andoverrun_fatal
. I thought that maybe I can setfifo_size
to be equal toNUM_WANTED_FRAMES
, andoverrun_fatal
to True ? Will this solve my problem ? Or is there a different and simpler/better solution ?

Should I try to record always (no
-vframes
flag) store the frames in a queue(With max size), and upon a wish to slice the video, read from my queue buffer ? Will it work well with the keyframe ?

Also... What to do when ffmpeg fails ? restart the ffmpeg command ?


-
FFmpeg unable to save file on Android : Output file #0 does not contain any stream
16 mai 2022, par John M.I'm having difficulty when saving a RTSP stream into internal storage using
ffmpeg-kit -i rtsp://192.168.100.60:554/stream1 -c:v copy -c:a copy -t 5 /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4
. The command is called usingFFmpegKit.executeAsync(command, ...)
. There're issues with thecircular_buffer_size
option, but I read that the warnings could be ignored. The command runs fine on desktop usingffmpeg
. Please find below the log.

Any advice would be appreciated.


ffmpeg started on 2022-05-16 at 15:27:54
Report written to "/data/user/0/com.arthenica.ffmpegkit.test/cache/ffreport.txt"
Log level: 48
Command line:
ffmpeg-kit -i rtsp://192.168.100.60:554/stream1 -c:v copy -c:a copy -t 5 /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4
ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
 built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
 configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/storage/light/projects/ffmpeg-kit/prebuilt/android-x86-lts/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --target-os=android --disable-neon --disable-asm --disable-inline-asm --ar=i686-linux-android-ar --cc=i686-linux-android16-clang --cxx=i686-linux-android16-clang++ --ranlib=i686-linux-android-ranlib --strip=i686-linux-android-strip --nm=i686-linux-android-nm --extra-libs='-L/storage/light/projects/ffmpeg-kit/prebuilt/android-x86-lts/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc -- libavutil 57. 13.100 / 57. 13.100
 libavcodec 59. 15.102 / 59. 15.102
 libavformat 59. 10.100 / 59. 10.100
 libavdevice 59. 1.100 / 59. 1.100
 libavfilter 8. 21.100 / 8. 21.100
 libswscale 6. 1.102 / 6. 1.102
 libswresample 4. 0.100 / 4. 0.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'rtsp://192.168.100.60:554/stream1'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '5'.
Reading option '/data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://192.168.100.60:554/stream1.
Successfully parsed a group of options.
Opening an input file: rtsp://192.168.100.60:554/stream1.
[tcp @ 0xa21d3a80] No default whitelist set
[tcp @ 0xa21d3a80] Original list of addresses:
[tcp @ 0xa21d3a80] Address 192.168.100.60 port 554
[tcp @ 0xa21d3a80] Interleaved list of addresses:
[tcp @ 0xa21d3a80] Address 192.168.100.60 port 554
[tcp @ 0xa21d3a80] Starting connection attempt to 192.168.100.60 port 554
[tcp @ 0xa21d3a80] Successfully connected to 192.168.100.60 port 554
[rtsp @ 0xb25b5a00] SDP:
v=0
o=- 14665860 31787219 1 IN IP4 192.168.100.60
s=Session streamed by "MERCURY RTSP Server"
t=0 0
a=smart_encoder:virtualIFrame=1
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:4096
a=range:npt=0-
a=control:track1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; profile-level-id=4D4020; sprop-parameter-sets=Z01AIJWgFAF34maIAAADAAgAAAMBlCA=,aO48gA==

Failed to parse interval end specification ''
[rtsp @ 0xb25b5a00] video codec set to: h264
[rtsp @ 0xb25b5a00] RTP Packetization Mode: 1
[rtsp @ 0xb25b5a00] RTP Profile IDC: 4d Profile IOP: 40 Level: 20
[rtsp @ 0xb25b5a00] Extradata set to 0xb25abdf0 (size: 35)
[rtp @ 0xb25abe60] No default whitelist set
[udp @ 0xb25abed0] No default whitelist set
[udp @ 0xb25abed0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0xb25abed0] end receive buffer size reported is 524288
[udp @ 0xb25abf40] No default whitelist set
[udp @ 0xb25abf40] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0xb25abf40] end receive buffer size reported is 524288
[rtsp @ 0xb25b5a00] setting jitter buffer size to 500
[rtsp @ 0xb25b5a00] hello state=0
Failed to parse interval end specification ''
[h264 @ 0x907e5b00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x907e5b00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x907e5b00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x907e5b00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[rtsp @ 0xb25b5a00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://192.168.100.60:554/stream1':
 Metadata:
 title : Session streamed by "MERCURY RTSP Server"
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0, 0, 1/90000: Video: h264, none, 90k tbr, 90k tbn
Successfully opened the file.
Parsing a group of options: output url /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4.
Applying option c:v (codec name) with argument copy.
Applying option c:a (codec name) with argument copy.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 5.
Successfully parsed a group of options.
Opening an output file: /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4.
Output #0, mp4, to '/data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4':
Output file #0 does not contain any stream



-
How to stop ffmpeg when recording the desktop to save the file to the hard disk ?
27 juin 2022, par Eliot SheinI'm trying to record the desktop with the ffmpeg and save a video file to the hard disk.


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

namespace Testings
{
 internal class FFmpeg_Capture
 {
 Process process;

 public FFmpeg_Capture()
 {
 process = new Process();
 }

 public void Start(string FileName, int Framerate)
 {
 process.StartInfo.FileName = @"D:\Captured Videos\ffmpeg.exe"; // Change the directory where ffmpeg.exe is. 
 process.EnableRaisingEvents = false;
 process.StartInfo.WorkingDirectory = @"D:\Captured Videos"; // The output directory 
 process.StartInfo.Arguments = @"-f gdigrab -framerate " + Framerate +
 " -i desktop -preset ultrafast - pix_fmt yuv420p " + FileName;
 process.Start();
 process.StartInfo.UseShellExecute = false;
 process.StartInfo.CreateNoWindow = false;
 Stop();
 }

 public void Stop()
 {
 process.Close();
 }
 }
}



And using it in form1 :


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

 if (recordToggle)
 {
 btnRecord.Text = "Stop";
 record.Start("Testing", 60);
 }
 else
 {
 btnRecord.Text = "Record";
 record.Stop();
 }
 }



but the file Testing never saved to the hard disk. my guess is that


process.Close();



is not like ctrl+ c and ctrl + c is what stopping the ffmpeg and save the file.


This is working but how to remove the black window of the ffmpeg ?




using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Testings
{
 internal class FFmpeg_Capture
 {
 Process process;

 public FFmpeg_Capture()
 {
 process = new Process();
 }

 public void Start(string FileName, int Framerate)
 {
 process.StartInfo.FileName = @"D:\Captured Videos\ffmpeg.exe"; // Change the directory where ffmpeg.exe is. 
 process.EnableRaisingEvents = false;
 process.StartInfo.WorkingDirectory = @"D:\Captured Videos\"; // The output directory 
 process.StartInfo.Arguments = @"-y -f gdigrab -framerate " + Framerate +
 " -i desktop -preset ultrafast -pix_fmt yuv420p " + FileName;
 process.StartInfo.UseShellExecute = false;
 process.StartInfo.CreateNoWindow = false;
 process.StartInfo.RedirectStandardInput = true; //Redirect stdin
 process.Start();
 }

 public void Stop()
 {
 byte[] qKey = Encoding.GetEncoding("gbk").GetBytes("q"); //Get encoding of 'q' key
 process.StandardInput.BaseStream.Write(qKey, 0, 1); //Write 'q' key to stdin of FFmpeg sub-processs
 process.StandardInput.BaseStream.Flush(); //Flush stdin (just in case).
 process.Close();
 }
 }
}