
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (97)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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" (...) -
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 (4092)
-
is there a way to change dynamic the water mark text color when using ffmpeg depending on the background color when recording a vieo file ?
11 juillet 2023, par Shelly RonThis command in the command prompt window is working fine and recording the entire screen :


ffmpeg -f gdigrab -framerate 24 -i desktop -preset ultrafast -pix_fmt yuv420p out.mp4



this command prompt add a water mark text in the middle of the screen in white color :


ffmpeg -f gdigrab -framerate 24 -i desktop -vf "drawtext=fontfile=path/to/arial.ttf:text='All rights reserved to ...':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2" -preset ultrafast -pix_fmt yuv420p out.mp4



the problem is that the water mark text is in white and i can see it only when the background window color is black for example when i bring to the front the ffmpeg console window :




but when it's recording some window with white background, because the text is white it can't be seen.


I want to update the command prompt of the ffmpeg to make somehow dynamic so if the background window is black show the water mark text in white and then if I'm bringing up a window with background white change the water mark text automatic to black.


this is the command i tried for the dynamic effect but it didn't work i got errors and then i tried so many versions of the command line, but nothing helped or worked.


ffmpeg -f gdigrab -framerate 24 -i desktop -filter_complex "[0:v]drawtext=text='Watermark Text':x=(w-text_w)/2:y=(h-text_h)/2:fontfile=arial.ttf:fontsize=24,format=rgba [txt];[txt]split=2 [bw][wc];[bw]lut=r=val*2 [b];[wc]lut=r=val*0.5+0.5:g=val*0.5+0.5:b=val*0.5+0.5 [wc];[wc][b]alphamerge [wm];[wm][0:v]overlay=10:10[outv]" -c:v libx264 -preset ultrafast -map "[outv]" out.mp4



and also tried this


ffmpeg -f gdigrab -framerate 24 -i desktop -filter_complex "[0:v]drawtext=text='Watermark Text':x=(w-text_w)/2:y=(h-text_h)/2:fontfile=Arial.ttf:fontsize=24,format=rgba [txt];[txt]split=2 [bw][wm];[bw][1:v]split=3 [b][g][r];[b]geq=r=0:g=0.5:b=0 [b];[g]geq=r=0:g=0:b=0.5 [g];[r]geq=r=0.5:g=0:b=0 [r];[wm][b][g][r]merge=3,format=rgba [watermark];[0:v][watermark]overlay=x=(W-w)/2:y=(H-h)/2" -map "[watermark]" -map 0:a? -c:v libx264 -c:a copy -preset ultrafast out.mp4



