
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (99)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (11712)
-
where to save mpd file in raspberry pi so dash.js can access it remotely ?
11 mai 2016, par DjmThis is very high level question. I want to stream a live video from raspberry pi. I want to be able to watch live video in the browser remotely being streamed by the Raspberry pi.I want to use DASH stream protocol, and Dash.js as client to HTML5. I have looked through different tutorials but i am still puzzled about how this works.I understand that (assuming you have already prepared your videos with FFMPEG tool) from the client Dash.js
you have to make a call/request and pass a url to your mpd file. My question is where would you save the file in raspberry pi especially if the Dash client is in a different web app(i want to make the call remotely) ? -
ffmpeg : save separate frames as still gifs
7 novembre 2013, par Eugene MThe question is simple : I don't want ffmpeg to create an animated GIF from given video stream, I want separate frames, each in GIF format. But when I set output file to something like
frame%09d.gif
ffmpeg tends to create an animation (and stores it exactly asframe%09d.gif
). The same for-f gif
option.Of course, I could save PNGs and use ImageMagic's
convert
utility to transform them to GIFs, but I don't want any additional invocation overhead because I'm dealing with live streams and going to crunch large amounts of data.Here is what I do, nothing special :
ffmpeg -i http://brightcove03-f.akamaihd.net/valgbodmandag1378107345_1_300k@80362 -f gif -y frame_%09d.gif
ffmpeg version N-54643-g15cee5e Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 11 2013 03:35:11 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu
tls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --ena
ble-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger -
-enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-lib
vpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 39.100 / 52. 39.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.101 / 55. 12.101
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 80.100 / 3. 80.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[flv @ 00000000002cb700] Stream discovered after head already parsed
Input #0, flv, from 'http://brightcove03-f.akamaihd.net/valgbodmandag1378107345_1_300k@80362':
Metadata:
encoder : Lavf54.6.100
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s
Stream #0:2: Data: none
[swscaler @ 0000000004d051e0] No accelerated colorspace conversion found from yuv420p to bgr8.
Output #0, gif, to 'frame_%09d.gif':
Metadata:
encoder : Lavf55.12.101
Stream #0:0: Video: gif, bgr8, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 100 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> gif)
Press [q] to stop, [?] for help
frame= 141 fps=130 q=-1.0 Lsize= 4960kB time=00:00:05.68 bitrate=7153.1kbits/s
video:5100kB audio:0kB subtitle:0 global headers:0kB muxing overhead -2.743247%After all I get a file named "frame_%03d.gif", but instead I want to have several files "frame_001.gif", "frame_002.gif", etc.
Any ideas ?
Thanks in advance. -
How to save the video stream as h264
16 mars 2023, par aaadddzxcI pull the stream through ffmpeg, and then save the video of this stream as an h264 file, but the saved file cannot be played. Why is this ?


The h264 saved by the following code cannot be played,i dont know why...


i try to vlc play, but cant play the h264 file.


can be save to h264 without avformat_alloc_output_context2 function ?


#include <thread>
#include <iostream>
#include <fstream>
extern "C"
{
#include <libavcodec></libavcodec>avcodec.h>
#include <libavcodec></libavcodec>bsf.h>
#include <libavformat></libavformat>avformat.h>
}

#pragma comment(lib,"avcodec.lib")
#pragma comment(lib,"avdevice.lib")
#pragma comment(lib,"avfilter.lib")
#pragma comment(lib,"avformat.lib")
#pragma comment(lib,"avutil.lib")
#pragma comment(lib,"swresample.lib")
#pragma comment(lib,"swscale.lib")

int mp4toannexb(AVBSFContext* bsf_ctx, AVPacket* pkt, std::ofstream& out)
{
 int ret;

 ret = av_bsf_send_packet(bsf_ctx, pkt);
 if (ret < 0) {
 std::cout << "bsf send packet failed, errno:" << ret << std::endl;
 return -1;
 }

 for (;;) {
 ret = av_bsf_receive_packet(bsf_ctx, pkt);
 if (AVERROR_EOF == ret || AVERROR(EAGAIN) == ret) {
 return 0;
 }
 if (ret < 0) {
 std::cout << "Could not receive packet, errno:" << ret << std::endl;
 return -1;
 }
 out.write((const char*)pkt->data, pkt->size);
 }
 return 0;
}


int main()
{
 AVOutputFormat* ofmt = NULL;
 AVFormatContext* ifmt_ctx = NULL;
 AVBSFContext* bsf_ctx = NULL;
 AVPacket* pkt = NULL;
 const char* in_filename = "http://192.168.1.12:8088/live/123.flv";
 int ret = -1;
 int video_index = -1;
 std::ofstream outh264("D:\\ConsoleApplication1\\Debug\\out.h264", std::ios::binary | std::ios::trunc);

 avformat_network_init();

 if ((ifmt_ctx = avformat_alloc_context()) == NULL) {
 std::cout << "avformat_alloc_context failed." << std::endl;
 exit(1);
 }

 if ((ret = avformat_open_input(&ifmt_ctx, in_filename, 0, 0)) < 0) {
 std::cout << "Could not open input file." << std::endl;
 exit(1);
 }

 if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) < 0) {
 std::cout << "Failed to retrieve input stream information" << std::endl;
 return -1;
 }

 if (!(pkt = av_packet_alloc())) {
 std::cout << "Could not allocate packet" << std::endl;
 return -1;
 }

 video_index = av_find_best_stream(ifmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
 if (video_index < 0) {
 std::cout << "Could not find stream " << std::string(av_get_media_type_string(AVMEDIA_TYPE_VIDEO)) << std::endl;
 return -1;
 }

 av_dump_format(ifmt_ctx, 0, in_filename, 0);

 const AVBitStreamFilter* filter = av_bsf_get_by_name("h264_mp4toannexb");
 if (NULL == filter) {
 std::cout << "Could not create filter" << std::endl;
 return -1;
 }

 ret = av_bsf_alloc(filter, &bsf_ctx);
 if (ret < 0) {
 printf("Could not alloc bitstream filter \n");
 return -1;
 }

 // avcodec_parameters_from_context
 ret = avcodec_parameters_copy(bsf_ctx->par_in, ifmt_ctx->streams[video_index]->codecpar);
 if (ret < 0) {
 printf("Parameter copy filed, errno: %d \n", ret);
 return -1;
 }

 ret = av_bsf_init(bsf_ctx);
 if (ret < 0) {
 printf("BSF init failed, errno: %d \n", ret);
 return -1;
 }

 while (av_read_frame(ifmt_ctx, pkt) >= 0) {
 if (pkt->stream_index == video_index)
 {
 mp4toannexb(bsf_ctx, pkt, outh264);
 }
 av_packet_unref(pkt);
 }
 outh264.close();
 avformat_close_input(&ifmt_ctx);
 av_packet_free(&pkt);
 av_bsf_free(&bsf_ctx);

 return 0;
}
</fstream></iostream></thread>