
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (97)
-
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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (9614)
-
ASPSMS : a successful integration with Piwik
3 octobre 2017, par Piwik Core Team — DevelopmentHave you ever wondered how an integration between a third party company and Piwik is possible ? What are the key factors for a good partnership ? This article describes our recent collaboration with a company for a mobile messaging integration.
At Piwik, we are always looking for new functionalities to build and improve the work of our community members. ASPSMS, an innovative SMS Gateway & Messaging solutions provider got in contact with us in order to do just this.
Why did we decide to partner with ASPSMS ?
- Fast
- Easy
- Just works
Those three words define the collaboration we had with ASPSMS and in the end everyone benefits.
Stefan, one of our developers who did the integration into Piwik, says “Thanks to an easy to understand API the SMS integration was done in a couple of hours. We got SMS credits upfront for testing which helped a lot.”
Using the ASPSMS integration, you can receive a daily or weekly SMS message listing the Key Performance Indicators of your website(s).
ASPSMS is now part of Piwik through the Mobile messaging settings :
As a company, how can I contribute to Piwik ?
If, like ASPSMS, you are providing great services which can help Piwik final users take better decisions, do not hesitate to contact the Piwik core team.
You can also start to develop your own, specific plugins, that you can freely publish on the Piwik marketplace.
About ASPSMS
VADIAN.NET AG is today one of the leading global providers of SMS solutions with more than 200,000 satisfied business clients. The product ASPSMS was launched in 2001. ASPSMS is a product of VADIAN.NET AG, a Swiss based Internet and Mobile Solutions provider.
-
How to set start time of video saved from RTSP stream with FFMPEG
12 janvier 2023, par hungI use FFMPEG to record video from a RTSP stream. What my code does is get current day time, create a folder with this format
year/month/day/hour/minute
and save the video to that folder.


When a new minute arrive, I create the new folder base on the new minute and run the record again to the new folder.
Basically It works, but the next video start time is continue the end of previous video. For example :



video1: 00:00 -> 00:55
video2: 00:56 -> ...




I hope I can set for all videos start from 00:00. Can I do that ?



Here my code



ffmpeg.h



class CtFfmpeg {
public:

 CtFfmpeg();
 ~CtFfmpeg();

 void init();
 int getInput();
 int getOutputName(const char *filename);
 int release();
 int ret;
 AVFormatContext *ifmt_ctx, *ofmt_ctx;
 AVStream *in_stream, *out_stream;
 AVPacket pkt;
 const char *in_filename;
 char *out_filename;

private:
 int setOutput(const char *outfilename);
 AVOutputFormat *ofmt;
};




ffmpeg.cpp



#include "ctffmpeg.h"

CtFfmpeg::CtFfmpeg() {
 in_filename = new char [1024];
 out_filename = new char [1024];
}

CtFfmpeg::~CtFfmpeg() {
 delete [] in_filename;
 delete [] out_filename;
}

void CtFfmpeg::init() {
 avcodec_register_all();
 av_register_all();
 avformat_network_init();
 pkt = { 0 };

 av_init_packet(&pkt);
 ofmt = NULL;
 ifmt_ctx = NULL;
 ofmt_ctx = NULL;
 return;
}

int CtFfmpeg::release() {
 av_write_trailer(ofmt_ctx);
 avcodec_close(out_stream->codec);

 // avcodec_close(in_stream->codec);
 // avformat_close_input(&ifmt_ctx);

 /* close output */
 if (!(ofmt->flags & AVFMT_NOFILE))
 avio_close(ofmt_ctx->pb);

 avformat_free_context(ofmt_ctx);
 av_free_packet(&pkt);
 if (ret < 0 && ret != AVERROR_EOF) {
 fprintf(stderr, "Error occurred\n");
 return 1;
 }
}

int CtFfmpeg::getInput() {
 if ((ret = avformat_open_input(&ifmt_ctx, in_filename, 0, 0)) < 0) {
 fprintf(stderr, "Could not open input file '%s'", in_filename);
 release();
 }

 if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) < 0) {
 fprintf(stderr, "Failed to retrieve input stream information");
 release();
 }

 av_dump_format(ifmt_ctx, 0, in_filename, 0);
}


