[PATCH] lavfi test pattern generator
Hi all, useful for testing, it is based on the test pattern generator by Nicolas George: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html basically I just stripped the audio signal generator and adapted few things to the lavfi framework, so most credit goes to Nicolas. And it would plenty cool to find some way to get ffmpeg/ffplay take as input such a generator, but I still can't see how to do that. What I can do now is to take as input /dev/null, then overlay the test_pattern over it, but this is rather ugly. Regards. -- FFmpeg = Freak and Fierce Mysterious Proud Erratic Gadget
On date Sunday 2008-12-28 19:51:36 +0100, Stefano Sabatini encoded:
Hi all,
useful for testing, it is based on the test pattern generator by Nicolas George: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html
basically I just stripped the audio signal generator and adapted few things to the lavfi framework, so most credit goes to Nicolas.
And it would plenty cool to find some way to get ffmpeg/ffplay take as input such a generator, but I still can't see how to do that.
What I can do now is to take as input /dev/null, then overlay the test_pattern over it, but this is rather ugly.
New improved version which avoids an unnecessary memcpy and with misc cleanups, also rename it to test_src (better name suggestions are welcome, I think the suffix "_src" is needed to avoid clashes with the filters namespace, for example "noise" versus "noise_src"). Regards. -- FFmpeg = Frenzy and Faboulous Merciless Prodigious Educated Generator
On Fri, Jan 02, 2009 at 01:20:42AM +0100, Stefano Sabatini wrote:
On date Sunday 2008-12-28 19:51:36 +0100, Stefano Sabatini encoded:
Hi all,
useful for testing, it is based on the test pattern generator by Nicolas George: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html
basically I just stripped the audio signal generator and adapted few things to the lavfi framework, so most credit goes to Nicolas.
And it would plenty cool to find some way to get ffmpeg/ffplay take as input such a generator, but I still can't see how to do that.
What I can do now is to take as input /dev/null, then overlay the test_pattern over it, but this is rather ugly.
New improved version which avoids an unnecessary memcpy and with misc cleanups, also rename it to test_src (better name suggestions are welcome,
I think the suffix "_src" is needed to avoid clashes with the filters namespace, for example "noise" versus "noise_src").
agree [...]
static int init(AVFilterContext *filt_ctx, const char *args, void *opaque) { TestContext *ctx= filt_ctx->priv;
if(!args) { ctx->frame_rate = (AVRational) {25, 1}; } else { sscanf(args, "%d:%d:%d:%d", &ctx->w, &ctx->h, &ctx->frame_rate.num, &ctx->frame_rate.den); }
/* todo: add more checks */ if (ctx->frame_rate.den <= 0 || ctx->frame_rate.num <= 0) { av_log(filt_ctx, AV_LOG_ERROR, "Invalid frame rate value: %d/%d\n", ctx->frame_rate.num, ctx->frame_rate.den); return -1; }
ctx->frame_nb = 0; ctx->pts = 0;
/* fill the frame */ { unsigned int frame_size = avpicture_get_size(PIX_FMT_RGB24, ctx->w, ctx->h);
uint8_t* frame_data = (uint8_t*)av_malloc(frame_size);
useless cast
avpicture_fill((AVPicture*)(&ctx->frame), frame_data, PIX_FMT_RGB24, ctx->w, ctx->h); }
return 0; }
static int config_props(AVFilterLink *link) { TestContext *ctx = link->src->priv;
link->w = ctx->w; link->h = ctx->h;
return 0; }
static void draw_rectangle(unsigned val, unsigned char *p, unsigned stride, unsigned sw, unsigned x, unsigned y, unsigned w, unsigned h) {
id rename sw to some english word
unsigned i;
p += sw * (3 * x + y * stride); w *= 3 * sw; h *= sw; for(i = 0; i < h; i++) { memset(p, val, w); p += stride; } }
static void draw_digit(int digit, unsigned char *p0, unsigned stride, unsigned sw) { static const unsigned char masks[10] = { 0x7D, 0x50, 0x37, 0x57, 0x5A, 0x4F, 0x6F, 0x51, 0x7F, 0x5F }; unsigned mask = masks[digit];
draw_rectangle(0, p0, stride, sw, 0, 0, 8, 13); if(mask & 1) draw_rectangle(255, p0, stride, sw, 1, 0, 5, 1); if(mask & 2) draw_rectangle(255, p0, stride, sw, 1, 6, 5, 1); if(mask & 4) draw_rectangle(255, p0, stride, sw, 1, 12, 5, 1); if(mask & 8) draw_rectangle(255, p0, stride, sw, 0, 1, 1, 5); if(mask & 16) draw_rectangle(255, p0, stride, sw, 6, 1, 1, 5); if(mask & 32) draw_rectangle(255, p0, stride, sw, 0, 7, 1, 5); if(mask & 64) draw_rectangle(255, p0, stride, sw, 6, 7, 1, 5); }
why not write a simple text renderer with fixed width ASCII bitmap font mplayer contains a tool to make these bitmaps ... ... we could use this for subtitles as well and it is easy :) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are too smart to engage in politics are punished by being governed by those who are dumber. -- Plato
On date Friday 2009-01-02 02:51:44 +0100, Michael Niedermayer encoded: [...]
why not write a simple text renderer with fixed width ASCII bitmap font mplayer contains a tool to make these bitmaps ... ... we could use this for subtitles as well and it is easy :)
grep didn't helped, could someone give me a more precise pointer to the file/files? Regards. -- FFmpeg = Fierce and Friendly Mournful Programmable EnGine
On Fri, Jan 02, 2009 at 10:40:09AM +0100, Stefano Sabatini wrote:
On date Friday 2009-01-02 02:51:44 +0100, Michael Niedermayer encoded: [...]
why not write a simple text renderer with fixed width ASCII bitmap font mplayer contains a tool to make these bitmaps ... ... we could use this for subtitles as well and it is easy :)
grep didn't helped, could someone give me a more precise pointer to the file/files?
try grep in something prior to r22857 because diego deleted them in that revission. I dont remember why they where deleted ... They are in the TOOLS directory, README is also there [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes
Le tridi 13 niv?se, an CCXVII, Michael Niedermayer a ?crit?:
try grep in something prior to r22857 because diego deleted them in that revission. I dont remember why they where deleted ...
As far as I remember, because this was considered obsolete compared to using vectorial fonts through FreeType. I think this makes sense: anyone, nowadays, has lots of TrueType and OpenTYpe fonts on his hard drive, while these bitmaps fonts had to be installed specifically for mplayer. Furthermore, using FreeType not much work; I count about 60 lines of code for the font rendering in my old fcbanner program: loading a custom bitmap format would require almost as much. Regards, -- Nicolas George
On Fri, Jan 02, 2009 at 06:53:02PM +0100, Nicolas George wrote:
Le tridi 13 niv?se, an CCXVII, Michael Niedermayer a ?crit?:
try grep in something prior to r22857 because diego deleted them in that revission. I dont remember why they where deleted ...
As far as I remember, because this was considered obsolete compared to using vectorial fonts through FreeType. I think this makes sense: anyone, nowadays, has lots of TrueType and OpenTYpe fonts on his hard drive, while these bitmaps fonts had to be installed specifically for mplayer. Furthermore, using FreeType not much work; I count about 60 lines of code for the font rendering in my old fcbanner program:
Interrested to write a simple FreeType based AVSubtitle renderer? (after we decided how to exactly export char* in it of course ...)
loading a custom bitmap format would require almost as much.
One old idea i had but never implemented was to build these bitmaps with a raytracer from some font and a pretty texture, surely would beat the crap out of FreeType :) One could even go as far as make them trasparent and store the x,y coordinates for each pixel from where the refracted light comes from. Glass subtitles with accurate refraction and fast and simple too at runtime ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch
Hi. Le tridi 13 niv?se, an CCXVII, Michael Niedermayer a ?crit?:
Interrested to write a simple FreeType based AVSubtitle renderer?
I do not exclude the idea, once I am back on my schedule for work and finished with ALSA and the timestamp filter.
One old idea i had but never implemented was to build these bitmaps with a raytracer from some font and a pretty texture, surely would beat the crap out of FreeType :) One could even go as far as make them trasparent and store the x,y coordinates for each pixel from where the refracted light comes from.
We can wait for POV-Ray 4 and do it on the fly... By the time POV-Ray 4 comes out, computers should be fast enough to do it in real time.
Glass subtitles with accurate refraction and fast and simple too at runtime
That is quite a funny idea though. Regards, -- Nicolas George
On date Friday 2009-01-02 01:20:42 +0100, Stefano Sabatini wrote:
On date Sunday 2008-12-28 19:51:36 +0100, Stefano Sabatini encoded:
Hi all,
useful for testing, it is based on the test pattern generator by Nicolas George: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html
basically I just stripped the audio signal generator and adapted few things to the lavfi framework, so most credit goes to Nicolas.
And it would plenty cool to find some way to get ffmpeg/ffplay take as input such a generator, but I still can't see how to do that.
What I can do now is to take as input /dev/null, then overlay the test_pattern over it, but this is rather ugly.
New improved version which avoids an unnecessary memcpy and with misc cleanups, also rename it to test_src (better name suggestions are welcome, I think the suffix "_src" is needed to avoid clashes with the filters namespace, for example "noise" versus "noise_src").
Updated version with API updates and some de-obfuscation. This source is useful for testing purposes (e.g. for the lavfi indev), and also provide a nice example of how to implement a non trivial source. I'll add the missing docs if I see there is the will to include it in the actual form.
On Sat, Jun 18, 2011 at 01:13:11PM +0200, Stefano Sabatini wrote: [...]
+/** + * @file + * Based on the test pattern generator demuxer by Nicolas George: + * http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html + */
You mean http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/037845.html ? -- Clément B.
On date Saturday 2011-06-18 13:55:43 +0200, Clément Bœsch encoded:
On Sat, Jun 18, 2011 at 01:13:11PM +0200, Stefano Sabatini wrote: [...]
+/** + * @file + * Based on the test pattern generator demuxer by Nicolas George: + * http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html + */
You mean http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/037845.html ?
Yes, I used the link in my old version, and I didn't check its validity (and maybe something in the archive changed). -- FFmpeg = Faithless & Fiendish Martial Patchable Enlightening Gadget
On Sat, Jun 18, 2011 at 01:13:11PM +0200, Stefano Sabatini wrote:
On date Friday 2009-01-02 01:20:42 +0100, Stefano Sabatini wrote:
On date Sunday 2008-12-28 19:51:36 +0100, Stefano Sabatini encoded:
Hi all,
useful for testing, it is based on the test pattern generator by Nicolas George: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html
basically I just stripped the audio signal generator and adapted few things to the lavfi framework, so most credit goes to Nicolas.
And it would plenty cool to find some way to get ffmpeg/ffplay take as input such a generator, but I still can't see how to do that.
What I can do now is to take as input /dev/null, then overlay the test_pattern over it, but this is rather ugly.
New improved version which avoids an unnecessary memcpy and with misc cleanups, also rename it to test_src (better name suggestions are welcome, I think the suffix "_src" is needed to avoid clashes with the filters namespace, for example "noise" versus "noise_src").
Updated version with API updates and some de-obfuscation.
This source is useful for testing purposes (e.g. for the lavfi indev), and also provide a nice example of how to implement a non trivial source.
I'll add the missing docs if I see there is the will to include it in the actual form.
Fine with me [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates
On date Saturday 2011-06-18 14:55:20 +0200, Michael Niedermayer encoded:
On Sat, Jun 18, 2011 at 01:13:11PM +0200, Stefano Sabatini wrote:
On date Friday 2009-01-02 01:20:42 +0100, Stefano Sabatini wrote:
On date Sunday 2008-12-28 19:51:36 +0100, Stefano Sabatini encoded:
Hi all,
useful for testing, it is based on the test pattern generator by Nicolas George: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html
basically I just stripped the audio signal generator and adapted few things to the lavfi framework, so most credit goes to Nicolas.
And it would plenty cool to find some way to get ffmpeg/ffplay take as input such a generator, but I still can't see how to do that.
What I can do now is to take as input /dev/null, then overlay the test_pattern over it, but this is rather ugly.
New improved version which avoids an unnecessary memcpy and with misc cleanups, also rename it to test_src (better name suggestions are welcome, I think the suffix "_src" is needed to avoid clashes with the filters namespace, for example "noise" versus "noise_src").
Updated version with API updates and some de-obfuscation.
This source is useful for testing purposes (e.g. for the lavfi indev), and also provide a nice example of how to implement a non trivial source.
I'll add the missing docs if I see there is the will to include it in the actual form.
Fine with me
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience. See also: http://en.wikipedia.org/wiki/Test_card -- FFmpeg = Foolish & Faithful Mastering Programmable Enigmatic Governor
On date Saturday 2011-06-18 15:46:24 +0200, Stefano Sabatini encoded: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
See also: http://en.wikipedia.org/wiki/Test_card
Forgot to attach the sample. -- FFmpeg = Fierce & Faithful MultiPurpose Elastic Gadget
On date Saturday 2011-06-18 16:01:22 +0200, Stefano Sabatini encoded:
On date Saturday 2011-06-18 15:46:24 +0200, Stefano Sabatini encoded: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
See also: http://en.wikipedia.org/wiki/Test_card
Forgot to attach the sample.
Name changed to digittest, and documentation added. If no one comes with a better idea, I'll commit the source in the present form in a few days. -- FFmpeg = Friendly & Faithless Multimedia Power Eretic Gorilla
On date Thursday 2011-06-23 02:38:21 +0200, Stefano Sabatini encoded:
On date Saturday 2011-06-18 16:01:22 +0200, Stefano Sabatini encoded:
On date Saturday 2011-06-18 15:46:24 +0200, Stefano Sabatini encoded: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
See also: http://en.wikipedia.org/wiki/Test_card
Forgot to attach the sample.
Name changed to digittest, and documentation added.
If no one comes with a better idea, I'll commit the source in the present form in a few days.
Changed again my mind, after much struggling I finally decided that testsrc is a better name since we already have at least another "test" filter (pixdesctest), so adding "src" can't hurt. This is also very similar to what the GStreamer guys did (videotestsrc), so that can't be too bad. In case we need to add more test sources, we'll find fancy names for them (e.g. mptestsrc). That said, I'm going to commit soon if I see no comments. -- FFmpeg = Frenzy and Foolish Multimedia Plastic Elected Geek
On Sat, Jun 25, 2011 at 12:13:33AM +0200, Stefano Sabatini wrote:
On date Thursday 2011-06-23 02:38:21 +0200, Stefano Sabatini encoded:
On date Saturday 2011-06-18 16:01:22 +0200, Stefano Sabatini encoded:
On date Saturday 2011-06-18 15:46:24 +0200, Stefano Sabatini encoded: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
See also: http://en.wikipedia.org/wiki/Test_card
Forgot to attach the sample.
Name changed to digittest, and documentation added.
If no one comes with a better idea, I'll commit the source in the present form in a few days.
Changed again my mind, after much struggling I finally decided that testsrc is a better name since we already have at least another "test" filter (pixdesctest), so adding "src" can't hurt. This is also very similar to what the GStreamer guys did (videotestsrc), so that can't be too bad. In case we need to add more test sources, we'll find fancy names for them (e.g. mptestsrc).
That said, I'm going to commit soon if I see no comments.
no comments [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is not what we do, but why we do it that matters.
On date Saturday 2011-06-25 05:03:53 +0200, Michael Niedermayer encoded:
On Sat, Jun 25, 2011 at 12:13:33AM +0200, Stefano Sabatini wrote:
On date Thursday 2011-06-23 02:38:21 +0200, Stefano Sabatini encoded:
On date Saturday 2011-06-18 16:01:22 +0200, Stefano Sabatini encoded:
On date Saturday 2011-06-18 15:46:24 +0200, Stefano Sabatini encoded: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
See also: http://en.wikipedia.org/wiki/Test_card
Forgot to attach the sample.
Name changed to digittest, and documentation added.
If no one comes with a better idea, I'll commit the source in the present form in a few days.
Changed again my mind, after much struggling I finally decided that testsrc is a better name since we already have at least another "test" filter (pixdesctest), so adding "src" can't hurt. This is also very similar to what the GStreamer guys did (videotestsrc), so that can't be too bad. In case we need to add more test sources, we'll find fancy names for them (e.g. mptestsrc).
That said, I'm going to commit soon if I see no comments.
no comments
Landed. -- FFmpeg = Fanciful and Fabulous Mastering Puritan Entertaining God
On Sat, Jun 18, 2011 at 03:46:24PM +0200, Stefano Sabatini wrote:
On date Saturday 2011-06-18 14:55:20 +0200, Michael Niedermayer encoded:
On Sat, Jun 18, 2011 at 01:13:11PM +0200, Stefano Sabatini wrote:
On date Friday 2009-01-02 01:20:42 +0100, Stefano Sabatini wrote:
On date Sunday 2008-12-28 19:51:36 +0100, Stefano Sabatini encoded:
Hi all,
useful for testing, it is based on the test pattern generator by Nicolas George: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/036838.html
basically I just stripped the audio signal generator and adapted few things to the lavfi framework, so most credit goes to Nicolas.
And it would plenty cool to find some way to get ffmpeg/ffplay take as input such a generator, but I still can't see how to do that.
What I can do now is to take as input /dev/null, then overlay the test_pattern over it, but this is rather ugly.
New improved version which avoids an unnecessary memcpy and with misc cleanups, also rename it to test_src (better name suggestions are welcome, I think the suffix "_src" is needed to avoid clashes with the filters namespace, for example "noise" versus "noise_src").
Updated version with API updates and some de-obfuscation.
This source is useful for testing purposes (e.g. for the lavfi indev), and also provide a nice example of how to implement a non trivial source.
I'll add the missing docs if I see there is the will to include it in the actual form.
Fine with me
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
there is -vf mp=test [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes
On date Sunday 2011-06-19 04:37:07 +0200, Michael Niedermayer encoded:
On Sat, Jun 18, 2011 at 03:46:24PM +0200, Stefano Sabatini wrote: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
there is -vf mp=test
(Note: mp=test crashes here). If we don't come with better ideas we could simply name the tests sequentially (aka srctest1, srctest2, ...). Other ideas: testcard1 testcard2 ... -- FFmpeg = Fierce & Furious Meaningless Powerful Elected Guru
On Sun, Jun 19, 2011 at 11:32:31PM +0200, Stefano Sabatini wrote:
On date Sunday 2011-06-19 04:37:07 +0200, Michael Niedermayer encoded:
On Sat, Jun 18, 2011 at 03:46:24PM +0200, Stefano Sabatini wrote: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
there is -vf mp=test
(Note: mp=test crashes here).
could you provide gdb output ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras
On date Monday 2011-06-20 23:04:39 +0200, Michael Niedermayer encoded:
On Sun, Jun 19, 2011 at 11:32:31PM +0200, Stefano Sabatini wrote:
On date Sunday 2011-06-19 04:37:07 +0200, Michael Niedermayer encoded:
On Sat, Jun 18, 2011 at 03:46:24PM +0200, Stefano Sabatini wrote: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
there is -vf mp=test
(Note: mp=test crashes here).
could you provide gdb output ?
(gdb) show args Argument list to give program being debugged when it is started is "-i slow.flv -vf mp=test -y out.avi". (gdb) bt #0 0xb71ec537 in raise () from /lib/libc.so.6 #1 0xb71ef922 in abort () from /lib/libc.so.6 #2 0xb7222fbd in ?? () from /lib/libc.so.6 #3 0xb722d0ca in ?? () from /lib/libc.so.6 #4 0xb722e918 in ?? () from /lib/libc.so.6 #5 0xb7231a5d in free () from /lib/libc.so.6 #6 0x0856bc47 in av_free (ptr=0x8dce5f0) at libavutil/mem.c:152 #7 0x0806d537 in merge_ref (ret=0x8dcf070, a=0x8dcba20) at libavfilter/formats.c:39 #8 0x0806d69d in avfilter_merge_formats (a=0x8dcbed0, b=0x8dcba20) at libavfilter/formats.c:71 #9 0x0806c36f in query_formats (graph=0x8dcd320, log_ctx=0x0) at libavfilter/avfiltergraph.c:159 #10 0x0806c67c in ff_avfilter_graph_config_formats (graph=0x8dcd320, log_ctx=0x0) at libavfilter/avfiltergraph.c:229 #11 0x0806c6d4 in avfilter_graph_config (graphctx=0x8dcd320, log_ctx=0x0) at libavfilter/avfiltergraph.c:245 #12 0x0804fc60 in configure_video_filters (ist=0x8d64670, ost=0x8d5c360) at ffmpeg.c:431 #13 0x08056d44 in transcode (output_files=0x87e0ee0, nb_output_files=1, input_files=0x8d5c758, nb_input_files=1, stream_maps=0x0, nb_stream_maps=0) at ffmpeg.c:2331 #14 0x0805d366 in main (argc=7, argv=0xbffff714) at ffmpeg.c:4571 -- FFmpeg = Fast Fierce Marvellous Pitiless Extended Guru
On Tue, Jun 21, 2011 at 01:14:36AM +0200, Stefano Sabatini wrote:
On date Monday 2011-06-20 23:04:39 +0200, Michael Niedermayer encoded:
On Sun, Jun 19, 2011 at 11:32:31PM +0200, Stefano Sabatini wrote:
On date Sunday 2011-06-19 04:37:07 +0200, Michael Niedermayer encoded:
On Sat, Jun 18, 2011 at 03:46:24PM +0200, Stefano Sabatini wrote: [...]
Bikeshed painting time, in case we need different test patterns (e.g. for the test suite), it may be useful to choose a more distinctive name. I'm attaching a sample output for your convenience.
there is -vf mp=test
(Note: mp=test crashes here).
could you provide gdb output ?
(gdb) show args Argument list to give program being debugged when it is started is "-i slow.flv -vf mp=test -y out.avi".
cant reproduce that neither with ffmpeg nor ffplay [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire
Le decadi 30 prairial, an CCXIX, Stefano Sabatini a écrit :
+ char *size; ///< video frame size + char *rate; ///< video frame rate + char *duration; ///< total duration of the generated video
Isn't it a bother to have these fields in the context while their only use is to be immediately parsed into other fields?
+ { "size", "Set video size, accept a string describing frame size, such as 640x480 or hd720.", OFFSET(size), FF_OPT_TYPE_STRING, {.str = "320x240"}, 0, 0 },
Nit: describing *the* frame size, maybe. And possibly set *the* video size.
+ if ((ret = (av_set_options_string(test, args, "=", ":"))) < 0) {
With current Git, this segfaults with '-vf test', but works with '-vf test=', because av_set_options_string assumes that args is not null. A potential fix would be to add near the beginning of av_set_options_string: if (!opts) return 0; I do not know if you have something in that sense in your working tree.
+ * Fill rectangle with value val.
Fill *a* rectangle. The rests looks like worthy enhancement on top of my old patch. Thanks for bringing it back. Regards, -- Nicolas George
On date Saturday 2011-06-18 20:20:09 +0200, Nicolas George encoded:
Le decadi 30 prairial, an CCXIX, Stefano Sabatini a écrit :
+ char *size; ///< video frame size + char *rate; ///< video frame rate + char *duration; ///< total duration of the generated video
Isn't it a bother to have these fields in the context while their only use is to be immediately parsed into other fields?
+ { "size", "Set video size, accept a string describing frame size, such as 640x480 or hd720.", OFFSET(size), FF_OPT_TYPE_STRING, {.str = "320x240"}, 0, 0 },
Nit: describing *the* frame size, maybe. And possibly set *the* video size.
Uhm, here I did like in the rest of the documentation, not sure what is more correct but I prefer to keep consistency here.
+ if ((ret = (av_set_options_string(test, args, "=", ":"))) < 0) {
With current Git, this segfaults with '-vf test', but works with '-vf test=', because av_set_options_string assumes that args is not null.
A potential fix would be to add near the beginning of av_set_options_string:
if (!opts) return 0;
I do not know if you have something in that sense in your working tree.
Sent a separate patch for that.
+ * Fill rectangle with value val.
Fill *a* rectangle.
Fixed.
The rests looks like worthy enhancement on top of my old patch. Thanks for bringing it back.
BTW, do you have suggestions for a better name for the source? In case we want to add more test sources (e.g. like that used in the vsynth tests). -- FFmpeg = Furious and Frenzy Mythic Patchable Educated Gymnast
participants (7)
-
Clément Bœsch -
Michael Niedermayer -
michaelni@gmx.at -
Nicolas George -
nicolas.george@normalesup.org -
Stefano Sabatini -
stefano.sabatini-lala@poste.it