
Recherche avancée
Autres articles (35)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)
Sur d’autres sites (5183)
-
Electron ffmpeg integration
27 avril 2017, par Raider DaveI am in way over my head here. I am normally a coldfusion/javascript/jquery developer but now have taken on a task that assumes I know more than I do.
I am trying to write an application in electron that will allow me to select a group of video files and convert them to mp4 files while also compressing them. The files are football plays and a normal game consists of about 160 plays and 18gb. We need to compress these down to about 4gb. I have used programs like Prism to do this, but the intended users are not technically savvy nor do they all have windows - some have Macs.
I have an electron project that I have started and got the first part to work. I can start the app and select the input files. But I have tried all kinds of different solutions found online to call ffmpeg and pass it the parms to convert a file. Is there an easy way to call ffmpeg with parms and then wait for it to finish before continuing ?
I am on Windows 10 but will also need to run on Apple OS. Please, if you have a simple example of how to do this, I would appreciate it.
Thanks !
Dave -
Error decoding a simple audio file using FFmpeg library
29 mars 2017, par satyresAfter successfuly compiling the latest version of FFmpeg library and generated .a library in Ubuntu I’ve been struggling now for more than a week to decode and play a simple mp3 file in Android without a success !
I’ve followed this tutorial given by FFmpeg team in Github i’ve tried to use it in Android but no luck !
here is the Native code.void Java_com_example_home_hellondk_MainActivity_audio_1decode_1example(JNIEnv * env, jobject obj, jstring file, jbyteArray array) {
jboolean isfilenameCopy;
const char * filename = ( * env) - > GetStringUTFChars(env, file, &
isfilenameCopy);
jclass cls = ( * env) - > GetObjectClass(env, obj);
jmethodID play = ( * env) - > GetMethodID(env, cls, "playSound", "([BI)V");
AVCodec * codec;
AVCodecContext * c = NULL;
int len;
FILE * f, * outfile;
uint8_t inbuf[AUDIO_INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
AVPacket avpkt;
AVFrame * decoded_frame = NULL;
av_init_packet( & avpkt);
printf("Decode audio file %s \n", filename);
LOGE("Decode audio file %s\n", filename);
/* find the MPEG audio decoder */
codec = avcodec_find_decoder(AV_CODEC_ID_MP3);
if (!codec) {
fprintf(stderr, "Codec not found\n");
LOGE("Codec not found\n");
exit(1);
}
c = avcodec_alloc_context3(codec);
if (!c) {
fprintf(stderr, "Could not allocate audio codec context\n");
LOGE("Could not allocate audio codec context\n");
exit(1);
}
/* open it */
if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "Could not open codec\n");
LOGE("Could not open codec\n");
exit(1);
}
f = fopen(filename, "rb");
if (!f) {
fprintf(stderr, "Could not open %s\n", filename);
LOGE("Could not open %s\n", filename);
exit(1);
}
/* decode until eof */
avpkt.data = inbuf;
avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f);
while (avpkt.size > 0) {
int i, ch;
int got_frame = 0;
if (!decoded_frame) {
if (!(decoded_frame = av_frame_alloc())) {
fprintf(stderr, "Could not allocate audio frame\n");
LOGE("Could not allocate audio frame\n");
exit(1);
}
}
len = avcodec_decode_audio4(c, decoded_frame, & got_frame, & avpkt);
if (len < 0) {
fprintf(stderr, "Error while decoding\n");
LOGE("Error while decoding\n");
exit(1);
}
if (got_frame) {
/* if a frame has been decoded, output it */
int data_size = av_get_bytes_per_sample(c - > sample_fmt);
if (data_size < 0) {
/* This should not occur, checking just for paranoia */
fprintf(stderr, "Failed to calculate data size\n");
LOGE("Failed to calculate data size\n");
exit(1);
}
if (data_size > 0) {
jbyte * bytes = ( * env) - > GetByteArrayElements(env, array, NULL);
memcpy(bytes, decoded_frame, got_frame); //
( * env) - > ReleaseByteArrayElements(env, array, bytes, 0);
( * env) - > CallVoidMethod(env, obj, play, array, got_frame);
LOGE("DECODING ERROR5");
}
}
avpkt.size -= len;
avpkt.data += len;
avpkt.dts =
avpkt.pts = AV_NOPTS_VALUE;
if (avpkt.size < AUDIO_REFILL_THRESH) {
/* Refill the input buffer, to avoid trying to decode
* incomplete frames. Instead of this, one could also use
* a parser, or use a proper container format through
* libavformat. */
memmove(inbuf, avpkt.data, avpkt.size);
avpkt.data = inbuf;
len = fread(avpkt.data + avpkt.size, 1,
AUDIO_INBUF_SIZE - avpkt.size, f);
if (len > 0)
avpkt.size += len;
}
}
fclose(f);
avcodec_free_context( & c);
av_frame_free( & decoded_frame);
}The Java code :
package com.example.home.hellondk;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.media.MediaPlayer;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class MainActivity extends AppCompatActivity {
static {
System.loadLibrary("MyLibraryPlayer");
}
public native void createEngine();
public native void audio_decode_example(String outfilename, byte[] array);
private AudioTrack track;
private FileOutputStream os;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
createEngine();
/* MediaPlayer mp = new MediaPlayer();
mp.start();*/
int bufSize = AudioTrack.getMinBufferSize(32000,
AudioFormat.CHANNEL_CONFIGURATION_STEREO,
AudioFormat.ENCODING_PCM_16BIT);
track = new AudioTrack(AudioManager.STREAM_MUSIC,
32000,
AudioFormat.CHANNEL_CONFIGURATION_STEREO,
AudioFormat.ENCODING_PCM_16BIT,
bufSize,
AudioTrack.MODE_STREAM);
byte[] bytes = new byte[bufSize];
try {
os = new FileOutputStream("/storage/emulated/0/Cloud Radio/a.out", false);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
audio_decode_example("/storage/emulated/0/Cloud Radio/test.mp3", bytes);
}
void playSound(byte[] buf, int size) {
//android.util.Log.v("ROHAUPT", "RAH Playing");
if (track.getPlayState() != AudioTrack.PLAYSTATE_PLAYING)
track.play();
track.write(buf, 0, size);
try {
os.write(buf, 0, size);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}I always got this error : Error while decoding .
i’ve tried to change the decoder "AV_CODEC_ID_MP3" no sucess !
Thank you so much for your help.
Kind regards -
Tracking User Acquisition and Social Media Activity with Piwik
25 avril 2017, par Florian Hieß — CommunityBeing able to monitor user acquisition and social media activity is essential for determining whether the outcome of your campaigns is in line with the business objectives. Determining the source of each website visit that gets you closer to your business goals enables you to focus your efforts in the directions that are worth it. In this article you will learn why it is important to identify your traffic sources and how you can track user acquisition with Piwik Analytics.
Why Is It Important to Identify Traffic Sources on Your Website ?
Since brands nowadays use multiple channels for promotion and advertising, identifying the touch points and traffic sources of a lead or customer seems to become more and more difficult. And yet, this channel multiplication is what makes the source of a purchase more important. Once you identify the traffic origin and how each source is performing you are able to increase your efforts on the best performers, both in terms of human resources and monetary investments, to attract more leads or customers in these marketing channels.
The default referrer types are defined by :
- Search engine
- Direct traffic
- Websites and
- Campaigns
But consider that within the “Campaigns” type, each of the following referrers is a possible traffic source for your website and can be tracked with the Piwik URL builder :
- Google AdWords
- Display Ads, Banners
- Links in Newsletters, Emailing
- Affiliate links
- Tweets
- Facebook Ads
Measure your performance and conversion
With so many options, wouldn’t you like to know which one of them worked best ? To rate channels based on their performance, you first need to establish conversion goals and attribution.
A conversion can be anything from sign-ups or downloads to leads, registered users and even paying customers. Define conversions based on what you want people to do once they’ve landed on your website.
You need to define each conversion type in the Piwik dashboard, so that the analytics platform knows what to track. As far as attribution goes, Piwik by default links the conversion and attributes to the last seen (non-direct) referrer. You are able to change that to the first referrer in the attribution line by following the instructions in this conversion attribution FAQ.
Track Your User Acquisition Right with Piwik
Using the Piwik URL Builder tool, you can tag each URL you promote in your campaigns using relevant keywords. Provided that your URLs are tagged, whenever someone clicks on them, the campaign will be listed as the referrer in the Piwik dashboard. Once you’ve generated trackable URLs, you can include them in your social media posts which could be planned and scheduled using a social media management tool such as Swat.io.
Campaign URLs work wonders for telling which campaign helped you reach your goals faster, more efficiently and so on but they do have a downside. They only work for URLs that you’ve shared. If someone decides to share a link of yours on social media they won’t be tagged beforehands. This is where the Referrers section of Piwik comes in handy, as it acts as a backup for tracking traffic sources. The overview tab features a graph that can help you identify when spikes occurred.
As well as a numerical representation of the main referrer categories for the selected time period.
Switching from Overview to Websites & Social, you can see a graphical representation of the social networks acting as referrers. The visualization can be changed to bar graphs or table, and can be easily exported in various formats for reports.
The websites list features not only the social referrers, but all of the websites generating visits to your website. With Piwik you should not have issues with referrer spam, as the Piwik core team has tackled this problem early on, as detailed in how to stop referrer spam. Our analytics spam blacklist is a public project on GitHub.
Assuming that you’re relying only on Facebook and VK.com for your campaigns, as the above screenshot would suggest, you might want to give paid advertising a try on these two social networks. Paid ads can increase reach and engagement, can get more relevant visitors to your website and can have a snowball effect in a short period of time.
What Social Networks Can Piwik Track ?
Piwik’s built-in social network list is quite extensive, as it currently features 70 platforms. The entries range from popular social networks such as Facebook, Twitter and LinkedIn to more obscure ones such as Renren. However, this list is not available by default, and to see it or alter it, you would need a third-party plugin.
How Does the Referrers Manager Plugin for Piwik Work ?
The Referrers Manager plugin for Piwik provides access to the list of search engines and social networks that this analytics platform can handle by default. The simple plugin can come in handy when sorting out referrers. First of all, it displays a list of all search engines and social networks that Piwik can handle by default. Secondly, it enables users to disable/enable the platform’s default social network list. And using Referrers Manager, you can add custom engines or social networks to the referrers list in case they’re not already available.
Conclusions
Piwik is a very capable analytics platform as it is, but combined with third-party plugins such as Referrers Manager, it can provide even better insights on where your visitors are coming from. Remember to correlate the referrers with goals in order to determine which website or social network performs best in your context. And don’t forget to assign a monetary revenue value to each goal, in order to determine your social media ROI with greater accuracy.