
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 (61)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (...) -
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 (...)
Sur d’autres sites (8291)
-
FFMPEG :Adjusting PTS and DTS of encoded packets with real timestamps information
19 août 2020, par jackey balwaniI am trying to record a video of activities in desktop using muxing in FFMPEG Library.
I referred following link for my implementation.
https://ffmpeg.org/doxygen/trunk/muxing_8c_source.html


I observe that the encoded video plays too fast. Below is the code of encoding the frame and then writing it to output file.


static int write_frame(AVFormatContext *fmt_ctx, AVCodecContext *c,
 AVStream *st, AVFrame *frame)
{
 int ret;
 
 // send the frame to the encoder
 ret = avcodec_send_frame(c, frame);
 if (ret < 0) {
 fprintf(stderr, "Error sending a frame to the encoder: %s\n",av_err2str(ret));
 exit(1);
 }
 while (ret >= 0) {
 AVPacket pkt = { 0 };

 ret = avcodec_receive_packet(c, &pkt);
 if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
 break;
 else if (ret < 0) {
 fprintf(stderr, "Error encoding a frame: %s\n", av_err2str(ret));
 exit(1);
 }

 /* rescale output packet timestamp values from codec to stream timebase(from 25 to 90000 this case) */
 av_packet_rescale_ts(&pkt, c->time_base, st->time_base);
 pkt.stream_index = st->index;

 /* Write the compressed frame to the media file. */
 log_packet(fmt_ctx, &pkt);
 ret = av_interleaved_write_frame(fmt_ctx, &pkt);
 av_packet_unref(&pkt);
 if (ret < 0) {
 fprintf(stderr, "Error while writing output packet: %s\n", av_err2str(ret));
 exit(1);
 }
 }
 
 return ret == AVERROR_EOF ? 1 : 0;
 }



-> I am rescaling output packet timestamp values from codec to stream timebase (25 -> 90,000) before writing.
-> Since encoded video does plays very fast, so I have added temporary fix to multiply stream timebase by some factor just before av_packet_rescale_ts (in my case it is 5 -> 5*st->time_base.den which becomes 4,50,000) so that output video duration increases. This may not be the accurate solution as this would not give the real time shift between the frames.


/** rescale output packet timestamp values from codec to stream timebase **/
st->time_base.den = 5*st->time_base.den;
av_packet_rescale_ts(pkt, *time_base, st->time_base);
pkt->stream_index = st->index;
/** Write the compressed frame to the media file. **/
return av_interleaved_write_frame(fmt_ctx, pkt);



-> I want that output video duration should be similar to the input. I have heard of things like giving real timestamps to the PTS and DTS of frame and packets and encoding at variable or unknown frame rate.
Can we use these , If yes then How to implement ?
any suggestions or pseudo code of the approach would really help.


Thanks


-
Revision a51e389b42 : Merge "Adjust full-pixel search method in real-time mode"
9 juillet 2014, par Yunqing WangMerge "Adjust full-pixel search method in real-time mode"
-
Revision 56afb9c41a : Merge "Enable real-time version reference motion vector search"
26 juin 2014, par Jingning HanMerge "Enable real-time version reference motion vector search"