-
Progress with rtc.io
12 août 2014, par silviaAt the end of July, I gave a presentation about WebRTC and rtc.io at the WDCNZ Web Dev Conference in beautiful Wellington, NZ.
Putting that talk together reminded me about how far we have come in the last year both with the progress of WebRTC, its standards and browser implementations, as well as with our own small team at NICTA and our rtc.io WebRTC toolbox.
One of the most exciting opportunities is still under-exploited : the data channel. When I talked about the above slide and pointed out Bananabread, PeerCDN, Copay, PubNub and also later WebTorrent, that’s where I really started to get Web Developers excited about WebRTC. They can totally see the shift in paradigm to peer-to-peer applications away from the Server-based architecture of the current Web.
Many were also excited to learn more about rtc.io, our own npm nodules based approach to a JavaScript API for WebRTC.
We believe that the World of JavaScript has reached a critical stage where we can no longer code by copy-and-paste of JavaScript snippets from all over the Web universe. We need a more structured module reuse approach to JavaScript. Node with JavaScript on the back end really only motivated this development. However, we’ve needed it for a long time on the front end, too. One big library (jquery anyone ?) that does everything that anyone could ever need on the front-end isn’t going to work any longer with the amount of functionality that we now expect Web applications to support. Just look at the insane growth of npm compared to other module collections :
Packages per day across popular platforms (Shamelessly copied from : http://blog.nodejitsu.com/npm-innovation-through-modularity/) For those that – like myself – found it difficult to understand how to tap into the sheer power of npm modules as a font end developer, simply use browserify. npm modules are prepared following the CommonJS module definition spec. Browserify works natively with that and “compiles” all the dependencies of a npm modules into a single bundle.js file that you can use on the front end through a script tag as you would in plain HTML. You can learn more about browserify and module definitions and how to use browserify.
For those of you not quite ready to dive in with browserify we have prepared prepared the rtc module, which exposes the most commonly used packages of rtc.io through an “RTC” object from a browserified JavaScript file. You can also directly download the JavaScript file from GitHub.
Using rtc.io rtc JS library So, I hope you enjoy rtc.io and I hope you enjoy my slides and large collection of interesting links inside the deck, and of course : enjoy WebRTC ! Thanks to Damon, JEeff, Cathy, Pete and Nathan – you’re an awesome team !
On a side note, I was really excited to meet the author of browserify, James Halliday (@substack) at WDCNZ, whose talk on “building your own tools” seemed to take me back to the times where everything was done on the command-line. I think James is using Node and the Web in a way that would appeal to a Linux Kernel developer. Fascinating !!
-
C++ ffmpeg encoded audio is distorted
14 janvier 2023, par TurgutI've made a demuxer/muxer program that takes a video as an input, takes audio and video, then just encodes that red information. So far the video is working fine but the audio is faulty. I can hear the original audio of the input in the background but there is a distorted static sound on the front. I'm setting the
AVFrame
I got from the demuxer and some information aboutAVCodecContext
in the encoder. The rest is some what similar to ffmpegs muxing example

Here is what I've done so far :


int video_encoder::write_audio_frame(AVFormatContext *oc, OutputStream *ost)
{
 AVCodecContext *c;
 AVFrame *frame;
 int ret;
 int dst_nb_samples;

 c = ost->enc;

#if __AUDIO_ENABLED
 c->bit_rate = input_sample_fmt.bit_rate;
 c->sample_rate = input_sample_fmt.sample_rate;
 c->time_base = input_sample_fmt.time_base;
 c->sample_fmt = input_sample_fmt.sample_fmt;
 c->channel_layout = input_sample_fmt.channel_layout;
 //c-> = input_sample_fmt.channel_layout
#endif

 frame = get_audio_frame(ost);

 if (frame) {
 /* convert samples from native format to destination codec format, using the resampler */
 /* compute destination number of samples */
 dst_nb_samples = av_rescale_rnd(swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples,
 c->sample_rate, c->sample_rate, AV_ROUND_UP);
 //av_assert0(dst_nb_samples == frame->nb_samples);

 /* when we pass a frame to the encoder, it may keep a reference to it
 * internally;
 * make sure we do not overwrite it here
 */
 ret = av_frame_make_writable(ost->frame);
 if (ret < 0)
 exit(1);

 /* convert to destination format */
 ret = swr_convert(ost->swr_ctx,
 ost->frame->data, dst_nb_samples,
 (const uint8_t **)frame->data, frame->nb_samples);
 if (ret < 0) {
 fprintf(stderr, "Error while converting\n");
 exit(1);
 }
 frame = ost->frame;

 frame->pts = av_rescale_q(ost->samples_count, (AVRational){1, c->sample_rate}, c->time_base);
 ost->samples_count += dst_nb_samples;
 }


 return write_frame(oc, c, ost->st, frame, ost->tmp_pkt);
}


void video_encoder::set_audio_frame(AVFrame* audio, AVCodecContext* c_ctx)
{
 audio_data = *audio;
 input_sample_fmt = *c_ctx;
 //std::cout << audio-> << std::endl;
}

AVFrame* video_encoder::get_audio_frame(OutputStream *ost)
{
 AVFrame *frame = &audio_data;
 int j, i, v;
 int16_t *q = (int16_t*)frame->data[0];


 //(int16_t)*audio_frame->data[0];
 /* check if we want to generate more frames */
 if (av_compare_ts(ost->next_pts, ost->enc->time_base,
 STREAM_DURATION, (AVRational){ 1, 1 }) > 0)
 return NULL;

 for (j = 0; j nb_samples; j++) {
 #if !__AUDIO_ENABLED
 v = (int)(sin(ost->t) * 10000);
 #endif
 for (i = 0; i < ost->enc->channels; i++)
 #if !__AUDIO_ENABLED
 *q++ = v;
 #endif
 ost->t += ost->tincr;
 ost->tincr += ost->tincr2;
 }

 frame->pts = ost->next_pts;
 ost->next_pts += frame->nb_samples;

#if __AUDIO_ENABLED 
 return frame;
#else
 return frame;
#endif
}