Re: [FFmpeg-devel] Regression maybe
Ive now got the bisect down to the problem appearing between 75753 and 75759 but when i build the versions inbetween i get avconv build and not ffmpeg This is how the bisect went78890 BAD72615 GOOD75753 GOOD77321 BAD..75759 BADAVCONV built joolz Joolz On Friday, 4 March 2016, 0:17, Hendrik Leppkes <h.lepp...@gmail.com> wrote: On Thu, Mar 3, 2016 at 11:23 PM, JULIAN GARDNER <joo...@btinternet.com> wrote: > But regressions are development problems, things like "how do i scale a > video" is for users. > Im going tobe bisecting and fixing code if needed, so surely this is > development! > Joolz Then open an issue on trac, thats what an issue tracker is for. Once someone comes up with a potential fix, we can discuss it here. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Regression maybe
But regressions are development problems, things like "how do i scale a video" is for users. Im going tobe bisecting and fixing code if needed, so surely this is development! Joolz On Thursday, 3 March 2016, 23:05, Moritz Barsnick <barsn...@gmx.net> wrote: Hi Julian, On Thu, Mar 03, 2016 at 18:43:11 +, JULIAN GARDNER wrote: > I was going to bisect it and see if i can find a commit which breaks the > mpegts output?, but what commit do I start on for 63057 [...] > ffmpeg version N-78734-g666e2ed Copyright (c) 2000-2016 the FFmpeg developers ^^^ This is the (short) commit hash for the version used. Do you not see that in the output of "63057"? Let me "guess" 63504d8. I can't actually find that on github, but it's from around Aug 14 2014, which can also be specified for "git bisect" (I think). BTW, this sort if discussion is a topic for the ffmpeg-user mailing list. ffmpeg-devel is related to the actual development of ffmpeg. Cheer, Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Regression maybe
OK I upgraded a server today from 63057 to 78734 as we had a problem with dvbsubtitles not working. Now the machines, 2 of them one on 63057 and the new one, dont transcode and they have the same command lines like this. ffmpeg -i http://1.1.1.1:1/Stream1.ts -c:v copy -c:a copy -f mpegts udp://225.1.1.1:1?pkt_size=1316 These pull in streams from a remote server and push the data into a professional playout server, Edgeware WTV-2X Now the streams pulled and sent out to the Edgeware with software 63067 are OK, the streams sent out from 78734 are not accepted and made available by the Edgeware. Anyone have any ideas or seen this behaviour in later versions as the transcoder is remote and has NOT been updated. I was going to bisect it and see if i can find a commit which breaks the mpegts output?, but what commit do I start on for 63057 Joolz ffmpeg version N-78734-g666e2ed Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1) configuration: --bindir=/home/encoder/bin --enable-gpl --enable-version3 --enable-nonfree --disable-ffserver --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-libxcb --enable-libmp3lame --enable-postproc --enable-libfaac --enable-libzvbi --enable-libx264 --enable-libx265 --cc='ccache cc' libavutil 55. 19.100 / 55. 19.100 libavcodec 57. 25.101 / 57. 25.101 libavformat 57. 26.100 / 57. 26.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 36.100 / 6. 36.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Input #0, mpegts, from 'http://1.1.1.1:1/stream1.ts': Duration: N/A, start: 28.109333, bitrate: N/A Program 1 Metadata: service_name : Stream 1 service_provider: v-play Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 544x576 [SAR 32:17 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x101](eng): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 52 kb/s Output #0, mpegts, to 'udp://225.170.111.224:1234?pkt_size=1316_size=1048576': Metadata: encoder : Lavf57.26.100 Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 544x576 [SAR 32:17 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:1(eng): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 52 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 323 fps= 69 q=-1.0 Lsize= 1299kB time=00:00:15.37 bitrate= 692.4kbits/s speed=3.28x video:1082kB audio:88kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 11.022727% ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add findandcover filter
I like the idea of passing the found coordinates on so you can use delogo etc On Saturday, 2 May 2015, 13:07, Michael Niedermayer michae...@gmx.at wrote: On Fri, May 01, 2015 at 11:38:52AM +0200, Clément Bœsch wrote: On Thu, Apr 30, 2015 at 02:45:12PM +0200, Michael Niedermayer wrote: On Thu, Apr 30, 2015 at 02:21:55PM +0200, Nicolas George wrote: Le primidi 11 floréal, an CCXXIII, Michael Niedermayer a écrit : +@item object +Filepath of the object image, needs to be in gray8. + +@item cover +Filepath of the optional cover image, needs to be in yuv420. Suggestion: read object and cover (if enabled) from a second and third input to the filter. That way, format conversions, file reading, etc., is already taken care of. That also allows future enhancement, like having object and/or cover evolve. Another suggestion: make the filter just find, export the found coordinates as metadata, and let overlay or delogo do the rest of the work. These are good suggestions, do you and ubitux want to work on these? I'll pass, sorry. ok, nicolas do you want to work on this ? if not, question is what is preferred apply the patch with all other review comments taken care of or not apply the patch that is wait for someone to extend dualinput to support 2 inputs some of which optional and update the filter to use it ? I think the split filter suggestion can easily be done later and would be more user friendly that way. That is we could just add a 3rd mode which does not change the frame but just exports metadata. That way the common use case requires just 1 filter while it still could export metadata in case theres some other filter which could do something with it Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are too smart to engage in politics are punished by being governed by those who are dumber. -- Plato ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] filter vf_findandcover
Can you post the png fix please so i can backport this On Thursday, 30 April 2015, 4:03, Michael Niedermayer michae...@gmx.at wrote: On Wed, Apr 29, 2015 at 10:43:18PM +, JULIAN GARDNER wrote: I converted to 8bit greyscale, i did check the code to see what format it wants. My question was really about the fact that one of my own filters now fails with any png from gimp so I have to run 2 versions of ffmpeg one which works and the newer one. this is the problem[png @ 0x260cda0] PNG2 ok, i misunderstood png (and others) should be fixed now [...] -- 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 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] filter vf_findandcover
Just thought i would give this a test and took a video i had, cropped a static bit from the picture, using gimp, and tried to run this. but I have the same problem as one of my own filters, png decode does not work, well not with a png generated with gimp. anybody know how to export a VALID png file. command line and output encoder@encoder:~/ffmpeg$ ./ffmpeg -i /home/encoder/dumps/stream.ts -vf 'scale=640:360,foc=object=ball.png' -y -f mpegts a.ts ffmpeg version N-69739-gbc3514b Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1) configuration: --bindir=/home/encoder/bin --enable-gpl --enable-version3 --enable-nonfree --disable-ffserver --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-libxcb --enable-libmp3lame --enable-postproc --enable-libfaac --enable-libzvbi --enable-libx264 --enable-libx265 --cc='ccache cc' libavutil 54. 18.100 / 54. 18.100 libavcodec 56. 21.102 / 56. 21.102 libavformat 56. 19.101 / 56. 19.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 10.100 / 5. 10.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 [mpegts @ 0x25ce1a0] New SDT(0x0011) Table, version 255 to 0 [mpegts @ 0x25ce1a0] New PMT(0x0040) Table, version 255 to 0 Input #0, mpegts, from '/home/encoder/dumps/stream.ts': Duration: 00:15:00.04, start: 8526.864000, bitrate: 9900 kb/s Program 48 Metadata: service_name : DTV3 service_provider: Stream #0:0[0x41]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc Stream #0:1[0x42]: Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s [png @ 0x260cda0] PNG2 [png @ 0x260cda0] PNG3 [Parsed_foc_1 @ 0x260b640] Failed to decode image from file [png @ 0x25c2a60] PNG2 [png @ 0x25c2a60] PNG3 [Parsed_foc_1 @ 0x260b640] Error loading image file 'ball.png' [AVFilterGraph @ 0x25d31a0] Error initializing filter 'foc' with args 'object=ball.png' Error opening filters! ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] filter vf_findandcover
I converted to 8bit greyscale, i did check the code to see what format it wants. My question was really about the fact that one of my own filters now fails with any png from gimp so I have to run 2 versions of ffmpeg one which works and the newer one. this is the problem[png @ 0x260cda0] PNG2 [png @ 0x260cda0] PNG3 [Parsed_foc_1 @ 0x260b640] Failed to decode image from file[png @ 0x25c2a60] PNG2 [png @ 0x25c2a60] PNG3 its not the error from the foc filter, its an error from the png decode joolz On Thursday, 30 April 2015, 0:19, Michael Niedermayer michae...@gmx.at wrote: On Wed, Apr 29, 2015 at 09:58:55PM +, JULIAN GARDNER wrote: Just thought i would give this a test and took a video i had, cropped a static bit from the picture, using gimp, and tried to run this. but I have the same problem as one of my own filters, png decode does not work, well not with a png generated with gimp. anybody know how to export a VALID png file. command line and output encoder@encoder:~/ffmpeg$ ./ffmpeg -i /home/encoder/dumps/stream.ts -vf 'scale=640:360,foc=object=ball.png' -y -f mpegts a.ts ffmpeg version N-69739-gbc3514b Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1) configuration: --bindir=/home/encoder/bin --enable-gpl --enable-version3 --enable-nonfree --disable-ffserver --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-libxcb --enable-libmp3lame --enable-postproc --enable-libfaac --enable-libzvbi --enable-libx264 --enable-libx265 --cc='ccache cc' libavutil 54. 18.100 / 54. 18.100 libavcodec 56. 21.102 / 56. 21.102 libavformat 56. 19.101 / 56. 19.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 10.100 / 5. 10.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 [mpegts @ 0x25ce1a0] New SDT(0x0011) Table, version 255 to 0 [mpegts @ 0x25ce1a0] New PMT(0x0040) Table, version 255 to 0 Input #0, mpegts, from '/home/encoder/dumps/stream.ts': Duration: 00:15:00.04, start: 8526.864000, bitrate: 9900 kb/s Program 48 Metadata: service_name : DTV3 service_provider: Stream #0:0[0x41]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc Stream #0:1[0x42]: Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s [png @ 0x260cda0] PNG2 [png @ 0x260cda0] PNG3 [Parsed_foc_1 @ 0x260b640] Failed to decode image from file [png @ 0x25c2a60] PNG2 [png @ 0x25c2a60] PNG3 [Parsed_foc_1 @ 0x260b640] Error loading image file 'ball.png' [AVFilterGraph @ 0x25d31a0] Error initializing filter 'foc' with args 'object=ball.png' Error opening filters! the object file must be gray8 colorspace i used a .pgm ill fix the code to produce a better error message and document that thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educated differ from the uneducated as much as the living from the dead. -- Aristotle ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] A little copy/paste type for you to fix
libavformat:166 if (ctx-pageurl) { av_strlcat(filename, pageUrl=, len); av_strlcat(filename, ctx-pageurl, len); } if (ctx-swfurl) { av_strlcat(filename, swfUrl=, len); av_strlcat(filename, ctx-pageurl, len); } Do you see it? The line at 172 should be av_strlcat(filename, ctx-swfurl, len); joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] doc/examples/muxing.c
From: Stefano Sabatini stefa...@gmail.com To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Wednesday, 5 November 2014, 12:23 Subject: Re: [FFmpeg-devel] doc/examples/muxing.c On date Tuesday 2014-11-04 17:39:22 +, JULIAN GARDNER encoded: I have been working on a program which needs to do audio resampling, and used muxing.c as a base but now i am coming up against a problem. Changing muxing.c so that the sound produced by the routine get_audio_frame is not the same audio rate as the output causes an assert in the write_audio_frame routine, normally the program prodces the same audio rate that the output format is going to use, so the resampler really does nothing. No the resampler is used to change sample format, in case the output format doesn't support the input format. Yes but the sample_count stays the same as the input rate==output rate, so no errors crop up Modifying the audio tmp_frame definition and the associated tables for the resampler was easy but i have 1 thing which im struggling to understand line 310 muxing.c if (frame) { /* convert samples from native format to destination codec format, using the resampler */ /* compute destination number of samples */ dst_nb_samples = av_rescale_rnd(swr_get_delay(ost-swr_ctx, c-sample_rate) + frame-nb_samples, c-sample_rate, c-sample_rate, AV_ROUND_UP); av_assert0(dst_nb_samples == frame-nb_samples); This is suspect (the reason of this change is lost in the merges, so I can't help). Anyone line 335 muxing.c frame-pts = av_rescale_q(ost-samples_count, (AVRational){1, c-sample_rate}, c-time_base); As the current code stands the input and output sample_rate is the same, so this code really does nothing, but now i have it so that the output is 44100 and the input is 48000, this code needs changing, my initial thought was this will use the output sample rate, but i still get the assert Can someone who knows more about this fix the demo so that the input sample rate != output sample rate How are you using the code? How can you force the code to change output sample rate? If you have a patch please share. thats the problem i have patch 4 lines of code which forces the self produced sound to be different from the output stream example #define SAMPLE_RATE_OTHER( X) (X==44100 ? 48000:44100) routine open_audio find the line ost-t = 0; change next 2 lines ost-tincr = 2 * M_PI * 110.0 / SAMPLE_RATE_OTHER(c-sample_rate); ost-tincr2 = 2 * M_PI * 110.0 / SAMPLE_RATE_OTHER(c-sample_rate) / SAMPLE_RATE_OTHER(c-sample_rate); then find the line ost-tmp_frame = alloc_audio_frame(AV_SAMPLE_FMT_S16, c-:channel_layout, c-sample_rate, nb_samples); change to ost-tmp_frame = alloc_audio_frame(AV_SAMPLE_FMT_S16, c-:channel_layout, SAMPLE_RATE_OTHER(c-sample_rate), nb_samples); then 10 lines down av_opt_set_int (ost-swr_ctx, in_sample_rate, c-sample_rate, 0);change to av_opt_set_int (ost-swr_ctx, in_sample_rate, SAMPLE_RATE_OTHER(c-sample_rate), 0); This then states that the self produced audio frame will have a different sample_rate to that of the output format. If you make these changes and nothing else you get the assert in write_audio_frame As an example in out values from assert 22050 44100 2304 1152 ASSERT 32000 44100 1588 1152 ASSERT 44100 44100 1152 1152 OK 48000 44100 1168 1152 ASSERT 22050 48000 2508 1152 ASSERT 32000 48000 1728 1152 ASSERT 44100 48000 1254 1152 ASSERT 48000 48000 1152 1152 OK joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Regression problem
From: JULIAN GARDNER joo...@btinternet.com To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Wednesday, 24 September 2014, 14:48 Subject: Re: [FFmpeg-devel] Regression problem From: JULIAN GARDNER joo...@btinternet.com To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Tuesday, 23 September 2014, 13:37 Subject: Re: [FFmpeg-devel] Regression problem - Original Message - From: Michael Niedermayer michae...@gmx.at To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Cc: Sent: Tuesday, 23 September 2014, 12:24 Subject: Re: [FFmpeg-devel] Regression problem On Tue, Sep 23, 2014 at 09:27:57AM +0100, JULIAN GARDNER wrote: I seem to be having problems using the ff_load_image routine, with a git pulled build from the beginning of the week, which used to work but is now giving me failed to decode image file, and this is on a png that has been in use for over a year, The code is is based on VSRC_TESTSRC with an addition call to this code static int load_image(uint8_t **image_data, int *w, int *h, int *stride, const char *filename, void *log_ctx) { int ret; enum AVPixelFormat pix_fmt; uint8_t *src_data[4], *dst_data[4]; int src_linesize[4], dst_linesize[4]; av_log( NULL, AV_LOG_WARNING, load_image %s\n, filename); /* load image from file */ if ((ret = ff_load_image(src_data, src_linesize, w, h, pix_fmt, filename, log_ctx)) 0) return ret; if ((ret = ff_scale_image(dst_data, dst_linesize, *w, *h, PIXEL_FORMAT, src_data, src_linesize, *w, *h, pix_fmt, log_ctx)) 0) goto end; *stride = dst_linesize[0]; /* copy image_data to a newly allocated array */ *image_data = av_malloc(*stride * *h); if (!*image_data) ret = AVERROR(ENOMEM); av_image_copy_plane(*image_data, *stride, dst_data[0], dst_linesize[0], *w*4, *h); end: av_free(src_data[0]); av_free(dst_data[0]); return ret; } This used to work but now as I have said give the error message about not being able to decode There is nothing in the log, even with as -loglevel debug load_image /home/encoder/images/Logo640x360.png [AVIOContext @ 0x7fdcf8002580] Statistics: 3713 bytes read, 0 seeks [libx264 @ 0x2c63320] frame= 322 QP=12.00 NAL=2 Slice:P Poc:144 I:15 P:524 SKIP:381 size=14355 bytes [Parsed_osd_0 @ 0x2c3b200] Failed to decode image from file [Parsed_osd_0 @ 0x2c3b200] Error loading image file '/home/encoder/images/Logo640x360.png' how can this be reproduced ? can you share the png file ? It happens with any png, i just created a simple 100x100 png in gimp and this also fails joolz Started debgging the code and found that the return from the pngdec.c decode_frame is ok, data decoded and got_packet set to 1, image size if correct. So looks like it is somewhere further down the chain. just noticed someone else has posted what seems to me to be the same regression bug, unable to decode png file. From my debugging my problem also fails after the file has been decoded correctly. joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Regression problem
From: JULIAN GARDNER joo...@btinternet.com To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Tuesday, 23 September 2014, 13:37 Subject: Re: [FFmpeg-devel] Regression problem - Original Message - From: Michael Niedermayer michae...@gmx.at To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Cc: Sent: Tuesday, 23 September 2014, 12:24 Subject: Re: [FFmpeg-devel] Regression problem On Tue, Sep 23, 2014 at 09:27:57AM +0100, JULIAN GARDNER wrote: I seem to be having problems using the ff_load_image routine, with a git pulled build from the beginning of the week, which used to work but is now giving me failed to decode image file, and this is on a png that has been in use for over a year, The code is is based on VSRC_TESTSRC with an addition call to this code static int load_image(uint8_t **image_data, int *w, int *h, int *stride, const char *filename, void *log_ctx) { int ret; enum AVPixelFormat pix_fmt; uint8_t *src_data[4], *dst_data[4]; int src_linesize[4], dst_linesize[4]; av_log( NULL, AV_LOG_WARNING, load_image %s\n, filename); /* load image from file */ if ((ret = ff_load_image(src_data, src_linesize, w, h, pix_fmt, filename, log_ctx)) 0) return ret; if ((ret = ff_scale_image(dst_data, dst_linesize, *w, *h, PIXEL_FORMAT, src_data, src_linesize, *w, *h, pix_fmt, log_ctx)) 0) goto end; *stride = dst_linesize[0]; /* copy image_data to a newly allocated array */ *image_data = av_malloc(*stride * *h); if (!*image_data) ret = AVERROR(ENOMEM); av_image_copy_plane(*image_data, *stride, dst_data[0], dst_linesize[0], *w*4, *h); end: av_free(src_data[0]); av_free(dst_data[0]); return ret; } This used to work but now as I have said give the error message about not being able to decode There is nothing in the log, even with as -loglevel debug load_image /home/encoder/images/Logo640x360.png [AVIOContext @ 0x7fdcf8002580] Statistics: 3713 bytes read, 0 seeks [libx264 @ 0x2c63320] frame= 322 QP=12.00 NAL=2 Slice:P Poc:144 I:15 P:524 SKIP:381 size=14355 bytes [Parsed_osd_0 @ 0x2c3b200] Failed to decode image from file [Parsed_osd_0 @ 0x2c3b200] Error loading image file '/home/encoder/images/Logo640x360.png' how can this be reproduced ? can you share the png file ? It happens with any png, i just created a simple 100x100 png in gimp and this also fails joolz Started debgging the code and found that the return from the pngdec.c decode_frame is ok, data decoded and got_packet set to 1, image size if correct. So looks like it is somewhere further down the chain. joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Filters
From: JULIAN GARDNER joo...@btinternet.com To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Monday, 18 August 2014, 19:51 Subject: Re: [FFmpeg-devel] Filters From: Clément Bœsch u...@pkh.me To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Sunday, 20 July 2014, 10:40 Subject: Re: [FFmpeg-devel] Filters On Fri, Jul 18, 2014 at 10:33:40PM +0100, JULIAN GARDNER wrote: [...] fmpeg -i .ts -vcodec libx264 -b:v 1000k -acodec libfaac -async 1 -vf 'split [mark], drawbox=10:10:100:100:color=green [dontneed];[mark] drawbox=100:100:100;100:color=red [vid];[dontneed][vid] overlay' -y -f mpegts processed.ts try -filter_complex instead of -vf and -map [vid] -y -f mpegts processed.ts -map '[dontneed]' -f null - [...] -- Clément B. Thanks for this, its 99% what i need apart from I lose the audio on the [vid] output. I want the small picture [160x100] output without audio and the 640x360 output with audio Commandlineffmpeg -threads 0 -i udp://231.231.11.3:1234?localaddr=192.168.2.123 -filter_complex 'scale=iw/2:ih/2,split [mark], scale=160:90,drawbox=10:10:5:5:color=red [detect];[mark] drawbox=10:10:10:5:5:color=blue [vid]' -map [detect] -vcodec libx264 -preset faster -x264opts keyint=75 -x264opts bitrate=512 -bufsize 1M -r 25 -an -f mpegts udp://238.170.112.96:1234?pkt_size=1316buffer_size=1048576 -map [vid][0:a] -vcodec libx264 -preset faster -x264opts keyint=75 -x264opts bitrate=1150 -bufsize 1M -r 25 -acodec libfaac -ab 128k -ar 32k -ac 2 -f mpegts udp://225.170.112.96:1234?pkt_size=1316buffer_size=1048576 Output (as I know you love this)ffmpeg version N-63057-g63504d8 Copyright (c) 2000-2014 the FFmpeg developers built on Aug 14 2014 10:36:36 with gcc 4.6 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libzvbi --cc='ccache cc' libavutil 52. 82.100 / 52. 82.100 libavcodec 55. 60.103 / 55. 60.103 libavformat 55. 37.102 / 55. 37.102 libavdevice 55. 13.101 / 55. 13.101 libavfilter 4. 5.100 / 4. 5.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 Input #0, mpegts, from 'udp://231.231.11.3:1234?localaddr=192.168.2.123': Duration: N/A, start: 12191.492622, bitrate: 128 kb/s Program 48 Stream #0:0[0x41]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc Stream #0:1[0x42]: Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s Codec AVOption ab (set bitrate (in bits/s)) specified for output file #1 (udp://225.170.112.96:1234?pkt_size=1316buffer_size=1048576) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. [libx264 @ 0x2d72560] VBV maxrate unspecified, assuming CBR [libx264 @ 0x2d72560] using SAR=1/1 [libx264 @ 0x2d72560] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0x2d72560] profile High, level 1.3 [libx264 @ 0x2d74d60] VBV maxrate unspecified, assuming CBR [libx264 @ 0x2d74d60] using SAR=1/1 [libx264 @ 0x2d74d60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0x2d74d60] profile High, level 3.0 Output #0, mpegts, to 'udp://238.170.112.96:1234?pkt_size=1316buffer_size=1048576': Metadata: encoder : Lavf55.37.102 Stream #0:0: Video: h264 (libx264), yuv420p, 160x90 [SAR 1:1 DAR 16:9], q=-1--1, 512 kb/s, 90k tbn, 25 tbc Output #1, mpegts, to 'udp://225.170.112.96:1234?pkt_size=1316buffer_size=1048576': Metadata: encoder : Lavf55.37.102 Stream #1:0: Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 1150 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0:0 (h264) - scale drawbox - Stream #0:0 (libx264) drawbox - Stream #1:0 (libx264) Press [q] to stop, [?] for help [mpegts @ 0x2d40fc0] New 0011 Table, version 255 to 0 frame= 130 fps= 26 q=-1.0 Lq=-1.0 size= 245kB time=00:00:05.12 bitrate= 392.2kbits/s dup=24 drop=224 any idea on how i can get the audio back joolz I tried your suggestion of splitting the -map [vid[0:a] into -map [vid] -map [0:a] and I get the following error message Output with label '0:a' does not exist in any defined filter graph, or is already used elsewhere. I managed to get around this by using -map [vid] -map a:0x42, but why does the split one fail. joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Small patch for someone to push please
From: Michael Niedermayer michae...@gmx.at To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Saturday, 16 August 2014, 1:42 Subject: Re: [FFmpeg-devel] Small patch for someone to push please On Fri, Aug 15, 2014 at 11:26:40AM +0100, JULIAN GARDNER wrote: In libavfilter/lavfutils.c around line 77 the code is if (ret 0 || !frame_decoded) { av_log(log_ctx, AV_LOG_ERROR, Failed to decode image from file\n); goto end; } ret = 0; Now this causes a problem if ret=0 and frame_decoded==0 as you get dropped out of the routine with a failed decode and no width or height. my changes if (ret 0 || !frame_decoded) { av_log(log_ctx, AV_LOG_ERROR, Failed to decode image from file\n); + ret = !frame_decoded ? -1:ret; goto end; } ret = 0; applied similar solution thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes Thanks Did you manage to have a quick look at my image loading code? would love to get this fixed. joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Small patch for someone to push please
In libavfilter/lavfutils.c around line 77 the code is if (ret 0 || !frame_decoded) { av_log(log_ctx, AV_LOG_ERROR, Failed to decode image from file\n); goto end; } ret = 0; Now this causes a problem if ret=0 and frame_decoded==0 as you get dropped out of the routine with a failed decode and no width or height. my changes if (ret 0 || !frame_decoded) { av_log(log_ctx, AV_LOG_ERROR, Failed to decode image from file\n); + ret = !frame_decoded ? -1:ret; goto end; } ret = 0; Maybe not the correct ret value but at least it stops code which checks for an error from trying to do more stuff on the returned data, which wont be valid This was caught becuase my code which has now started failing static int load_image(uint8_t **image_data, int *w, int *h, int *stride, const char *filename, void *log_ctx) { int ret; enum AVPixelFormat pix_fmt; uint8_t *src_data[4], *dst_data[4]; int src_linesize[4], dst_linesize[4]; av_log( NULL, AV_LOG_WARNING, load_image %s\n, filename); /* load image from file */ if ((ret = ff_load_image(src_data, src_linesize, w, h, pix_fmt, filename, log_ctx)) 0) return ret; if ((ret = ff_scale_image(dst_data, dst_linesize, *w, *h, PIXEL_FORMAT, src_data, src_linesize, *w, *h, pix_fmt, log_ctx)) 0) goto end; *stride = dst_linesize[0]; /* copy image_data to a newly allocated array */ *image_data = av_malloc(*stride * *h); if (!*image_data) ret = AVERROR(ENOMEM); av_image_copy_plane(*image_data, *stride, dst_data[0], dst_linesize[0], *w*4, *h); end: av_free(src_data[0]); av_free(dst_data[0]); return ret; } I dont know why as the pngs are the same, but i get ret=30148 and decode_frame=0, 30148 is the filesize of the PNG. output from ffmpeg when running my code is sparse even with '-loglevel debug' load_image /home/encoder/images/GameNone_640x360.png [AVIOContext @ 0x7f966802560] Statistics: 30148 bytes read, 0 seeks Failed to decode image from file 31480 0 Any ideas joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Filters
- Original Message - From: Clément Bœsch u...@pkh.me To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Cc: Sent: Friday, 18 July 2014, 14:01 Subject: Re: [FFmpeg-devel] Filters On Fri, Jul 18, 2014 at 12:56:17PM +0100, JULIAN GARDNER wrote: From: Clément Bœsch u...@pkh.me To: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org Sent: Friday, 18 July 2014, 13:38 Subject: Re: [FFmpeg-devel] Filters On Fri, Jul 18, 2014 at 12:08:41PM +0100, JULIAN GARDNER wrote: How do I fix a filter so that it takes in 1 input but has no output, this is part of a project and this part is a detection filter, it does nothing else. The problem at the moment is that with the current filter, based on drawbox, is that it produces an output which i need to the use overlay to dump. Is there a video filter which has 1 input but 0 outputs Just make a passthrough filtering (ff_filter_frame(in)), and do not map its output Can you elaborate a bit more as I have this code as my base code static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { DrawBoxContext *s = inlink-dst-priv; int plane, x, y, xb = s-x, yb = s-y; unsigned char *row[4]; // Detect Stationary Object // Here I would like to dump the frame as it is no longer needed return ff_filter_frame(inlink-dst-outputs[0], frame); } You do exactly that and that's all. Then ffmpeg -i foo -vf bar -f null - There are a lot of detection only filters. volumedetect, signalstats, blackdetect, ... just copy their behaviour Yes but this is my problem, an example command line I need at the moment fmpeg -i .ts -vcodec libx264 -b:v 1000k -acodec libfaac -async 1 -vf 'split [mark], detection [dontneed];delay=5, markregion [vid];[dontneed][vid] overlay' -y -f mpegts processed.ts What I would like fmpeg -i .ts -vcodec libx264 -b:v 1000k -acodec libfaac -async 1 -vf 'split [mark], detection; delay=5, markregion' -y -f mpegts processed.ts I am working on the delay filter at the moment, as i need 5 frames to detect the block, but i need to mark all frames, including the 4 previous frames. I am trying to get rid of the overlay as the input source could be HD. joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel