
Recherche avancée
Autres articles (81)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (14603)
-
FPS reduction for H264 [closed]
11 mai 2024, par Александр АThere is a USB camera that sends H264 frames with a frequency of 30 fps in a resolution of 1920x1080, GOP size 30 or 60 (1 or 2 I frame per second depending on the camera), which requires throughput of about 6 mbit/s. It is necessary to reduce this to no more than 2 mbit/s. All this is done on a weak ARMv7, so the option of transcoding is extremely resource intensive, especially considering that I did not find how to do it as a GPU Mali.


Given that the basic functionality is performed on the framework ffmpeg, is it possible to reduce the frame rate, ideally to 10 fps, WITHOUT loss of quality and decoding ?


-
Inconsistant rendering in libmelt XML and C interface and 'hold' producer and avformat consumer
14 octobre 2016, par Leif AndersenI am trying to create a short video that is just a single image. (I know its a bit silly, but its a test for something bigger).
The code I have for rendering it is :
#include <framework></framework>mlt.h>
#include
#include
int main() {
if(mlt_factory_init(NULL)) {
mlt_profile p = mlt_profile_init(NULL);
mlt_consumer target = mlt_factory_consumer(p, "avformat",
mlt_producer source = mlt_factory_producer(p, "hold", "/Users/leif/logo.png");
mlt_producer_set_in_and_out(source, 0, 10);
mlt_consumer_connect(target, mlt_producer_service(source));
mlt_consumer_start(target);
sleep(5);
mlt_consumer_stop(target);
mlt_consumer_close(target);
mlt_producer_close(source);
mlt_factory_close();
} else {
printf("No\n");
}
return 0;
}Where
logo.png
is this file.When I run this code and play
output.mp4
, the picture comes out all garbelled. There is a green line in the middle and the logo is superimposed on itself a lot.On the other hand, if I change the consumer to be SDL, the image plays just fine.
And finally, if I change the consumer to be XML, and then use the melt command line application to render it :
melt -consumer avformat:xmlout.mp4 output.xml
and play the video, it also plays fine.
Is there something I am missing in the avformat consumer that I should be setting ? Or something else that I am missing here ?
Edit : For reference, the outputted xml file :
output.xml
is :<?xml version="1.0" encoding="utf-8"?>
<mlt version="6.2.0" root="/Users/leif/src/video/private" title="Anonymous Submission" parent="producer0" in="0" out="10">
<profile description="DV/DVD PAL" width="720" height="576" progressive="0" colorspace="601"></profile>
<producer title="Anonymous Submission" in="0" out="10">
<property>15000</property>
<property>pause</property>
<property>/Users/leif/logo.png</property>
<property>1.06667</property>
<property>0</property>
<property>onefield</property>
<property>hold</property>
<property>1</property>
</producer>
</mlt> -
Trying to upload a video to a server and then play it back to a video view (Xamarin android)
31 juillet 2016, par stackOverNoI’m currently working on a xamarin.android project, and am attempting to upload a video to an aws server, and then also be able to play it back. The upload is working correctly as far as I can tell.
I’m retrieving the file from the user’s phone, turning it into a byte array, and uploading that. This is the code to upload :
if (isImageAttached || isVideoAttached)
{
//upload the file
byte[] fileInfo = System.IO.File.ReadAllBytes(filePath);
Task<media> task = client.SaveMediaAsync(fileInfo, nameOfFile);
mediaObj = await task;
//other code below is irrelevant to example
}
</media>and SaveMediaAsync is a function I wrote in a PCL :
public async Task<media> SaveMediaAsync(byte[] fileInfo, string fName)
{
Media a = new Media();
var uri = new Uri(RestUrl);
try
{
MultipartFormDataContent form = new MultipartFormDataContent();
form.Add(new StreamContent(new MemoryStream(fileInfo)), "file", fName); //add file
var response = await client.PostAsync(uri, form); //post the form client is an httpclient object
string info = await response.Content.ReadAsStringAsync();
//save info to media object
string[] parts = info.Split('\"');
a.Name = parts[3];
a.Path = parts[7];
a.Size = Int32.Parse(parts[10]);
}
catch(Exception ex)
{
//handle exception
}
return a;
}
</media>After uploading the video like that, I’m able to view it in a browser using the public url. The quality is the same, and there is no issue with lag or load time. However when I try to play back the video using the same public url on my app on an android device, it takes an unbelievably long time to load the video. Even once it is loaded, it plays less than a second of it, and then seems to start loading the video again(the part of the progress bar that shows how much of the video has loaded jumps back to the current position and starts loading again).
VideoView myVideo = FindViewById<videoview>(Resource.Id.TestVideo);
myVideo.SetVideoURI(Android.Net.Uri.Parse(url));
//add media controller
MediaController cont = new MediaController(this);
cont.SetAnchorView(myVideo);
myVideo.SetMediaController(cont);
//start video
myVideo.Start();
</videoview>Now I’m trying to play a 15 second video that is 5.9mb. When I try to play a 5 second video that’s 375kb it plays with no issue. This leads me to believe I need to make the video file smaller before playing it back, but I’m not sure how to do that. I’m trying to allow the user to upload their own videos, so I’ll have all different file formats and sizes.
I’ve seen some people suggesting ffmpeg for a c# library to alter video files, but I’m not quite sure what it is I need to do to the video file. Can anyone fill in the gaps in my knowledge here ?
Thanks for your time, it’s greatly appreciated !