
Recherche avancée
Autres articles (93)
-
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 février 2011, parLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...) -
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 -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (9151)
-
AVIOContext custom stream playback glitches/corruption on UDP stream
21 décembre 2017, par WLGfxI’ve written a general all round player (for Android OS) which plays file based streams as well as streams from network sources, and it all works good. File based streams I’ve got the seeking which works too.
What it is I’m now struggling with is now I’m using
AVIOContext
to latch onto a UDP stream which saves the packet data partially in memory and then to transient storage. This is so I can pause live TV and also seek within it.However, after much faffing about, during playback (seeking is only partial at the moment), either the video frame rate will drop from 25FPS (will be deinterlaced on higher spec devices) down to between 17 and 19 frames per second, or, it will glitch and grey out.
When I playback the record TS data from the file, it plays perfect, so the UDP buffering and writing out the overflow is sound. (This is currently not true now, only currently a minor issue)
I’m at the point were I’ve spent a lot of time on this and I’m at a loss as to why I get either frame drops or glitches.
The class def :
#define PKT_SIZE (188)
#define PKT_SIZE7 (PKT_SIZE * 7)
#define UDP_QUEUE_SIZE (12000)
#define UDP_THRESHOLD (100)
#define FILE_QUEUE_PKTS (200000)
#define AVIO_QUEUE_SIZE (24)
#define AVIO_THRESHOLD (10)
extern "C" {
#include "libavformat/avio.h"
};
/*
* PracticalSocket class as found here with examples:
* http://cs.baylor.edu/~donahoo/practical/CSockets/practical/
*/
#include "PracticalSocket.h"
class FFIOBufferManager2 {
public:
AVIOContext *avioContext = nullptr;
bool quit = false;
char udp_buffer[UDP_QUEUE_SIZE][PKT_SIZE7];
int udp_write_pos, udp_size; // by PKT_SIZE7
char *get_udp_buffer(int index);
int get_udp_buffer_size() { return udp_size; }
int file_write_pos, file_size; // by PKT_SIZE7
std::fstream file_out, file_in;
std::mutex udp_mutex, file_mutex;
std::thread udp_thread, file_thread;
static void udp_thread_func(FFIOBufferManager2 *io, const char *ip, int port);
static void file_thread_func(FFIOBufferManager2 *io, const char *dir);
void udp_thread_run(const char *ip, int port);
void file_thread_run();
char avio_buffer[AVIO_QUEUE_SIZE * 7 * PKT_SIZE];
int64_t avio_read_offset; // controlled by udp mutex (quickest)
static int avio_read(void *ptr, uint8_t *buff, int buf_size);
static int64_t avio_seek(void *ptr, int64_t pos, int whence);
int avio_read_run(uint8_t *buf, int buf_size);
int64_t avio_seek_run(int64_t pos, int whence);
void write_udp_overflow();
void start(const char *ip, int port, const char *dir);
void get_size_and_pos(int64_t *size, int64_t *pos);
~FFIOBufferManager2();
};The classes methods :
#include
#include "FFIOBufferManager2.h"
#include "LOG.h"
void FFIOBufferManager2::start(const char *ip, int port, const char *dir) {
file_write_pos = 0;
file_size = 0;
udp_write_pos = 0;
udp_size = 0;
avio_read_offset = 0;
file_thread = std::thread(&FFIOBufferManager2::file_thread_func, this, dir);
udp_thread = std::thread(&FFIOBufferManager2::udp_thread_func, this, ip, port);
LOGD("Initialising avioContext");
avioContext = avio_alloc_context((uint8_t*)avio_buffer,
AVIO_QUEUE_SIZE * PKT_SIZE7,
0,
this,
avio_read,
NULL,
avio_seek);
}
void FFIOBufferManager2::udp_thread_func(FFIOBufferManager2 *io, const char *ip, int port) {
LOGD("AVIO UDP thread started address %s port %d - %08X", ip, port, (uint)io);
io->udp_thread_run(ip, port); // run inside class
LOGD("AVIO UDP thread stopped");
}
void FFIOBufferManager2::udp_thread_run(const char *ip, int port) {
std::string addr = ip;
UDPSocket socket(addr, (uint16_t)port);
socket.joinGroup(addr);
LOGD("UDP loop starting");
while (!quit) {
if (socket.recv(get_udp_buffer(udp_write_pos), PKT_SIZE7) == PKT_SIZE7) {
udp_mutex.lock();
udp_write_pos = (udp_write_pos + 1) % UDP_QUEUE_SIZE;
udp_size++;
if (udp_size >= UDP_QUEUE_SIZE) udp_size--;
else avio_read_offset += PKT_SIZE7;
udp_mutex.unlock();
}
}
}
void FFIOBufferManager2::file_thread_func(FFIOBufferManager2 *io, const char *dir) {
LOGD("AVIO FILE thread started");
std::string file = dir;
const char *tsfile_name = "/tsdata.ts";
file += tsfile_name;
LOGD("Deleting old file %s", file.c_str());
remove(file.c_str());
{
fstream temp; // create the ts file
temp.open(file.c_str());
temp.close();
}
LOGD("Opening %s for read and write", file.c_str());
io->file_out.open(file, fstream::out | fstream::binary);
io->file_in.open(file, fstream::in | fstream::binary);
io->file_thread_run(); // continue inside the class to lessen pointer use
LOGD("AVIO FILE thread stopped");
}
void FFIOBufferManager2::file_thread_run() {
LOGD("FILE thread run");
if (!file_out.is_open() || !file_in.is_open()) {
LOGE("TS data file, error opening...");
quit = true;
return;
}
int udp_threshold = UDP_QUEUE_SIZE - (UDP_THRESHOLD * 4);
while (!quit) {
if (udp_size >= udp_threshold) write_udp_overflow();
else usleep(1000 * 1);
}
}
void FFIOBufferManager2::write_udp_overflow() {
file_mutex.lock();
udp_mutex.lock();
int udp_write_pos_current = udp_write_pos;
int udp_size_current = udp_size;
udp_mutex.unlock();
int udp_index = udp_write_pos_current - udp_size_current;
if (udp_index < 0) udp_index += UDP_QUEUE_SIZE;
int written = 0;
//file_out.seekp((int64_t)file_write_pos * PKT_SIZE7);
while (written < UDP_THRESHOLD) {
file_out.write(get_udp_buffer(udp_index), PKT_SIZE7);
written++;
udp_index = (udp_index + 1) % UDP_QUEUE_SIZE;
file_write_pos++;
if (file_write_pos >= FILE_QUEUE_PKTS) {
file_write_pos = 0;
file_out.seekp(0);
}
file_size++;
if (file_size > FILE_QUEUE_PKTS) file_size = FILE_QUEUE_PKTS;
}
udp_mutex.lock();
udp_size -= UDP_THRESHOLD; // we've written this amount out
udp_mutex.unlock();
//file_out.flush();
file_mutex.unlock();
//LOGD("Written UDP overflow at %d of %d blocks file size %d",
// udp_index, written, file_size);
}
char *FFIOBufferManager2::get_udp_buffer(int index) {
if (index < 0 || index >= UDP_QUEUE_SIZE) return nullptr;
return ((char*)udp_buffer + (index * PKT_SIZE7));
}
/*
* The avio_read and avio_seek now work on either 188 byte alignment or
* byte alignment for the benefit of ffmpeg - byte positioning at the moment
*
* The file_mutex allows for either a read or write operation at a time
*/
int FFIOBufferManager2::avio_read(void *ptr, uint8_t *buff, int buf_size) {
FFIOBufferManager2 *io = (FFIOBufferManager2*)ptr;
return io->avio_read_run(buff, buf_size);
}
int64_t FFIOBufferManager2::avio_seek(void *ptr, int64_t pos, int whence) {
FFIOBufferManager2 *io = (FFIOBufferManager2*)ptr;
return io->avio_seek_run(pos, whence);
}
int FFIOBufferManager2::avio_read_run(uint8_t *buf, int buf_size) {
file_mutex.lock();
udp_mutex.lock();
int64_t cur_udp_write_pos = (int64_t) udp_write_pos * PKT_SIZE7;
int64_t cur_udp_size = (int64_t) udp_size * PKT_SIZE7;
int64_t cur_file_write_pos = (int64_t) file_write_pos * PKT_SIZE7;
int64_t cur_file_size = (int64_t) file_size * PKT_SIZE7;
int64_t cur_avio_read_offset = avio_read_offset; // already int64_t (under the udp_mutex)
udp_mutex.unlock();
if (cur_avio_read_offset < (AVIO_THRESHOLD * 4) * PKT_SIZE7) {
file_mutex.unlock();
return 0;
}
int64_t udp_buffer_max = (int64_t) (UDP_QUEUE_SIZE * PKT_SIZE7);
int64_t file_buffer_max = (int64_t) (FILE_QUEUE_PKTS * PKT_SIZE7);
uint8_t *ptr_udp_buffer = (uint8_t*)udp_buffer;
int cur_written = 0;
int file_reads = 0, udp_reads = 0; // for debugging
int64_t cur_file_offset = cur_file_write_pos - cur_udp_size - cur_avio_read_offset;
while (cur_file_offset < 0) cur_file_offset += file_buffer_max;
if (cur_file_offset >= 0) {
file_in.seekg(cur_file_offset);
while (//cur_avio_read_offset > 0
cur_avio_read_offset > cur_udp_size
&& cur_written < buf_size) { // read from file first
file_in.read(&avio_buffer[cur_written], PKT_SIZE); // get 1 or 188 byte/s
cur_file_offset+=PKT_SIZE;
if (cur_file_offset >= file_buffer_max) { // back to file beginning
cur_file_offset = 0;
file_in.seekg(0);
}
cur_avio_read_offset-=PKT_SIZE;
cur_written+=PKT_SIZE;
file_reads+=PKT_SIZE;
}
}
int64_t cur_udp_offset = (cur_udp_write_pos - cur_avio_read_offset);
if (cur_udp_offset < 0) cur_udp_offset += udp_buffer_max;
while (cur_avio_read_offset > AVIO_THRESHOLD * PKT_SIZE7
&& cur_avio_read_offset <= cur_udp_size
&& cur_written < buf_size) { // read the rest from udp buffer
buf[cur_written] = ptr_udp_buffer[cur_udp_offset]; // get byte
cur_udp_offset = (cur_udp_offset + 1) % udp_buffer_max;
if (cur_udp_offset == 0) LOGD("AVIO UDP BUFFER to start");
cur_avio_read_offset--;
cur_written++;
udp_reads++;
}
udp_mutex.lock();
avio_read_offset -= cur_written;
udp_mutex.unlock();
file_mutex.unlock();
if (cur_written) {
LOGD("AVIO_READ: Written %d of %d, avio_offset %lld, file reads %d, udp reads %d, udp offset %lld, file offset %lld, file size %lld",
cur_written, buf_size,
cur_avio_read_offset,
file_reads, udp_reads,
cur_udp_write_pos, cur_file_write_pos, cur_file_size);
}
return cur_written;
}
int64_t FFIOBufferManager2::avio_seek_run(int64_t pos, int whence) {
// SEEK_SET(0), SEEK_CUR(1), SEEK_END(2), AVSEEK_SIZE
int64_t new_pos = -1;
int64_t full_length = (udp_size + file_size) * PKT_SIZE7;
switch (whence) {
case AVSEEK_SIZE:
LOGD("AVSEEK_SIZE pos %lld", pos);
break;
case SEEK_SET:
LOGD("AVSEEK_SET pos %lld", pos);
if (pos > full_length) new_pos = full_length;
else new_pos = full_length - pos;
break;
case SEEK_CUR:
LOGD("AVSEEK_CUR pos %lld", pos);
break;
case SEEK_END:
LOGD("AVSEEK_END pos %lld", pos);
new_pos = pos;
break;
default:
LOGD("UNKNOWN AVIO SEEK whence %d pos %lld", whence, pos);
break;
}
if (new_pos >= 0) {
udp_mutex.lock();
new_pos = (new_pos / PKT_SIZE) * PKT_SIZE; // align to packet boundary
avio_read_offset = new_pos;
//file_out.seekg(full_length - new_pos);
udp_mutex.unlock();
return full_length - new_pos;
}
return -1;
}
FFIOBufferManager2::~FFIOBufferManager2() {
if (avioContext) ;// TODO whoops
quit = true;
if (udp_thread.joinable()) udp_thread.join();
if (file_thread.joinable()) file_thread.join();
}
void FFIOBufferManager2::get_size_and_pos(int64_t *size, int64_t *pos) {
file_mutex.lock();
udp_mutex.lock();
*size = (udp_size + file_size) * PKT_SIZE7;
*pos = *size - avio_read_offset;
udp_mutex.unlock();
file_mutex.unlock();
}It’ll play for a few seconds before any of the glitches start to appear. I have checked against the udp_buffer and the avio_buffer, but my suspicions lie with one of two things :
- Reading and writing to the file.
- the
avio_read
method is wrong.
Has anybody got any input as to why this is occurring ? Any thoughts would be greatly appreciated.
If you need any more information I’ll be glad to provide more details.
EDIT : Seeking now actually moves to any point within the stream, but now doesn’t read from the file recording. Although that’s only a minor issue at the moment.
The main two issues still stand, frame rate drops dramatically and the glitches after approximately 8 seconds.
-
2011 In Open Source Multimedia
5 janvier 2012, par Multimedia Mike — Open Source MultimediaSometimes I think that the pace of multimedia technology is slowing down. Obviously, I’m not paying close enough attention. I thought I would do a little 2011 year-end review of what happened in the world of open source multimedia, mainly for my own benefit. Let me know in the comments what I missed.
The Split
The biggest deal in open source multimedia was the matter of the project split. Where once stood one project (FFmpeg) there now stands two (also Libav). Where do things stand with the projects now ? Still very separate but similar. Both projects obsessively monitor each other’s git commits and prodigiously poach each other’s work, both projects being LGPL and all. Most features that land in one code base end up in the other. Thus, I refer to FFmpeg and Libav collectively as “the projects”.Some philosophical reasons for the split included project stagnation and development process friction. Curiously, these problems are fond memories now and the spirit of competition has pushed development forward at a blinding pace.
People inside the project have strong opinions about the split ; that’s understandable. People outside the project have strong opinions about the split ; that’s somewhat less understandable, but whatever. After 5 years of working for Adobe on the Flash Player (a.k.a. the most hated software in all existence if internet nerds are to be believed on the matter), I’m so over internet nerd drama.
For my part, I just try to maintain some appearance of neutrality since I manage some shared resources for the open source multimedia community (like the wiki and samples repo) and am trying to keep them from fracturing as well.
Apple and Open Source
It was big news that Apple magnanimously open sourced their lossless audio codec. That sets a great example and precedent.New Features
I mined the'git log'
of the projects in order to pick out some features that were added during 2011.First off, Apple’s ProRes video codec was reverse engineered and incorporated into the multimedia libraries. And for some weird reason, this is an item that made the rounds in the geek press. I’m not entirely sure why, but it may have something to do with inter-project conflict. Anyway, here is the decoder in action, playing a video of some wild swine, one of the few samples we have :
Other new video codecs included a reverse engineered Indeo 4 decoder. Gotta catch ‘em all ! That completes our collection of Indeo codecs. But that wasn’t enough– this year, we got a completely revised Indeo 3 decoder (the previous one, while functional, exhibited a lot of code artifacts betraying a direct ASM ->C translation). Oh, and many thanks to Kostya for this gem :
That’s the new Origin Xan decoder (best known for Wing Commander IV cinematics) in action, something I first started reverse engineering back in 2002. Thanks to Kostya for picking up my slack yet again.
Continuing with the codec section, there is a decoder for Adobe Flash Screen Video 2 — big congrats on this ! One of my jobs at Adobe was documenting this format to the outside world and I was afraid I could never quite make it clear enough to build a complete re-implementation. But the team came through.
Let’s see, there are decoders for VBLE video, Ut Video, Windows Media Image (WMVP/WMP2), Bink audio version ‘b’, H.264 4:2:2 intra frames, and MxPEG video. There is a DPX image encoder, a Cirrus Logic AccuPak video encoder, and a v410 codec.
How about some more game stuff ? The projects saw — at long last — an SMJPEG demuxer. This will finally allow usage and testing of the SMJPEG IMA ADPCM audio decoder I added about a decade ago. Funny story behind that– I was porting all of my decoders from xine which included the SMJPEG ADPCM. I just never quite got around to writing a corresponding demuxer. Thanks to Paul Mahol for taking care of that.
Here’s a DFA playback system for a 1995 DOS CD-ROM title called Chronomaster. No format is too obscure, nor its encoded contents too cheesy :
There’s now a demuxer for a format called XMV that was (is ?) prevalent on Xbox titles. Now the projects can handle FMV files from many Xbox games, such as Thrillville.
The projects also gained the ability to play BMV files. I think this surfing wizard comes from Discworld II. It’s non-computer-generated animation at a strange resolution.
More demuxers : xWMA, PlayStation Portable PMP format, and CRI ADX format ; muxer for OpenMG audio and LATM muxer/demuxer.
One more thing : an AVX-optimized fast Fourier transform (FFT). If you have a machine that supports AVX, there’s no way you’ll even notice the speed increase of a few measly FFT calls for audio coding/decoding, but that’s hardly the point. The projects always use everything on offer for any CPU.
Please make me aware of features that I missed in the list !
Continuous Testing
As a result of the split, each project has its own FATE server, one for FFmpeg and one for Libav. As of the new year, FFmpeg has just over 1000 tests while Libav had 965. This is one area where I’m obviously ecstatic to see competition. Some ad-hoc measurements on my part indicate that the total code coverage via the FATEs has not appreciably increased. But that’s a total percentage. Both the test count and the code count have been steadily rising.Google Summer of Code and Google Code-In
Once again, the projects were allowed to participate in the Google Summer of Code as well as Google Code-In. I confess that I didn’t keep up with these too carefully (and Code-In is still in progress as of this writing). I do know that the project split occurred after FFmpeg had already been accepted for GSoC season 2011 and the admins were gracious enough to allow FFmpeg and Libav to allow both projects to participate in the same slot as long as they could both be mature about it.Happy New Year
Let’s see what we can accomplish in 2012. -
ffmpeg can't stop, when running with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
9 novembre 2022, par haizhohuangwhen i use local ffmpeg, it exit normally.


