
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 (35)
-
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 (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation"
Sur d’autres sites (5469)
-
How to create a local audio livestream server with ffmpeg and python ? [closed]
10 novembre 2024, par FenekhuSimply put, this is what I'm trying to accomplish :

I navigate to something likehttp://localhost:8080/
in my browser and the browser shows a built-in audio player playing whatever the ffmpeg process is streaming. (Not just serving a local audio file.) (Built-in here meaning the page looks the same as if you had opened an mp3 file with your browser.)

At first I thought it would be easy, as ffmpeg has the ability to stream through different protocols. I seem to have misunderstood though, because while I can stream something over rtp with it, I can't access that from my browser. Some stackoverflow questions I found seem to imply that you can do this with the output options
-f mpegts http://localhost:8080
, but when I try this, ffmpeg freezes for a second, then I get these errors :

[tcp @ 00000210f70b0700] Connection to tcp://localhost:8080 failed: Error number -138 occurred
[out#0/mpegts @ 00000210f7080ec0] Error opening output http://localhost:8080: Error number -138 occurred
Error opening output file http://localhost:8080.
Error opening output files: Error number -138 occurred



but I have no problem with
-f rtp rtp://localhost:8080
. (Like I said though, I can't access that through the browser).

So I suspect I need something else to "pick up" the rtp stream and put it on an http server, but I haven't been able to find anything on that, probably because I just don't know the right thing to search. It seems like something that should be easily doable in Python, and that would be my preferred language to do it in over javascript, if possible.


Can anyone point me in the right direction ? Or let me know if I'm misunderstanding something ? Thanks.


-
Understanding PTS and DTS in video frames
28 juin 2017, par theateistI had fps issues when transcoding from avi to mp4(x264). Eventually the problem was in PTS and DTS values, so lines 12-15 where added before av_interleaved_write_frame function :
1. AVFormatContext* outContainer = NULL;
2. avformat_alloc_output_context2(&outContainer, NULL, "mp4", "c:\\test.mp4";
3. AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_H264);
4. AVStream *outStream = avformat_new_stream(outContainer, encoder);
5. // outStream->codec initiation
6. // ...
7. avformat_write_header(outContainer, NULL);
8. // reading and decoding packet
9. // ...
10. avcodec_encode_video2(outStream->codec, &encodedPacket, decodedFrame, &got_frame)
11.
12. if (encodedPacket.pts != AV_NOPTS_VALUE)
13. encodedPacket.pts = av_rescale_q(encodedPacket.pts, outStream->codec->time_base, outStream->time_base);
14. if (encodedPacket.dts != AV_NOPTS_VALUE)
15. encodedPacket.dts = av_rescale_q(encodedPacket.dts, outStream->codec->time_base, outStream->time_base);
16.
17. av_interleaved_write_frame(outContainer, &encodedPacket)After reading many posts I still do not understand :
outStream->codec->time_base
= 1/25 andoutStream->time_base
= 1/12800. The 1st one was set by me but I cannot figure out why and who set 12800 ? I noticed that before line (7)outStream->time_base
= 1/90000 and right after it it changes to 1/12800, why ?
When I transcode from avi to avi, meaning changing the line (2) toavformat_alloc_output_context2(&outContainer, NULL, "avi", "c:\\test.avi";
, so before and after line (7)outStream->time_base
remains always 1/25 and not like in mp4 case, why ?- What is the difference between time_base of
outStream->codec
andoutStream
? - To calc the pts
av_rescale_q
does : takes 2 time_base, multiplies their fractions in cross and then compute the pts. Why it does this in this way ? As I debugged, theencodedPacket.pts
has value incremental by 1, so why changing it if it does has value ? - At the beginning the dts value is -2 and after each rescaling it still has negative number, but despite this the video played correctly ! Shouldn’t it be positive ?
-
Understanding PTS and DTS in video frames
8 août 2015, par theateistI had fps issues when transcoding from avi to mp4(x264). Eventually the problem was in PTS and DTS values, so lines 12-15 where added before av_interleaved_write_frame function :
1. AVFormatContext* outContainer = NULL;
2. avformat_alloc_output_context2(&outContainer, NULL, "mp4", "c:\\test.mp4";
3. AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_H264);
4. AVStream *outStream = avformat_new_stream(outContainer, encoder);
5. // outStream->codec initiation
6. // ...
7. avformat_write_header(outContainer, NULL);
8. // reading and decoding packet
9. // ...
10. avcodec_encode_video2(outStream->codec, &encodedPacket, decodedFrame, &got_frame)
11.
12. if (encodedPacket.pts != AV_NOPTS_VALUE)
13. encodedPacket.pts = av_rescale_q(encodedPacket.pts, outStream->codec->time_base, outStream->time_base);
14. if (encodedPacket.dts != AV_NOPTS_VALUE)
15. encodedPacket.dts = av_rescale_q(encodedPacket.dts, outStream->codec->time_base, outStream->time_base);
16.
17. av_interleaved_write_frame(outContainer, &encodedPacket)After reading many posts I still do not understand :
outStream->codec->time_base
= 1/25 andoutStream->time_base
= 1/12800. The 1st one was set by me but I cannot figure out why and who set 12800 ? I noticed that before line (7)outStream->time_base
= 1/90000 and right after it it changes to 1/12800, why ?
When I transcode from avi to avi, meaning changing the line (2) toavformat_alloc_output_context2(&outContainer, NULL, "avi", "c:\\test.avi";
, so before and after line (7)outStream->time_base
remains always 1/25 and not like in mp4 case, why ?- What is the difference between time_base of
outStream->codec
andoutStream
? - To calc the pts
av_rescale_q
does : takes 2 time_base, multiplies their fractions in cross and then compute the pts. Why it does this in this way ? As I debugged, theencodedPacket.pts
has value incremental by 1, so why changing it if it does has value ? - At the beginning the dts value is -2 and after each rescaling it still has negative number, but despite this the video played correctly ! Shouldn’t it be positive ?