
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (60)
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (9166)
-
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 -
GDPR compliance for Matomo’s Premium Features like Heatmaps & Session Recording, Form Analytics, Media Analytics & co
27 avril 2018, par InnoCraftThe General Data Protection Regulation (EU) 2016/679, also referred to as RGPD in French, Datenschutz-Grundverordnung, DS-GVO in German, is fast-approaching. It is now less than 30 days until GDPR applies to most businesses around the world on 25th May 2018. If you haven’t heard of this new regulation yet, I recommend you check out our GDPR guide which we continue to expand regularly to get you up to speed with it.
GDPR compliance in Matomo
We are currently adding several new features to Matomo to get you GDPR ready. You will have for example the possibility to delete and export data for data subjects, delete and anonymize previously tracked data, anonymize the IP address and location, ask for consent, and more. A beta version with these features is already available. We will release more blog posts and user guides about these features soon and just recently published a post on how to avoid collecting personal information in the first place soon.
If you are still using Piwik, we highly recommend you update to a recent version of Matomo as all versions of Piwik will NOT be GDPR compliant.
GDPR compliance for premium features
InnoCraft, the company of the makers of Matomo, are offering various premium features for your self-hosted Matomo so you can be sure to make the right decisions and continuously grow your business. These features are also available on the cloud-hosted version of Matomo.
If you are now wondering how GDPR applies to these features, you will be happy to hear that none of them collect any personal information except for possibly Heatmaps & Session Recording and the WooCommerce integration. All of them also support all the new upcoming GDPR features like the possibility to export and delete data. It is important that you update your Matomo Premium Features to the latest version to use these features.
Making Heatmaps & Session Recording GDPR compliant
We have added several new features to make it easy for you to be GDPR compliant and in many cases you might not even have to do anything. Some of the changes include :
- Keystrokes (text entered into form fields) are no longer captured by default.
- You may enable the capturing of keystrokes, and all keystrokes will be anonymized by default.
- You may whitelist certain form fields to be recorded in plain text. However, fields that likely contain personal or sensitive information like passwords, phone numbers, addresses, credit card details, names, email addresses, and more will be always anonymized to protect user privacy. (this has always been the case but we have now included many more fields).
How personal information may still be recorded
Nevertheless, Heatmaps and Session Recordings may still record personal or sensitive information if you show them as part of the regular website as plain text (and not as part of a form field). The below example shows an email address for a paypal account as well as a name and VAT information as a regular content.
To anonymize such information, simply add a
data-matomo-mask
attribute to your website :<span data-matomo-mask>example@example.com</span>
You can read more about this in the developer guide “Masking content on your website”.
WooCommerce Integration
The WooCommerce integration may record an Order ID when a customer purchases something on your shop. As the Order ID is an identifier which could be linked with your shop to identify an individual, it may be considered as personal information. Matomo now offers an option to automatically anonymize this Order ID so it is no longer considered as personal information. To enable this feature, log in to your Matomo and go to “Administration => Anonymize Data”.
GDPR compliance for third party plugins on the Matomo Marketplace
The Matomo Marketplace currently features over 80 free plugins. Over 50 of them are compatible with the latest Matomo 3.X version and most of them should support Matomo’s new GDPR features out of the box. If you are concerned by GDPR and are not sure if a third party plugin stores any personal information, we highly recommend you ask the developer of this plugin about the compliance.
You can find a link to the plugin’s issue tracker by going to a plugin page and then clicking on “Github” on the bottom right.
If you are a plugin developer, please read our developer guide “GDPR & How do I make my Matomo plugin compliant”.
The post GDPR compliance for Matomo’s Premium Features like Heatmaps & Session Recording, Form Analytics, Media Analytics & co appeared first on Analytics Platform - Matomo.
-
FFMPEG H264 with custom overlay per frame
4 octobre 2020, par La bla blaWe have a stream that is stored in the cloud (Amazon S3) as individual H264 frames. The frames are stored as
framexxxxxx.264
, the numbering doesn't start from 0 but rather from some larger number, say 1000 (so,frame001000.264
)

The goal is to create a mp4 clip which is either timelapse or just faster for inspection and other checking (much faster, compressing around 3 hours of video down to < 20 minutes), this also requires we overlay the frame number (the filename) on the frame itself


At first I was creating a timelapse by pulling from S3 only the keyframes (i-frames ? still rather new to codecs & stuff) and overlaying the filename on them and saving as png (which probably isn't needed, but that's what I did) using (this command is used inside a python script)


ffmpeg -y -i {h264_name} -vf \"scale=1920:-1, 
drawtext=fontfile=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf:fontsize=34:text={txt}:fontcolor=white:x=50:y=50:bordercolor=black:borderw=2\" 
-c:a copy -pix_fmt yuv420p {basename}.png



after this I combined all the frames by using python to convert the lowest numbered frame to
0.png
and incrementing (so it would be continuous, because I only used keyframes the numbers originally weren't sequential) and running

ffmpeg -y -f image2 -i %d.png -r {self.params.fps} -vcodec libx264 -crf {self.params.crf} -pix_fmt yuv420p {out_file}



and this worked great, but the difference between keyframes was too long to allow for proper inspection


so now for the question(s)


since I know frames that are not keyframes (p-frames ?) can't be used alone by ffmpeg, the method of overlaying the file name and converting it to png (or keep as h264, same thing) won't work, or at least, I couldn't find a way for it to work, maybe there's a way to specify a frame's keyframe ?, how can one overlay the filename (and not the frame number as shown here for example)


Also, is it possible to skip some p-frames between the keyframes ? (so if a keyframe is every 30 frames, we would take a keyframe, a frame 15 frames later, and next another keyframe)


I thought about using ffmpeg's pipe option to feed it with the files as they're being downloaded, but I'm not sure if I can specify drawtext this way


Also, if there's another alternative that can achieve that (at first I was converting to png, using python and OpenCV to add the filename and then merging the pngs to mp4, but then I found drawtext can do that in a single command so I used it)