
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (52)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (6315)
-
ffmpeg avcodec_open2 returns -22 if I change my speaker configuration
5 octobre 2014, par pacificatorI keep having a strange issue lately.
Depending on how I set up my audio configuration in windows ( stereo/quad/5.1 ), a ffmpeg call to avcodec_open2() fails with error -22 or just works.
Not being able to find much about that error, I thought I should ask about it here.
The main flow goes like this :c = st->codec;
avformat_alloc_output_context2(&oc, NULL, NULL, "video.mpeg");
oc->fmt->audio_codec = AV_CODEC_ID_MP2;
AVDictionary* dict = NULL;
ret = av_dict_set(&dict, "ac", "2", 0);
c->request_channels = 2;
ret = avcodec_open2(c, codec, &dict); //HERE IT FAILS WITH -22 if speaker configuration is not stereoThe codec context ’c’ is set up like this in a stream :
st = avformat_new_stream(oc, *codec);
c = st->codec;
c->channels = 2;
c->channel_layout = AV_CH_LAYOUT_STEREO;
c->sample_fmt = AV_SAMPLE_FMT_S16;
c->codec_id = codec_id;Most of it is copied from their one of the muxing examples found in the documentation.
Everything works as expected if in windows I have set the output to stereo.If I set my speaker configuration to 5.1 ( 6 channels ), avcodec_open2 fails with error -22.
So I have a hard time understanding what am I doing wrong. Normally it should not be any relationship between my speaker configuration and the result of avcodec_open2.
Are there some other parameters that I need to set ?
-
FFmpeg returns empty byte when retrieving frames with python
13 août 2020, par Ronald SaunfeI am trying to retrieve frames from a video frame by frame using ffmpeg which i downloaded here but i get an empty response as byte :
i need someone to outline what my problem is.I got the solution from a blog here
Here is my source code :


import subprocess as sp

command=['bin\\ffmpeg.exe',
'-i','%s'%self.source,
'-f','image2pipe',
'-pix_fmt','rgb24',
'-vcodex','rawvideo','-']

self.pipe = sp.Popen(command, stdout = sp.PIPE, bufsize = 10**8)
Raw_image = self.pipe.stdout.read(420*360*3)



-
Encoding of video returns 0, and nothing written to the output file
14 juillet 2014, par AnilJI have written a code to record the webcam feed into a file on disk. I am attempting to do this using IContainer class rather than IMediaWriter class. I am pasting the code snippet below showing important sections of the code.
The problem I am facing is that nothing is being written to the file. Some of the observations I have made are as follows :
- In the Record() function, the ’while’ loop is kicked off, but the mVideoEncoder.encodeVideo(packet, frame, offset) ; method always returns zero (0). This results in no picture complete and no data is being written to the output file. Can you please provide clue as to what is missing ?
- I checked that the frame size is 80640, which confirms that frame has data.
- I see that only header and trailer is being written to the file.
Let me know if you need any other information.
public class WebcamRecorder {
private boolean StartVideoEncoder() {
boolean result = true;
// Open a container
mPositionInMicroseconds = 0;
mOutputContainer = IContainer.make();
mOutputContainer.open(mOutputFileName, IContainer.Type.WRITE, null);
// Create the video stream and get its coder
ICodec videoCodec = ICodec.findEncodingCodec(ICodec.ID.CODEC_ID_H264);
IStream videoStream = mOutputContainer.addNewStream(videoCodec);
mVideoEncoder = videoStream.getStreamCoder();
// Setup the stream coder
mFrameRate = IRational.make(1, 30);
mVideoEncoder.setWidth(Constants.RESAMPLE_PICT_WIDTH);
mVideoEncoder.setHeight(Constants.RESAMPLE_PICT_HEIGHT);
mVideoEncoder.setFrameRate(mFrameRate);
mVideoEncoder.setTimeBase(IRational.make(mFrameRate.getDenominator(),
mFrameRate.getNumerator()));
mVideoEncoder.setBitRate(350000);
mVideoEncoder.setNumPicturesInGroupOfPictures(30);
mVideoEncoder.setPixelType(IPixelFormat.Type.YUV420P);
mVideoEncoder.setFlag(IStreamCoder.Flags.FLAG_QSCALE, true);
mVideoEncoder.setGlobalQuality(0);
// Open the encoder
mVideoEncoder.open(null, null);
// Write the header
mOutputContainer.writeHeader();
return result;
}
public void Record() {
picture = GetNextPicture();
image = Utils.videoPictureToImage(picture);
// convert to the right image type
BufferedImage bgrScreen = ConvertToType(image, BufferedImage.TYPE_3BYTE_BGR);
IConverter converter = ConverterFactory.createConverter(bgrScreen, mVideoEncoder.getPixelType());
IVideoPicture frame = converter.toPicture(bgrScreen, mPositionInMicroseconds);
frame.setQuality(0);
IPacket packet = IPacket.make();
int offset = 0;
while (offset < frame.getSize()) {
int bytesEncoded = mVideoEncoder.encodeVideo(packet, frame, offset);
if (bytesEncoded < 0) {
throw new RuntimeException("Unable to encode video.");
}
offset += bytesEncoded;
if (packet.isComplete()) {
System.out.println("Packet is complete");
if (mOutputContainer.writePacket(packet) < 0) {
throw new RuntimeException(
"Could not write packet to container.");
}
// Update frame time
mPositionInMicroseconds += (mFrameRate.getDouble() * Math.pow(1000, 2));
break;
}
}
}
public void Cleanup() {
if (mOutputContainer != null) {
mOutputContainer.writeTrailer();
mOutputContainer.close();
// mOutputContainer.flushPackets();
}
if (mVideoEncoder != null) {
mVideoEncoder.close();
}
}
}