
Recherche avancée
Autres articles (66)
-
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone. -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (6926)
-
How to reproject and join these two clips with ffmpeg ?
20 janvier 2023, par jumpjackI have two videoclips embedded in this single video :


https://sci.esa.int/web/cassini-huygens/-/39218-huygens-descent-to-titan-surface


Download lo-res : link


The timings which I calculated to sync the two clips are :


- 

- 01:33.233 - 02:24.133
- 02:33.700 - 03:24.600






I want to join them into a single view ; I thought that cropping the video between the dots which mark east and west was enough, but it is not : I tried this, but with terrible results :


#echo off
# Cut east and west clips:
@echo cut east...
ffmpeg -ss 01:33.233 -to 02:24.133 -i %1 -vf "crop=900:450:73:0, pad=w=iw:h=2*ih:x=0:y=ih:color=black" -y east-crop.mp4
@echo cut west...
ffmpeg -ss 02:33.700 -to 03:24.600 -i %1 -vf "crop=900:450:73:0, pad=w=iw:h=2*ih:x=0:y=ih:color=black" -y west-crop.mp4

@echo merge...
ffmpeg -i west-crop.mp4 -i east-crop.mp4 -filter_complex hstack=inputs=2 -y combined.mp4



I think I have also to reproject... but I have no idea of which is the projection used.


Any suggestion ?


Example east/west frames :






I would like to obtain a single equirectangular image which reprojects into a full sphere when seen into a VR viewer.


Instead, I am getting this :




-
Slightly wrong color in MP4 videos written by PyAV
26 septembre 2024, par Yossi KreininI am writing MP4 video files with the following PyAV-based code (getting input frames represented as numpy arrays - the sort produced by imageio.imread - as input) :


class MP4:
 def __init__(self, fname, width, height, fps):
 self.output = av.open(fname, 'w', format='mp4')
 self.stream = self.output.add_stream('h264', str(fps))
 self.stream.width = width
 self.stream.height = height
 # these 2 lines can be removed and the problem still reproduces:
 self.stream.pix_fmt = 'yuv420p'
 self.stream.options = {'crf': '17'}
 def write_frame(self, pixels):
 frame = av.VideoFrame.from_ndarray(pixels, format='rgb24')
 packet = self.stream.encode(frame)
 self.output.mux(packet)
 def close(self):
 packet = self.stream.encode(None)
 self.output.mux(packet)
 self.output.close()



The colors in the output MP4 video are slightly different (apparently darker) than the colors in the input images :


Screen grab of an image viewer showing an input frame :




Screen grab of VLC playing the output MP4 video :




How can this problem be fixed ? I variously fiddled with the frame.colorspace attribute, stream options and VideoFrame.reformat but it changed nothing ; of course I could have been fiddling incorrectly.


As you can see, the input has simple flat color regions, so I doubt it's any sort of compression artifact, eg YUV420 dropping some of the chroma info or other such.


-
FFMPEG in Node.js : Conversion Failed
11 juillet 2024, par cuneyttylerI have a small node.js web app. I use like this in a get request :


app.get('/api/voice/:gender/:voice/:pitch', function(req, res){
 if(req.params.pitch == "1" || req.params.pitch == "1.0") {
 const file = "./voices/" + req.params.gender.toLowerCase() + "/" + req.params.voice + ".mp3"
 res.download(file);
 return
 }

 const inputFile = "./voices/" + req.params.gender.toLowerCase() + "/" + req.params.voice + ".mp3"
 const output_file = "./Audio/Temp/" + req.params.voice + ".mp3"
 ffmpeg()
 .input(inputFile)
 .audioCodec('pcm_s16le') // Set the audio codec to PCM with 16-bit depth
 .audioFrequency(44100) // Set the sample rate
 .on('error', function(err) {
 console.error('Error while converting:', err);
 })
 .on('end', function() {
 // res.download(output_file)
 })
 .save(output_file);

 });



It gives
Conversion Failed
error :

[2024-07-11T18:11:22.880Z] Error while converting: Error: ffmpeg exited with code 1: Conversion failed!

 at ChildProcess.<anonymous> (d:\Dev\Anima\Client\node_modules\fluent-ffmpeg\lib\processor.js:180:22)
 at ChildProcess.emit (d:\Dev\Anima\Client\lib\events.js:519:28)
 at ChildProcess._handle.onexit (d:\Dev\Anima\Client\lib\internal\child_process.js:294:12)
 at Process.callbackTrampoline (node:internal/async_hooks:130:17) {stack: 'Error: ffmpeg exited with code 1: Conversion …Trampoline (node:internal/async_hooks:130:17)', message: 'ffmpeg exited with code 1: Conversion failed!
'}
</anonymous>


When I use same code in a node.js desktop(.exe) app, it successfully runs. When I use it in an express.js app, it fails. Error message is not clear. What is the issue ?