
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (32)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (5090)
-
automatically run script recording video at interval using command line and ffmpg
29 décembre 2014, par arrieI’m really a beginner noob newbie command line noob. But. I’m trying to create a script that automatically starts my isight camera when turning on my mac laptop. It should create clips of about 5 seconds at an interval of 5 hours or so. (These numbers I can change of course later on if I have the basis for my script).
So what I in fact need is (i think) a launch script, that launches a video recording script.
Right now I’m as far as my video recording script, which is not finished : camera.sh
#!/bin/bash
FNAME=videocapture_`date +"%F_%H_%M"`.mpg
echo $FNAME
ffmpeg -f -t "0.20avfoundation -i "" $FNAME
This in fact records a video when I play the script in the command line, until I tell it to quit. These videos are then named according to the date etc. But of course I want it to automatically record videos, in an already determined duration. And I just can’t seem to figure out how to make it happen. I come back to different kind of scripts using isight capture, which in fact doesn’t seem to exist anymore, and even so, I would like to stay with my own basis script just because I understand it haha.
Hopefully someone here can help me figure this out ! Much appreciated :) Thanks !
-
Is there a way to pause a script until ffmpeg finishes converting a file ?
6 mai 2019, par Alex DouradoI have a python script that uploads a file to the cloud prematurely (before it finishes being converted to ogg), how can I pause the script until the conversion finishes without using something like time.sleep ?
cmd = ("ffmpeg -i " + mp4_file + " -y -loglevel quiet -ar 16000 -ac 1 -acodec libopus -vn " + audio_file)
os.popen(cmd) -
How can I make ffmpeg output proper SDP data for a data stream
8 juillet 2021, par Shalom CrownI have a program based on the FFMPEG libraries, to add KLV data to a video stream. When I try to sent the output to an RTSP server (rtsp-simple-server), I get a 400 response.


The apparent reason is that the SDP data for the KLV stream is missing the rtpmap.


I would like to add the missing data either by setting the proper parameters in the contexts, or by specifying the data explicitly.


This is the ANNOUNCE captured with Wireshark


ANNOUNCE rtsp://0.0.0.0:8554/test RTSP/1.0
Content-Type: application/sdp
CSeq: 2
User-Agent: Lavf58.29.100
Content-Length: 270

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 0 RTP/AVP 96
b=AS:10000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
a=control:streamid=0
m=application 0 RTP/AVP 97
b=AS:90
a=control:streamid=1



Code fragment for initializing the data stream :


AVStream* data_track = avformat_new_stream(muxer, nullptr);

if (data_track == nullptr) {
 LOG_ERROR << "failed to open data output stream";
 return nullptr;
}

muxer->oformat->video_codec = AV_CODEC_ID_H264;

AVCodec *klvEncoder = avcodec_find_encoder(AV_CODEC_ID_SMPTE_KLV);

if (klvEncoder == nullptr) {
 klvEncoder = avcodec_find_encoder(AV_CODEC_ID_BIN_DATA);
}

if (klvEncoder == nullptr) {
 klvEncoder = avcodec_find_encoder(AV_CODEC_ID_TEXT);
}

if (klvEncoder != nullptr) {
 klvEncoderContext = avcodec_alloc_context3(encoder);

 avcodec_parameters_from_context(data_track->codecpar, encoderContext);
} else {
 avcodec_parameters_copy(data_track->codecpar, pVideoStream->codecpar);
}

data_track->codecpar->codec_tag = KLV_ID_TAG;
data_track->codecpar->codec_type = AVMEDIA_TYPE_DATA;
data_track->codecpar->codec_id = AV_CODEC_ID_SMPTE_KLV;
data_track->codecpar->bit_rate = 90000;
data_track->codecpar->format = AV_SAMPLE_FMT_U8;
data_track->stream_identifier = KLV_ID_TAG;
data_track->id = 0x101;
data_track->time_base = video_track->time_base;
data_track->avg_frame_rate = video_track->time_base;