
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 (41)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (5802)
-
Started Programming Young
6 septembre 2011, par Multimedia Mike — ProgrammingI have some of the strangest memories of my struggles to jump into computer programming.
Back To BASIC
I remember doing some Logo programming on Apple II computers at school in 5th grade (1987 timeframe). But that was mostly driving turtle graphics. Then I remember doing some TRS-80 BASIC in 7th grade, circa 1989. Emboldened by what very little I had learned in perhaps the week or 2 we took in a science class to do this, I tried a little GW-BASIC on my family’s “IBM-PC compatible” computer (they were still called that back then). I still remember what my first program consisted of. Even back then I was interested in manipulating graphics and color on a computer screen. Thus :10 color 1 20 print "This is color 1" 30 color 2 40 print "This is color 2" ...
And so on through 15 colors. Hey, it did the job– it demonstrated the 15 different colors you could set in text mode.
What’s FOR For ?
That 7th grade computer unit in science class wasn’t very thick on computer science details. I recall working with a lab partner to transcribe code listings into a computer (and also saving my work to a storage cassette). We also developed form processing programs that would print instructions to input text followed by an “INPUT I$” statement to obtain the user’s output.I remember there was some situation where we needed a brief delay between input and printing. The teacher told us to use a construct of the form :
10 FOR I = 1 TO 20000 20 NEXT I
We had to calibrate the number based on our empirical assessment of how long it lasted but I recall that the number couldn’t be much higher than about 32000, for reasons that would become clearer much later.
Imagine my confusion when I would read and try to comprehend BASIC program code I would find in magazines. I would of course see that FOR..NEXT construct all over the place but obviously not in the context of introducing deliberate execution delays. Indeed, my understanding of one of the fundamental building blocks of computer programming — iteration — was completely skewed because of this early lesson.
Refactoring
Somewhere along the line, I figured out that the FOR..NEXT could be used to do the same thing a bunch of times, possibly with different values. A few years after I had written that color program, I found it again and realized that I could write it as :10 for I = 1 to 15 20 color I 30 print I 40 next I
It still took me a few more years to sort out the meaning of WHILE..WEND, though.
-
ffmpeg H264 avi file get frame timestamp ?? UINT64_C errors
21 avril 2014, par jmlaiosavi file with h264 codec. I need to open it and extract the timestamp of every frame.
I tried to do it in opencv but it returns wrong results.
I have modified the code of the example filtering_video.c that exists in the fffmpeg/doc/examples folder in order to get the timestamp.
I have the following code but compiling it gives me a strange result about UNIT64_C.
Searching around I saw that it is a ffmpeg problem.So 2 questions :
1. Does this code look capable of returning and printing the frame timestamp
2. any solution to the UINT64_C problem ??Using ubuntu 11.04 and latest ffmpeg.
code
#include
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
static AVFormatContext *fmt_ctx;
static AVCodecContext *dec_ctx;
static int video_stream_index = -1;
static int open_input_file(const char *filename)
{
int ret;
AVCodec *dec;
if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)) < 0)
{
printf("Cannot open input file\n");
return ret;
}
if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0)
{
printf("Cannot find stream information\n");
return ret;
}
/* select the video stream */
ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &dec, 0);
if (ret < 0)
{
printf("Cannot find a video stream in the input file\n");
return ret;
}
video_stream_index = ret;
dec_ctx = fmt_ctx->streams[video_stream_index]->codec;
/* init the video decoder */
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0)
{
printf("Cannot open video decoder\n");
return ret;
}
return 0;
}
int main(int argc, char **argv)
{
int ret;
AVPacket packet;
AVFrame frame;
int got_frame;
if (argc != 2)
{
fprintf(stderr, "Usage: %s file\n", argv[0]);
exit(1);
}
avcodec_register_all();
av_register_all();
if ((ret = open_input_file(argv[1])) < 0)
goto end;
/* read all packets */
while (1)
{
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
break;
if (packet.stream_index == video_stream_index)
{
avcodec_get_frame_defaults(&frame);
got_frame = 0;
ret = avcodec_decode_video2(dec_ctx, &frame, &got_frame, &packet);
if (ret < 0)
{
printf("Error decoding video\n");
break;
}
if (got_frame)
{
frame.pts = av_frame_get_best_effort_timestamp(&frame);
printf("frame timestamp %ld\n", frame.pts);
}
}
}
av_free_packet(&packet);
end:
if (dec_ctx)
avcodec_close(dec_ctx);
avformat_close_input(&fmt_ctx);
exit(0);
}compiler errors
/usr/local/include/libavutil/common.h||In function ‘int32_t av_clipl_int32_c(int64_t)’:|
/usr/local/include/libavutil/common.h|173|error: ‘UINT64_C’ was not declared in this scope| -
ffmpeg H264 avi file get frame timestamp ?? UINT64_C errorrs
28 novembre 2013, par jmlaiosavi file with h264 codec. I need to open it and extract the timestamp of every frame.
I tried to do it in opencv but it returns wrong results.
I have modified the code of the example filtering_video.c that exists in the fffmpeg/doc/examples folder in order to get the timestamp.
I have the following code but compiling it gives me a strange result about UNIT64_C.
Searching around I saw that it is a ffmpeg problem.So 2 questions :
1. Does this code look capable of returning and printing the frame timestamp
2. any solution to the UINT64_C problem ??Using ubuntu 11.04 and latest ffmpeg.
code
#include
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
static AVFormatContext *fmt_ctx;
static AVCodecContext *dec_ctx;
static int video_stream_index = -1;
static int open_input_file(const char *filename)
{
int ret;
AVCodec *dec;
if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)) < 0)
{
printf("Cannot open input file\n");
return ret;
}
if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0)
{
printf("Cannot find stream information\n");
return ret;
}
/* select the video stream */
ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &dec, 0);
if (ret < 0)
{
printf("Cannot find a video stream in the input file\n");
return ret;
}
video_stream_index = ret;
dec_ctx = fmt_ctx->streams[video_stream_index]->codec;
/* init the video decoder */
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0)
{
printf("Cannot open video decoder\n");
return ret;
}
return 0;
}
int main(int argc, char **argv)
{
int ret;
AVPacket packet;
AVFrame frame;
int got_frame;
if (argc != 2)
{
fprintf(stderr, "Usage: %s file\n", argv[0]);
exit(1);
}
avcodec_register_all();
av_register_all();
if ((ret = open_input_file(argv[1])) < 0)
goto end;
/* read all packets */
while (1)
{
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
break;
if (packet.stream_index == video_stream_index)
{
avcodec_get_frame_defaults(&frame);
got_frame = 0;
ret = avcodec_decode_video2(dec_ctx, &frame, &got_frame, &packet);
if (ret < 0)
{
printf("Error decoding video\n");
break;
}
if (got_frame)
{
frame.pts = av_frame_get_best_effort_timestamp(&frame);
printf("frame timestamp %ld\n", frame.pts);
}
}
}
av_free_packet(&packet);
end:
if (dec_ctx)
avcodec_close(dec_ctx);
avformat_close_input(&fmt_ctx);
exit(0);
}compiler errors
/usr/local/include/libavutil/common.h||In function ‘int32_t av_clipl_int32_c(int64_t)’:|
/usr/local/include/libavutil/common.h|173|error: ‘UINT64_C’ was not declared in this scope|