int CtFfmpeg::setOutput(const char *outfilename) {
 avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, outfilename);
 if (!ofmt_ctx) {
 fprintf(stderr, "Could not create output context\n");
 ret = AVERROR_UNKNOWN;
 release();
 }

 ofmt = ofmt_ctx->oformat;
 for (int i = 0; i < ifmt_ctx->nb_streams; i++) {
 in_stream = ifmt_ctx->streams[i];
 out_stream = avformat_new_stream(ofmt_ctx, in_stream->codec->codec);

 if (!out_stream) {
 fprintf(stderr, "Failed allocating output stream\n");
 ret = AVERROR_UNKNOWN;
 release();
 }
 ret = avcodec_copy_context(out_stream->codec, in_stream->codec);

 if (ret < 0) {
 fprintf(stderr, "Failed to copy context from input to output stream codec context\n");
 release();
 }

 out_stream->codec->codec_tag = 0;
 if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
 out_stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
 } // for

 av_dump_format(ofmt_ctx, 0, outfilename, 1);
 if (!(ofmt->flags & AVFMT_NOFILE)) {
 ret = avio_open(&ofmt_ctx->pb, outfilename, AVIO_FLAG_WRITE);
 if (ret < 0) {
 fprintf(stderr, "Could not open output file '%s'", outfilename);
 release();
 }
 }
 ret = avformat_write_header(ofmt_ctx, NULL);
 if (ret < 0) {
 fprintf(stderr, "Error occurred when opening output file\n");
 release();
 }
}

int CtFfmpeg::getOutputName(const char *filename){
 sprintf(out_filename,filename);
 setOutput(out_filename);
}




main.cpp



#include "ctfolder.h"
#include "ctffmpeg.h"

CtFfmpeg * ff;

int main(int argc, char** argv) {

 if (argc < 2) {
 printf("usage: %s <rtsp link="link"> \n", argv[0]);
 return 1;
 }

 ff = new CtFfmpeg();

 ff->in_filename = argv[1]; //RTSP input link
 ff->init();
 ff->getInput();

 string filename;

 videoRecorder obj;
 int start, now;
 start = obj.get_current_min();

 if(obj.create_folder(0755))
 cout << "Cannot create folder, maybe it already exists" << endl;
 else
 cout << "Create folder succesfully" << endl;

 int skip = 0;

 while(1){

 filename = obj.update_filename();
 ff->getOutputName(filename.c_str());

 while((now = obj.get_current_min()) == start) {
 ff->ret = av_read_frame(ff->ifmt_ctx, &(ff->pkt));
 skip++;
 if(skip==1)
 continue;

 if(skip>2)
 skip=2;
 if (ff->ret < 0)
 continue;
 ff->pkt.pts = av_rescale_q_rnd(ff->pkt.pts, ff->in_stream->time_base, ff->out_stream->time_base, (AVRounding)(AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX));
 ff->pkt.dts = av_rescale_q_rnd(ff->pkt.dts, ff->in_stream->time_base, ff->out_stream->time_base, (AVRounding)(AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX));
 ff->pkt.duration = av_rescale_q(ff->pkt.duration, ff->in_stream->time_base, ff->out_stream->time_base);

 ff->pkt.pos = -1;
 ff->ret = av_interleaved_write_frame(ff->ofmt_ctx, &(ff->pkt));
 if (ff->ret < 0) {
 fprintf(stderr, "Error muxing packet\n");
 continue;
 }
 av_free_packet(&(ff->pkt));
 }
 ff->release();

 cout << "New minute!" << endl;

 if(obj.create_folder(0755))
 cout << "Cannot create folder, something's wrong" << endl;
 else
 cout << "Create folder succesfully" << endl;
 start = now;
 }

 return 0;
}
</rtsp>


-
FFMPEG Streaming Output Dropping On Virtual Server
11 octobre 2017, par David ChildersI am currently using FFMPEG to stream on a virtual CENTOS server. I use the following script to stream to youtube live.
ffmpeg -re -i program.01.mp4 -flags +global_header -acodec libmp3lame -ac 1 -ar 44100 -ab 192k -s 1280x720 -vcodec libx264 -pix_fmt yuv420p -g 60 -vb 1700k -profile:v baseline -preset:v faster -r 30 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxxx"
I previously used the very same FFMPEG stream script to stream on a dedicated CENTOS server for over a year, with no technial issues.
I tried to use the very same FFMPEG script on the virtualized server. When I use 1700k encoding speed - I get the following error in the output :
[flv @ 0x56da380] Failed to update header with correct duration.
[flv @ 0x56da380] Failed to update header with correct filesize.The youtube ingestor also complains that the input stream (coming from the CENTOS server) is slow and that the stream will buffer.
I have checked the available output bandwidth that virtual CENTOS server has access to.
- Download : 57.12 Mbit/s
- Upload : 96.57 Mbit/s
I am forced to use a much lower video encoding speed and output size
ffmpeg -re -i program.01.mp4 -f-flags +global_header -acodec libmp3lame -ac 1 -ar 44100 -ab 128k -s 640x360 -vcodec libx264 -pix_fmt yuv420p -g 60 -vb 425k -profile:v baseline -preset:v faster -r 30 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxxx"
I am at a loss to understand what the problem could be since I have access to more than enough required bandwidth.