
Recherche avancée
Autres articles (99)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
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 (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (6072)
-
How to achieve 2 pass encoding using x264 ?
6 avril 2017, par Kim Kardashianis there a parameter in the x264_param_t structure
or do I have to send frames to x264 dll twice.. ?
Because I just use encoder_encode function and that returns nal units .
Im guessing it should be a combination of a parameter and using encoder_encode twice.Here is how i initialize params and link to libx264
InitializeSettings(){
x264_param_default_preset(&m_pXParam, "medium", "zerolatency");
x264_param_apply_profile(&m_pXParam, "baseline");
m_pXParam.i_width = cx;
m_pXParam.i_height = cy;
m_pXParam.i_fps_num = fps;
m_pXParam.i_fps_den = 1;
// rate control
m_pXParam.i_keyint_max = fps - 5;
//m_pXParam.rc.f_rf_constant_max = fps + 5;
// rate control
m_pXParam.rc.i_qp_constant=18;
m_pXParam.rc.i_qp_min=18;
m_pXParam.rc.i_qp_max=18;}
x264_picture_alloc(&m_xPicture, X264_CSP_I420 , m_pXParam.i_width, m_pXParam.i_height);
m_xPicture.img = x264img;
m_iframe_size = x264_encoder_encode(m_xEncoder, &m_xNals, &m_iNal, &m_xPicture, &m_xPictureOut);@nobody555 Thanks ! I had another question about x264_param_apply_fastfirstpass function :
/* x264_param_apply_fastfirstpass:
* If first-pass mode is set (rc.b_stat_read == 0, rc.b_stat_write == 1),
* modify the encoder settings to disable options generally not useful on
* the first pass. */what options are they talking about ?
-
OpenCV won't capture frames from a RTMP source, while FFmpeg does
13 juin 2017, par user2957378my goal is to capture a frame from a rtmp stream every second, and process it using OpenCV. I’m using FFmpeg version N-71899-g6ef3426 and OpenCV 2.4.9 with the Java interface (but I’m first experimenting with Python).
For the moment, I can only take the simple and dirty solution, which is to capture images using FFmpeg, store them in disk, and then read those images from my OpenCV program. This is the FFmpeg command I’m using :ffmpeg -i "rtmp://antena3fms35livefs.fplive.net:1935/antena3fms35live-live/stream-lasexta_1 live=1" -r 1 capImage%03d.jpg
This is currently working for me, at least with this concrete rtmp source. Then I would need to read those images from my OpenCV program in a proper way. I have not actually implemented this part, because I’m trying to find a better solution.
I think the ideal way would be to capture the rtmp frames directly from OpenCV, but I cannot find the way to do it. This is the code in Python I’m using :
cv2.namedWindow("camCapture", cv2.CV_WINDOW_AUTOSIZE)
cap = cv2.VideoCapture()
cap.open('"rtmp://antena3fms35livefs.fplive.net:1935/antena3fms35live-live/stream-lasexta_1 live=1"')
if not cap.open:
print "Not open"
while (True):
err,img = cap.read()
if img and img.shape != (0,0):
cv2.imwrite("img1", img)
cv2.imshow("camCapture", img)
if err:
print err
break
cv2.waitKey(30)Instead of read() function, I’m also trying with grab() and retrieve() functions without any good result. The read() function is being executed every time, but no "img" or "err" is received.
Is there any other way to do it ? or maybe there is no way to get frames directly from OpenCV 2.4.9 from a stream like this ?I’ve read OpenCV uses FFmpeg to do this kind of tasks, but as you can see, in my case FFmpeg is able to get frames from the stream while OpenCV is not.
In the case I could not find the way to get the frames directly from OpenCV, my next idea is to pipe somehow, FFmpeg output to OpenCV, which seems harder to implement.
Any idea,
thank you !UPDATE 1 :
I’m in Windows 8.1. Since I was running the python script from Eclipse PyDev, this time I run it from cmd instead, and I’m getting the following warning :warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:545)
This warning means, as far as I could read, that either the file-path is wrong, or either the codec is not supported. Now, the question is the same. Is OpenCV not capable of getting the frames from this source ?
-
Crop MP3 to first 30 seconds
11 octobre 2020, par CheekysoftOriginal Question



I want to be able to generate a new (fully valid) MP3 file from an existing MP3 file to be used as a preview — try-before-you-buy style. The new file should only contain the first n seconds of the track.



Now, I know I could just "chop the stream" at n seconds (calculating from the bitrate and header size) when delivering the file, but this is a bit dirty and a real PITA on a VBR track. I'd like to be able to generate a proper MP3 file.



Anyone any ideas ?



Answers



Both
mp3split
andffmpeg
are both good solutions. I chose ffmpeg as it is commonly installed on linux servers and is also easily available for windows. Here's some more good command line parameters for generating previews with ffmpeg


- 

-t <seconds></seconds>
chop after specified number of seconds-y
force file overwrite-ab <bitrate></bitrate>
set bitrate e.g. -ab 96k-ar <rate hz="hz"></rate>
set sampling rate e.g. -ar 22050 for 22.05kHz-map_meta_data <outfile>:<infile></infile></outfile>
copy track metadata from infile to outfile













instead of setting -ab and -ar, you can copy the original track settings, as Tim Farley suggests, with :



- 

-acodec copy