
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (78)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (4926)
-
ffmpeg pipe Invalid data found when processing input
28 mars 2021, par Ankit MaheshwariHere is my configuration.





const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const spawn = require('child_process').spawn;

ffmpeg = spawn(ffmpegPath, [
 
// Remove this line, as well as `-shortest`, if you send audio from the browser.
 // '-f', 'lavfi', '-i', 'anullsrc',

 // FFmpeg will read input video from STDIN
 '-i', '-',

 // -re flag means to Read input at native frame rate.
 '-re', '-y',

 // thread_queue_size added to avoid err: Thread message queue blocking; consider raising the thread_queue_size option, required before each input - this is for image2
 // '-thread_queue_size', '2048',

 // REF TO OVERLAY 
 // https://stackoverflow.com/questions/10438713/overlay-animated-images-with-transparency-over-a-static-background-image-using-f?rq=1
 // -loop loops the background image input so that we don't just have one frame, crucial!

 // The image file muxer writes video frames to image files, http://underpop.online.fr/f/ffmpeg/help/image2-1.htm.gz
 '-f', 'image2',

 // The -loop option is specific to the image file demuxer and gif muxer, so it can't be used for typical video files, but it can be used to infinitely loop a series of input images.
 '-loop', '1',

 // pattern_type is used to determine the format of the images contained in the files.
 // Read images matching the "*.png" glob pattern, that is files terminating with the ".png" suffix
 '-pattern_type', 'glob',

 // '-i', `images/${streamConfigData.youtube_key}/destination/image-*.png`,

 '-i', `images/${streamConfigData.youtube_key}/overlay/abc.png`,

 // '-vf', 'scale=1920x1080:flags=lanczos',
 
 // -shortest ends encoding when the shortest input ends, which is necessary as looping the background means that that input will never end.
 // 'overlay=shortest=1',

 "-filter_complex", "[1:v]format=rgba,colorchannelmixer=aa=1[fg];[0][fg]overlay",
 
 // Because we're using a generated audio source which never ends,
 // specify that we'll stop at end of other input. Remove this line if you
 // send audio from the browser.
 // '-shortest',
 
 // If we're encoding H.264 in-browser, we can set the video codec to 'copy'
 // so that we don't waste any CPU and quality with unnecessary transcoding.
 // If the browser doesn't support H.264, set the video codec to 'libx264'
 // or similar to transcode it to H.264 here on the server.
 // '-vcodec', 'libx264',
 // it is not possible to filter and stream copy the same stream at the same time. https://stackoverflow.com/a/53526514/4057143
 '-vcodec', 'copy',
 
 // if browser not supports encoding AAC, we must transcode the audio to AAC here on the server.
 // '-acodec', 'aac',

 // Use this rate control mode if you want to keep the best quality and care less about the file size. CRF scale is 0–51, where 0 is lossless, 23 is the default, and 51 is worst quality possible. A lower value generally leads to higher quality, https://trac.ffmpeg.org/wiki/Encode/H.264
 '-crf', '23',

 // preset provide a certain encoding speed to compression ratio. A slower preset will provide better compression. medium – default preset, https://trac.ffmpeg.org/wiki/Encode/H.264
 '-preset', 'ultrafast',

 // -r set the frame rate. Generally, -r. Use the filter when you need to change framerate before applying further filters.
 // '-r', '30',
 // '-framerate', '30',

 //debug level logs
 '-loglevel', 'debug',
 '-v', 'verbose',

 // -g GOP_LEN_IN_FRAMES, -g sets the keyframe interval. https://superuser.com/a/908325
 '-g', '60',

 // video timescale, not sure what it is!
 '-video_track_timescale', '1000',

 // a live stream with more/less constant bit rate, to be able to control the bandwidth used.
 // a live stream with limited bit rate
 '-b:v', '15000k',
 // '-maxrate', '4000k',
 // '-bufsize', '8000k',

 // FLV is the container format used in conjunction with RTMP
 '-f', 'flv',
 
 // The output RTMP URL.
 // For debugging, you could set this to a filename like 'test.flv', and play
 // the resulting file with VLC.
 rtmpUrl 
 ], {
 env: {
 NODE_ENV: 'production',
 PATH: process.env.PATH
 }
 });







