
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (68)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (6648)
-
why AVFrame pts value doesn't affect bitrate of frames ?
31 janvier 2021, par fsdfhdsjkhfjkdsI'm trying code realtime screen sharing I noticed H264 codec doesn't do constant time encode for every frame. That causes being not able to encode exact same amount frame rate with context->time_base. When we encode less frames per second than time_base bitrate of second becomes lower than what we set.


I modified libav's example encode code and put 1/1000 time base and supply it with only 10 frame. I increase frame->pts related with time_base but bitrates still stay at low.


For results I just change
context->time_base
to 1, 1000, 1, 10 etc

1/1000 time base (as sum 1989 bytes per second) :


encoded frame 0 (size=1169)
encoded frame 100 (size=95)
encoded frame 200 (size=92)
encoded frame 300 (size=102)
encoded frame 400 (size=90)
encoded frame 500 (size=90)
encoded frame 600 (size=90)
encoded frame 700 (size=83)
encoded frame 800 (size=95)
encoded frame 900 (size=83)



1/10 time base (as sum 95324 bytes per second) :


encoded frame 0 (size=14187)
encoded frame 1 (size=6053)
encoded frame 2 (size=8530)
encoded frame 3 (size=9277)
encoded frame 4 (size=9508)
encoded frame 5 (size=11163)
encoded frame 6 (size=9685)
encoded frame 7 (size=9346)
encoded frame 8 (size=7662)
encoded frame 9 (size=9913)



code :


#include 
#include 
#include <libavcodec></libavcodec>avcodec.h>

static void encode(AVCodecContext *context, AVFrame *frame, AVPacket *pkt, FILE *outfile){
 int ret = avcodec_send_frame(context, frame);
 assert(ret >= 0);
 while(ret >= 0){
 ret = avcodec_receive_packet(context, pkt);
 if(ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
 return;
 else if(ret < 0)
 assert(0);
 printf("encoded frame %lld (size=%d)\n", pkt->pts, pkt->size);
 fwrite(pkt->data, 1, pkt->size, outfile);
 av_packet_unref(pkt);
 }
}

int main(int argc, char **argv){
 if(argc <= 1){
 fprintf(stderr, "Usage: %s <output file="file">\n", argv[0]);
 exit(0);
 }
 av_log_set_level(AV_LOG_QUIET);
 const char *filename = argv[1];
 const AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_H264);
 assert(codec);
 AVCodecContext *context = avcodec_alloc_context3(codec);
 assert(context);
 AVFrame *frame = av_frame_alloc();
 assert(frame);
 AVPacket *pkt = av_packet_alloc();
 assert(pkt);
 context->bit_rate = 800000;
 context->width = 1280;
 context->height = 720;
 context->time_base = (AVRational){1, 1000};
 context->pix_fmt = AV_PIX_FMT_YUV420P;
 AVDictionary *dict = 0;
 assert(av_dict_set(&dict, "preset", "veryfast", 0) >= 0);
 assert(av_dict_set(&dict, "tune", "zerolatency", 0) >= 0);
 assert(avcodec_open2(context, codec, &dict) >= 0);
 FILE *f = fopen(filename, "wb");
 assert(f);
 frame->format = context->pix_fmt;
 frame->width = context->width;
 frame->height = context->height;
 assert(av_frame_get_buffer(frame, 0) >= 0);
 for(int i = 0; i < 10; i++){
 for(int y = 0; y < context->height; y++){
 for(int x = 0; x < context->width; x++){
 frame->data[0][y * frame->linesize[0] + x] = x + y + i * 3;
 }
 }
 for(int y = 0; y < context->height / 2; y++){
 for(int x = 0; x < context->width / 2; x++){
 frame->data[1][y * frame->linesize[1] + x] = 128 + y + i * 2;
 frame->data[2][y * frame->linesize[2] + x] = 64 + x + i * 5;
 }
 }
 frame->pts = i * (context->time_base.den / 10);
 encode(context, frame, pkt, f);
 }
 fclose(f);
 avcodec_free_context(&context);
 av_frame_free(&frame);
 av_packet_free(&pkt);
 return 0;
}
</output>


How we can keep right bitrate with different time_base than frame rate ?


