
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (41)
-
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 (...) -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (4556)
-
ffmpeg video to opengl texture
23 avril 2017, par Infiniti FizzI’m trying to render frames grabbed and converted from a video using ffmpeg to an OpenGL texture to be put on a quad. I’ve pretty much exhausted google and not found an answer, well I’ve found answers but none of them seem to have worked.
Basically, I am using
avcodec_decode_video2()
to decode the frame and thensws_scale()
to convert the frame to RGB and thenglTexSubImage2D()
to create an openGL texture from it but can’t seem to get anything to work.I’ve made sure the "destination" AVFrame has power of 2 dimensions in the SWS Context setup. Here is my code :
SwsContext *img_convert_ctx = sws_getContext(pCodecCtx->width,
pCodecCtx->height, pCodecCtx->pix_fmt, 512,
256, PIX_FMT_RGB24, SWS_BICUBIC, NULL,
NULL, NULL);
//While still frames to read
while(av_read_frame(pFormatCtx, &packet)>=0) {
glClear(GL_COLOR_BUFFER_BIT);
//If the packet is from the video stream
if(packet.stream_index == videoStream) {
//Decode the video
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
//If we got a frame then convert it and put it into RGB buffer
if(frameFinished) {
printf("frame finished: %i\n", number);
sws_scale(img_convert_ctx, pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
glBindTexture(GL_TEXTURE_2D, texture);
//gluBuild2DMipmaps(GL_TEXTURE_2D, 3, pCodecCtx->width, pCodecCtx->height, GL_RGB, GL_UNSIGNED_INT, pFrameRGB->data);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0,0, 512, 256, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, number);
number++;
}
}
glColor3f(1,1,1);
glBindTexture(GL_TEXTURE_2D, texture);
glBegin(GL_QUADS);
glTexCoord2f(0,1);
glVertex3f(0,0,0);
glTexCoord2f(1,1);
glVertex3f(pCodecCtx->width,0,0);
glTexCoord2f(1,0);
glVertex3f(pCodecCtx->width, pCodecCtx->height,0);
glTexCoord2f(0,0);
glVertex3f(0,pCodecCtx->height,0);
glEnd();As you can see in that code, I am also saving the frames to .ppm files just to make sure they are actually rendering, which they are.
The file being used is a .wmv at 854x480, could this be the problem ? The fact I’m just telling it to go 512x256 ?
P.S. I’ve looked at this Stack Overflow question but it didn’t help.
Also, I have
glEnable(GL_TEXTURE_2D)
as well and have tested it by just loading in a normal bmp.EDIT
I’m getting an image on the screen now but it is a garbled mess, I’m guessing something to do with changing things to a power of 2 (in the decode,
swscontext
andgluBuild2DMipmaps
as shown in my code). I’m usually nearly exactly the same code as shown above, only I’ve changedglTexSubImage2D
togluBuild2DMipmaps
and changed the types toGL_RGBA
.Here is what the frame looks like :
EDIT AGAIN
Just realised I haven’t showed the code for how pFrameRGB is set up :
//Allocate video frame for 24bit RGB that we convert to.
AVFrame *pFrameRGB;
pFrameRGB = avcodec_alloc_frame();
if(pFrameRGB == NULL) {
return -1;
}
//Allocate memory for the raw data we get when converting.
uint8_t *buffer;
int numBytes;
numBytes = avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
buffer = (uint8_t *) av_malloc(numBytes*sizeof(uint8_t));
//Associate frame with our buffer
avpicture_fill((AVPicture *) pFrameRGB, buffer, PIX_FMT_RGB24,
pCodecCtx->width, pCodecCtx->height);Now that I ahve changed the
PixelFormat
inavgpicture_get_size
toPIX_FMT_RGB24
, I’ve done that inSwsContext
as well and changedGluBuild2DMipmaps
toGL_RGB
and I get a slightly better image but it looks like I’m still missing lines and it’s still a bit stretched :Another Edit
After following Macke’s advice and passing the actual resolution to OpenGL I get the frames nearly proper but still a bit skewed and in black and white, also it’s only getting 6fps now rather than 110fps :
P.S.
I’ve got a function to save the frames to image after
sws_scale()
and they are coming out fine as colour and everything so something in OGL is making it B&W.LAST EDIT
Working ! Okay I have it working now, basically I am not padding out the texture to a power of 2 and just using the resolution the video is.
I got the texture showing up properly with a lucky guess at the correct glPixelStorei()
glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
Also, if anyone else has the
subimage()
showing blank problem like me, you have to fill the texture at least once withglTexImage2D()
and so I use it once in the loop and then useglTexSubImage2D()
after that.Thanks Macke and datenwolf for all your help.
-
Adding Border to the image using FFmpeg
11 juillet 2014, par user2882101I wish to add a border to the single strip of images, using FFMPEG.
I have been trying to search this thing on google, I tried this command ffmpeg -i input.jpg -vf "draw box= : x=50 : y=10 : w=104 : h=80 : color=white" output.jpg, I am unable to increase the border size as well as my desired color,Its work only black border.how can I increase the border and change the color to the single strip of images. Can anybody help me ?
-
Piwik 1.12, New Features, API Improvements, Stability — The Last Piwik 1.X Release
30 mai 2013, par Piwik team — DevelopmentWe are very excited to announce the immediate availability of Piwik v1.12 !
- Download Link
- How to update Piwik ?
- List of all tickets closed : Changelog
Piwik v1.12 is a major new release with four big new features, seven smaller new features, several API improvements and all together 82 tickets fixed. This is also the last major 1.X release, which means after this release we will be working on releasing Piwik 2.0. This also means that you should upgrade to PHP 5.3 or higher if you haven’t already, since Piwik 2.0 will only support PHP 5.3 and above.
Finally, this release contains two breaking changes to the API. If you use the Piwik API click here or scroll down to see if you’re affected.
Table of Contents :
New Big Feature – Beta Release Channel
For those of you who want to help test Piwik 2.0-beta releases as soon as they come up, we’ve made it easier to use our beta releases. Navigate to the Settings > General Settings page and click the The latest beta release radio button. You will then be able to upgrade to beta releases.
This isn’t truly a major feature, but we think it’s just as important because it will allow us to create more beta releases and thus catch more bugs before we make a final release. This means more releases and more stability for you.
New Big Feature – Segment Editor
The Segment Editor is a long-awaited new feature that allows you to view, save and edit your segments.
Piwik has supported segmentation (filtering visits and reports by arbitrary criteria, like browser family) for quite some time now, but it has never been possible to visually create and modify them. Nor could they be saved for later recall.
Thanks to the eighty individuals and company who funded this feature, it is now possible to :
- visually segment your visitors, instead of creating URLs.
- save segments and easily switch between them, instead of remembering URLs.
- get suggestions for segments that might be helpful to view.
- learn more in the Segmentating Analytics reports user documentation..
New Big Feature – Page Speed Reports
You can now see how long it took your webserver to generate and send pages over HTTP through the new Avg. Generation Time metric.
This metric can be viewed on both the Pages and Page Titles reports :
And the average page generation time for all the pages in your website/webapp is displayed on the visitors overview :
You can use this new information to benchmark your webapp and web server.
New Big Feature – Device Detection Reports
Piwik 1.12 also includes a new plugin that provides reports on the device types (tablet, desktop, smartphone, etc.), device brands (Apple, Google, Samsung, etc.) and device models (iPad, Nexus 7, etc.) your visitors use to access your website :
The new plugin also enhances Operating system detections (detecting sub versions of Linux, Windows, and more).
Note : This plugin is not enabled by default, but will be in Piwik 2.0. If you want to view these reports now, you can activate the plugin in the Installed Plugins admin page. Navigate to Visitors > Devices to see the new reports. You may also use the new (beta) ‘Device type’.
The new plugin was developed with the support of Clearcode.cc our technology partner
Other improvements
Majestic SEO Metrics
We’ve added two new SEO metrics to the SEO widget, both of which are calculated by MajesticSEO.com. These metrics will tell you the number of external backlinks (the number of links to your site from other sites) and the number of referrer domains (the number of domains that link to your site).
We thank the team at Majestic for their support and hard work in bringing you these metrics to your Piwik dashboards !
Real-time Visitor Count Dashboard Widget
There is now a simple new widget you can use to see the number of visitors, visits and actions that occurred in the last couple minutes. We call it the Real Time Visitor Counter !
New segment parameter : siteSearchKeyword.
There is now a new segment parameter you can use to segment your visits : siteSearchKeyword. This parameter will let you select visits that had site searches with a specific keyword.
Ignore URL letter case when importing log files.
We’ve added a new option to the log import script, –force-lowercase-path. When used, the importer will change URL paths to lowercase before tracking them. This way http://domain.com/MY/BLOG will be treated the same as http://domain.com/my/blog.
Updated ISP Names
We’ve also modified the Providers report so prettier and more up-to-date names of ISPs are displayed.
Customize the background/text/axis color of graphs.
It is now possible to change the background color, text color and/or axis color of the graph images generated by the ImageGraph plugin. To access this functionality, use the following URL query parameters when generating an image :
- backgroundColor
- textColor
- axisColor
For example :
http://demo.piwik.org/index.php?module=API&method=ImageGraph.get&idSite=7&apiModule=UserSettings&apiAction=getBrowser&token_auth=anonymous&period=day&date=2013-03-21,2013-04-19&language=en&width=779&height=150&fontSize=9&showMetricTitle=0&aliasedGraph=1&legendAppendMetric=0&backgroundColor=efefef&gridColor=dcdcdc&colors=cb2026
Send your users to a custom URL after they logout.
If you manage a Piwik installation with many users and you want to send them to a custom page or website after they log out of Piwik, you can now specify the URL to redirect users after they log out.
API Changes and Improvements
BREAKING CHANGE – renamed segment parameters.
The following segment parameters have been renamed :
- continent renamed to : continentCode
- browserName renamed to : browserCode
- operatingSystem renamed to : operatingSystemCode
- lat renamed to : latitude
- long renamed to : longitude
- region renamed to : regionCode
- country renamed to : countryCode
- continent renamed to : continentCode
If you use one of the old segment parameter names, Piwik will throw an exception, so you should notice when you’re using an old name.
BREAKING CHANGE – changes to the input & output of the Live.getLastVisitsDetails method.
The following changes were made to the Live.getLastVisitsDetails API method :
- The method no longer uses the maxIdVisit query parameter. It has been replaced by the filter_offset parameter.
- Site search keywords are now displayed in a <siteSearchKeyword> element. They were formerly in <pageTitle> elements.
- Custom variables with page scope now have ‘Page’ in their element names when displayed. For example, <customVariablePageName1>, <customVariablePageName2>, etc.
Filter results of MultiSites.getAll by website name.
It is now possible to filter the results of MultiSites.getAll by website name. To do this, set the pattern query parameter to the desired regex pattern.
Get suggested values to use for a segment parameter.
The new API method API.getSuggestedValuesForSegment can now be used to get suggested values for a segment parameter. This method will return a list of the most seen values (in the last 60 days) for a certain segment parameter. So for browserCode, this would return the codes for the browsers most visitors used in the last 60 days.
Use extra tracking query parameters with the JS tracker (such as ‘lat’ & ‘long’).
We’ve added a new method to the JavaScript tracker named appendToTrackingUrl. You can use this method to add extra query parameters to a tracking request, like so :
_paq.push(['appendToTrackingUrl', 'lat=X&long=Y']);
What we’re working on
As we said above, Piwik v1.12 is the last in the 1.X series of releases. This means we are now officially working on Piwik 2.0.
Piwik 2.0 will be a big release, to be sure, but it’s going to bring you more than just a couple new features and a bag of bug fixes. For Piwik 2.0 we will be revisiting the user needs and the ideals that originally prompted us to create Piwik in order to build our vision of the future of web analytics.
Piwik 2.0 won’t just be a bigger, better web app, but a new platform for observing and analyzing the things that matter to you.
Participate in Piwik
Are you a talented developer or an experienced User Interface designer ? Or maybe you like to write documentation or are a marketing guru ?
If you have some free time and if you want to contribute to one of the most awesome open source projects around, please get in touch with the Piwik team, or read this page to learn more…
Summary
For the full list of changes in Piwik 1.12 check out the Changelog.
Thank you to the core developers, all the beta testers and users, our official supporters, the translators & everyone who reported bugs or feature requests. Also thank you to softwares we use, and the libraries we use.
If you are a company and would like to help an important project like Piwik grow, please get in touch, it means a lot to us. You can also participate in the project —
–> if you like what you read, please tell your friends and colleagues or write on your website, blog, forums, stackoverflow, etc. <–
Peace. Enjoy !