cmd = f'ffmpeg -nostdin -vsync 0 -i {sec_replace(video_path)} -r {marked_paras.get_divide_frame_fps()}' \
 f'-q:v 2 -f image2 {crop_info} {sec_replace(default_frames_dir)}%08d.png'
logger.info(cmd)
p = subprocess.Popen(cmd,
 stdin=subprocess.PIPE,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE, shell=True)

# p.communicate()
command.utp_command("ps aux | grep ffmpeg")
timer = Timer(60, p.kill)
try:
 timer.start()
 stdout, stderr = p.communicate()
finally:
 timer.cancel()
command.utp_command("ffmpeg --version")
logger.info("stdout: {}".format(stdout))
logger.info("stdout: {}".format(stderr))



local stdout
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers\n built with Apple clang version 14.0.0


stdout: b"ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers\n built with Apple clang version 14.0.0 (clang-1400.0.29.102)\n configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox\n libavutil 57. 28.100 / 57. 28.100\n libavcodec 59. 37.100 / 59. 37.100\n libavformat 59. 27.100 / 59. 27.100\n libavdevice 59. 7.100 / 59. 7.100\n libavfilter =-0.0 size=N/A time=00:00:07.56 bitrate=N/A speed=0.71x \r[image2 @ 0x7fd891906080] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 231 >= 231\nframe= 281 fps= 25 q=-0.0 size=N/A time=00:00:07.90 bitrate=N/A speed=0.708x \rframe= 291 fps= 25 q=-0.0 size=N/A time=00:00:08.23 bitrate=N/A speed=0.706x \r[image2 @ 0x7fd891906080] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 247 >= 247\nframe= 300 fps= 25 q=-0.0 size=N/A time=00:00:08.50 bitrate=N/A speed=0.698x \r[image2 @ 0x7fd891906080] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 261 >= 261\nframe= 312 fps= 25 q=-0.0 size=N/A time=00:00:08.86 bitrate=N/A speed=0.699x \r[image2 @ 0x7fd891906080] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 276 >= 276\nframe= 325 fps= 25 q=-0.0 size=N/A time=00:00:09.26 bitrate=N/A speed=0.702x \rframe= 335 fps= 24 q=-0.0 size=N/A time=00:00:09.60 bitrate=N/A speed= 0.7x \r[image2 @ 0x7fd891906080] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 290 >= 290\n[image2 @ 0x7fd891906080] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 305 >= 305\nframe= 344 fps= 24 q=-0.0 Lsize=N/A time=00:00:10.23 bitrate=N/A speed=0.708x \nvideo:1096936kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown\n"