-
How to stream audio from ffserver
22 mai 2019, par DoroI trying to stream 2 files -
1.mkv
without audio (which streaming ok) and2.mkv
with audio encoded with Vorbis codec which i can’t stream. For encoding I usedffmpeg -i 2.mp4 -strict -2 -c:a vorbis ex.mkv
And it playing ok with
ffplay
Server log :
Fri May 17 00:49:08 2019 Opening feed file '1.mkv' for stream 'test1-rtsp'
Fri May 17 00:49:08 2019 [matroska,webm @ 0x200746c0]Unknown entry 0x55B0
Thu Dec 14 21:35:00 1950 [h264 @ 0x2007dcc0]gray chroma
Fri May 17 00:49:08 2019 [h264 @ 0x2007dcc0]error while decoding MB 18 1, bytestream 1989
Fri May 17 00:49:08 2019 [h264 @ 0x2007dcc0]concealing 432 DC, 432 AC, 432 MV errors in I frame
Fri May 17 00:49:08 2019 Opening feed file '2.mkv' for stream 'test2-rtsp'
Fri May 17 00:49:08 2019 [matroska,webm @ 0x200746c0]Unknown entry 0x55B0
Fri May 17 00:49:08 2019 FFserver started.
Fri May 17 00:49:25 2019 [matroska,webm @ 0x20080de0]Unknown entry 0x55B0
Fri May 17 00:49:25 2019 127.0.0.1:33582 - - "PLAY test2-rtsp/streamid=0 RTP/UDP"
Fri May 17 00:49:25 2019 127.0.0.1 - - [SETUP] "rtsp://127.0.0.1:7654/test2-rtsp/ RTSP/1.0" 200 2553Client log :
Bad packed header lengths (30,0,1250,2673)
[udp @ 00000236f6318500] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000236f63185c0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000236f633dc40] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000236f634df00] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[rtsp @ 00000236f63153c0] method SETUP failed: 503 Service Unavailable
rtsp://127.0.0.1:7654/test2-rtsp: Server returned 5XX Server Error replyConfigure ffserver file :
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 500000
CustomLog -
NoDaemon
RTSPPort 7654
RTSPBindAddress 0.0.0.0
<stream>
Format rtp
File "1.mkv"
</stream>
<stream>
Format rtp
Strict -2
AudioCodec vorbis
File "2.mkv"
</stream> -
ffmpeg channels don't work (PHP)
15 avril 2016, par Y.SaadI have a lot of channels with " ffmpeg " (4 channels) that start automatically, I create a code for show the first channel and after 5 seconds show the second .. Etc All things as right but I have a small problem the seconds channel doesn’t start automatically, I need to make stop to the first channel
Code for 4 channel work 100% but without function for show first channel and after 5 seconds show the second ... Etc
<?php
ffmpeg -i http://clay24.webhop.net:8000/live/mario/mario/13.ts -i http://clay24.webhop.net:8000/live/mario/mario/12.ts -i http://clay24.webhop.net:8000/live/mario/mario/10.ts -map 0 -c:a aac -b:a 64k -strict -2 -preset fast -crf 25 -vcodec libx264 -f flv rtmp://178.33.231.108:1989/mylive/1 -map 1 -c:a aac -b:a 64k -strict -2 -preset fast -crf 25 -vcodec libx264 -f flv rtmp://178.33.231.108:1989/mylive/21 -map 2 -c:a aac -b:a 64k -strict -2 -preset fast -crf 25 -vcodec libx264 -f flv rtmp://178.33.231.108:1989/mylive/24
?>the second code with functions
<?php
echo'
<code class="echappe-js"><script><br />
<br />
window.addEventListener("load", function() {<br />
<br />
var urls = iframes = [ "'; ffmpeg -i http://mygameravatar.zapto.org:43666/live/test1/test2/81.ts -c:a aac -b:a 64k -preset fast -crf 25 -vcodec libx264 -f flv rtmp://178.33.231.108:1989/mylive/2 <br />
echo '];<br />
<br />
var iframes = document.querySelectorAll("div");<br />
<br />
var n = 0;<br />
<br />
var interval = setInterval(function() {<br />
<br />
iframes[++n].src = urls[n - 1];<br />
iframes[n].style.display = "block";<br />
console.log(n);<br />
if (n === iframes.length -1) {<br />
clearInterval(interval);<br />
console.log("all iframes loaded")<br />
}<br />
<br />
}, 5000)<br />
<br />
})<br />
</script>’ ;ffmpeg -i http://mygameravatar.zapto.org:43666/live/test1/test2/297.ts -c:a aac -b:a 64k -preset fast -crf 25 -vcodec libx264 -f flv rtmp ://178.33.231.108:1989/mylive/1
echo ’
’ ;
?>