-
9 plugins you should definitely have heard of to prevent data leaks, security breaches and to get more flexibility in the way you log in to your Piwik.
9 janvier 2017, par InnoCraft — CommunityAt Piwik and at InnoCraft, we have always focussed on Security and take it very seriously. We were one of the first open source projects to offer a bug bounty for reporting security issues responsibly, Piwik has gone through several security audits and all changes in Piwik go through security reviews by our security experts.
On the Piwik Marketplace you will find some plugins that give you just that extra bit of additional security to keep your data even more secure and to let you secure how your users log in to your Piwik.
Security Info
This plugin provides security information about the server(s) your Piwik is running on and offers suggestions on how to improve the security settings of your servers. We highly recommend to install the Security Info plugin. Checks performed include for example usage of the latest PHP version, usage of latest Piwik version, usage of PHP ini settings like magic_quotes_gpc and more. More details & download
By Piwik
Google Authenticator
This plugins adds Two Factor Authentication, also known as 2FA, to Piwik. When logging in to Piwik, it forces you to confirm the identity by utilizing a combination of two different components. This means if someone knows your password, they will still need the other component in order to successfully log in, in this case a code that changes every minute on your phone. More details & download
By Stefan Giehl
Activity Log
The plugin gives you a detailed audit log of all activities that happen in your Piwik for better security and problem diagnostic. It provides documentary evidence of over 80 different activities that happen in your Piwik and lets you for example see when someone successfully logged in, when someone tried to log in with your username, when someone deleted data, and much more. More details
By InnoCraft, the makers of Piwik. Pricing starts from 39€ / $49 a year.
Login Revokable
This feature allows a user to log in from multiple locations (different browsers, computers, …) as usual and makes sure to log you out of all sessions as soon as you log out from any of these locations. More details & download
Force SSL
For security and privacy reasons you should always use Piwik over HTTPS (SSL). By activating this plugin, you make sure to redirect all “http://” requests to “https://” in the Piwik UI and API. More details & download
By InnoCraft, the makers of Piwik.
Performance Info
This plugin checks your Piwik configuration and compares it with some best practice settings. For example whether debug modes are disabled in a production environment, whether the example plugins that are shipped with Piwik are disabled, and more. Please note that this plugin works only with Piwik 2. More details & download
Login Ldap
Some companies might already manage their users in an LDAP server. This plugin allows you to log in to your Piwik via a central LDAP and supports web server authentication (eg. for Kerberos SSO). It authenticates with an LDAP server and uses LDAP information to personalize Piwik. More details & download
By Piwik
Login Shibboleth
Shibboleth is an open-source project that provides a Single Sign-On and allows websites to make informed authorization decisions in a privacy-preserving manner. Using this plugin allows you to connect to an existing Shibboleth environment so you need to manage users only once. More details & download
By Universität Würzburg Rechenzentrum
Login Http Auth
This plugin allows you to sign in to your Piwik using the HTTP Auth protocol instead of the standard login mechanism. It extends the standard Piwik authentication to use Basic HTTP Authentication. This may be useful if you use Basic HTTP Authentication already anyway and don’t want to manage your users additionally in Piwik itself. We recommend to use this only over SSL, for example with the Force SSL plugin. More details & download
By Piwik
Custom Development
Piwik is an analytics platform that you can extend and customize to your needs. Besides many configuration options you can change existing functionality and also build new functionality on top of Piwik, for example to log in to your Piwik via any Single-Sign-On. Read more about extending Piwik on the Piwik Developer Zone or get in touch with us and we take care of it for you.
-
Raw H264 + ADTS AAC audio streams muxing results in wrong duration and bitrate using ffmpeg libraries
17 avril 2015, par Muhammad AliI have an imaging hardware that outputs two streams :
Video : H264 bitstream
Audio : ADTS AACI am aware of Input Sources params e-g bitrate , FPS (video), Sampling Rate(audio) etc and I’ve set the params for ffmpeg accordingly.
My desired output is an FLV container with these two streams .
At Stage 1, I was able to Mux H264 bitstream into an FLV container which would play just fine in ffplay. No errors reported on console, duration and bitrate calculations were fine too.
At Stage 2, I tried to mux Audio (ADTS AAC) audio stream with video stream into FLV container. Audio stream required adtstoasc bitstream filter though. But now the duration of the file was wrong and so was the bitrate.
I should mention that my source of PTS is hardware provided PTS which claims that audio and video streams use the same counter for PTS so Audio video frames should always be considered in order.
The playback of the resultant file using ffplay stucks on first video frame but audio keeps playing fine. And console complains a lot about "AVC NAL Size (very large number)".
Any ideas why is the duration / bitrate wrong when I mux the audio along ?
Here is the muxing code :
if ((packet.header.dataType == AM_TRANSFER_PACKET_TYPE_H264) || (packet.header.dataType == AM_TRANSFER_PACKET_TYPE_AAC))
{
AVCodecContext *cn;
raw_fd_index = packet.header.streamId << 1;
//printf("GOT VIDEO FRAME : DATA LEN : %d \n",packet.header.dataLen);
if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_H264)
{
//printf("VIDEO STREAM ID %d | PTS : %d | V.SEQ: %d \n\n",packet.header.streamId,packet.header.dataPTS,packet.header.seqNum);
if(!firstVideoRecvd)
{
//still waiting for I Frame
if(packet.header.frameType == AM_TRANSFER_FRAME_IDR_VIDEO)
{
firstVideoRecvd = 1;
audioEnabled = 1;
lastvPts = packet.header.dataPTS;
printf("\n\n IDR received : AudioEnabled : true | MuxingEnabled : true \n");
}
else
{
printf("... waiting for IDR frame \n\n ");
continue;
}
}
}
else
{
//printf("AUDIO STREAM ID %d | PTS : %d | A.SEQ: %d \n\n",packet.header.streamId + 1,packet.header.dataPTS,packet.header.seqNum);
if(!firstVideoRecvd)
{
printf("\n\n Waiting for a video Frame before we start packing audio... ignoring packet\n");
continue;
}
if(!audioEnabled)
{ printf("\n\n First Video received but audio still not enabled \n\n");
continue;
}
if(recvFirstAudio)
{
recvFirstAudio = 0;
lastaPts = packet.header.dataPTS;
}
}
//******** FFMPEG SPECIFICS
//printf("FRAME SIZE : %d \t FRAME TYPE : %d \n",packet.header.dataLen, packet.header.frameType);
av_init_packet(&pkt);
//pkt.flags |= AV_PKT_FLAG_KEY;
if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_H264)
{
pkt.stream_index = packet.header.streamId;//0;//ost->st->index; //stream index 0 for vid : 1 for aud
outStreamIndex = outputVideoStreamIndex;
vDuration += (packet.header.dataPTS - lastvPts);
lastvPts = packet.header.dataPTS;
}
else if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_AAC)
{
pkt.stream_index = packet.header.streamId + 1;//1;//ost->st->index; //stream index 0 for vid : 1 for aud
outStreamIndex = outputAudioStreamIndex;
aDuration += (packet.header.dataPTS - lastaPts);
lastaPts = packet.header.dataPTS;
}
//packet.header.streamId
pkt.data = (uint8_t *)packet.data;//raw_data;
pkt.size = packet.header.dataLen;
pkt.pts = pkt.dts= packet.header.dataPTS;
//pkt.duration = 24000; //24000 assumed basd on observation
//duration calculation
if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_H264)
{
pkt.duration = vDuration;
}
else if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_AAC)
{
pkt.duration = aDuration;
}
in_stream = ifmt_ctx->streams[pkt.stream_index];
out_stream = ofmt_ctx->streams[outStreamIndex];
cn = out_stream->codec;
if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_AAC)
av_bitstream_filter_filter(aacbsfc, in_stream->codec, NULL, &pkt.data, &pkt.size, pkt.data, pkt.size, 0);
//if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_H264)
// av_bitstream_filter_filter(h264bsfc, in_stream->codec, NULL, &pkt.data, &pkt.size, pkt.data, pkt.size, 0);
if(packet.header.dataType == AM_TRANSFER_PACKET_TYPE_H264)
{
//commented on Tuesday
av_packet_rescale_ts(&pkt, cn->time_base, out_stream->time_base);
pkt.pts = av_rescale_q_rnd(pkt.pts, in_stream->time_base, out_stream->time_base, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
pkt.dts = av_rescale_q_rnd(pkt.dts, in_stream->time_base, out_stream->time_base, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
//printf("Pkt Duration before scaling: %d \n ",pkt.duration);
pkt.duration = av_rescale_q(pkt.duration, in_stream->time_base, out_stream->time_base);
//printf("Pkt Duration after scaling: %d \n ",pkt.duration);
}
//enabled on Tuesday
pkt.pos = -1;
pkt.stream_index = outStreamIndex;
//doxygen suggests i use av_write_frame if i am taking care of interleaving
ret = av_interleaved_write_frame(ofmt_ctx, &pkt);
//ret = av_write_frame(ofmt_ctx, &pkt);
if (ret < 0)
{
fprintf(stderr, "Error muxing packet\n");
continue;
}
av_free_packet(&pkt);
}Notice that I am not using pkt.flags . I am not sure what I should set it to and would it matter ? I am not doing so when I am muxing just the video into FLV or muxing both audio and video into flv.