But when i put it in cloud. it can't stop the subprocess and blocking in communicate util being killed


remote output
ffmpeg version 3.4.11 Copyright (c) 2000-2022 the FFmpeg developers\n built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)


stdout: b"ffmpeg version 3.4.11 Copyright (c) 2000-2022 the FFmpeg developers\n built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)\n configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect\n libavutil 55. 78.100 / 55. 78.100\n libavcodec 57.107.100 / 57.107.100\n libavformat 57. 83.100 / 57. 83.100\n libavdevice 57. 10.100 / 57. 10.100\n libavfilter 6.107.100 / 6.107.100\n libavresample 3. 7. 0 / 3. 7. 0\n libswscale 4. 8.100 / 4. 8.100\n libswresample 2. 9.100 / 2. 9.100\n libpostproc 54. 7.100 / 54. 7.100\nInput #0, matroska,webm, from 'case.videoquality.recommend_video_quality_performance_case.recommend_video_quality_test/record_video/com.tencent.mtt/1667903766/test.mkv':\n Metadata:\n COMMENT : Recorded by scrcpy 1.24\n ENCODER : Lavf57.83.100\n Duration: N/A, start: 0.000000, bitrate: N/A\n Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1080x2240, 1k fps, 59.94 tbr, 1k tbn, 2k tbc (default)\nUsing -vsync 0 and -r can produce invalid output files\nStream mapping:\n Stream #0:0 -> #0:0 (h264 (native) -> png (native))\nPress [q] to stop, [?] for help\nOutput #0, image2, to 'case.videoquality.recommend_video_quality_performance_case.recommend_video_quality_test/record_video/com.tencent.mtt/1667903766/frames_end/%08d.png':\n Metadata:\n COMMENT : Recorded by scrcpy 1.24\n encoder : Lavf57.83.100\n Stream #0:0: Video: png, rgb24, 1080x2240, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)\n Metadata:\n encoder : Lavc57.107.100 png\nframe= 6 fps=0.0 q=-0.0 size=N/A time=00:00:00.06 bitrate=N/A speed=0.109x \r[image2size=N/A time=00:00:17.06 bitrate=N/A speed=0.296x \r[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 512 >= 512\n[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 514 >= 514\nframe= 703 fps= 12 q=-0.0 size=N/A time=00:00:17.20 bitrate=N/A speed=0.295x \r[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 516 >= 516\n[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 517 >= 517\n[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 518 >= 518\nframe= 711 fps= 12 q=-0.0 size=N/A time=00:00:17.36 bitrate=N/A speed=0.295x \r[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 520 >= 520\n[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 521 >= 521\n[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 522 >= 522\nframe= 717 fps= 12 q=-0.0 size=N/A time=00:00:17.46 bitrate=N/A speed=0.293x \r[image2 @ 0x1a3e900] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 524 >= 524\n"



i want to stop the subprocess by ffmpeg self in cloud