Re: [FFmpeg-user] minterpolate ...for Paul
> Am 28.01.2021 um 07:26 schrieb Mark Filipak (ffmpeg) : > > I'm seeing problems with minterpolate that manifest as occasional visual > errors in particular areas. Command line, complete, uncut console output and an input file missing. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] minterpolate ...for Paul
I'm seeing problems with minterpolate that manifest as occasional visual errors in particular areas. Visually, the issue looks like a math error diddling macroblocks. But there's some strangeness. The scene is a camera pan to the right and up. The strangeness appears at the top of the frame (as expected) and involves the top row of macroblocks (as expected). The strangeness is, 1, the affected area is 14x1 macroblocks (not a very explainable number), and 2, the affected area is in error by only about a half-dozen pixels (not a whole number of macroblocks). Let me know if you're interested in pursuing this. If so, I'll post the transcode video and the source video on dropbox. The videos are 20 seconds. By the way, minterpolate is amazing! Regards, Mark. -- Someone's sneaking in and turning up the range so that my food burns. I'm sure of it. And the older I get, the more sure of it I become. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] minterpolate problem
On 01/27/2021 05:47 PM, Carl Eugen Hoyos wrote: Am Mi., 27. Jan. 2021 um 02:03 Uhr schrieb Mark Filipak (ffmpeg) : ffmpeg -i SOURCE -map 0 -filter_complex "split[1][2], \ [1]telecine=pattern=55, select=not(eq(mod(n\,5)\,2))[3], \ [2]minterpolate=fps=6/1001:mi_mode=mci=mc_mode=obmc:scd=fdiff:scd_threshold=10, \ select=eq(mod(n\,5)\,2)[4], \ [3][4]interleave" \ -codec:v libx265 -x265-params "crf=16:qcomp=0.60" -codec:a copy -codec:s copy TARGET Since others may read this: The command line makes little sense, you should either use telecine or minterpolate. Carl Eugen, you surprise me. I'm sure you see what I'm trying to do, so why the angst? First, let me admit that since I started this thread (following weeks of experimentation) I decided to simply try this: 'minterpolate=fps=6/1001' to see what it would do. I was amazed. If minterpolate is Paul's work, then Paul is a f'ing genius. I've since spent a couple of days playing with minterpolate and have found that this: 'minterpolate=fps=6/1001:mi_mode=mci:mc_mode=obmc:scd=fdiff:scd_threshold=10:vsbmc=1:search_param=20' is astounding. Nonetheless, I'd still like to generate a 60 FPS transcode that is visually equivalent (as closely as possible) to 24 pictures/second by replacing the combed frame (i.e. n%5==2) by an interpolated frame -- hence the filter graph you loathe. For that n%5==2 frame, here's what I sought (and did not find): Sobel of line y: __/\_/\_ Sobel of line y+1: __/\_/\_ Desired output: line y: /\_/\___ line y+1: /\_/\___ I could find this: line y: __/\_/\_ line y+1: __/\_/\_ (aligned to top line) and I could find this: line y: __/\_/\_ (aligned to bottom line) line y+1: __/\_/\_ but I could not find this: line y: /\_/\___ (aligned to mean) line y+1: /\_/\___ (aligned to mean) One reason I might -- MIGHT -- prefer telecine55 is that the original frames are recoverable from the transcodes -- but admittedly, that's not much of a reason, is it? Another reason is that the transcode is much, much quicker than 'minterpolate=fps=6/1001' and somewhat smaller. There you have it, Carl Eugen. Please stop trying to make the world think I'm feeble minded. :-) Okay? Regards, Mark. -- Someone's sneaking in and turning up the range so that my food burns. I'm sure of it. And the older I get, the more sure of it I become. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] minterpolate problem
Am Mi., 27. Jan. 2021 um 02:03 Uhr schrieb Mark Filipak (ffmpeg) : > ffmpeg -i SOURCE -map 0 -filter_complex "split[1][2], \ > [1]telecine=pattern=55, select=not(eq(mod(n\,5)\,2))[3], \ > [2]minterpolate=fps=6/1001:mi_mode=mci=mc_mode=obmc:scd=fdiff:scd_threshold=10, > \ > select=eq(mod(n\,5)\,2)[4], \ > [3][4]interleave" \ > -codec:v libx265 -x265-params "crf=16:qcomp=0.60" -codec:a copy -codec:s copy > TARGET Since others may read this: The command line makes little sense, you should either use telecine or minterpolate. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Sync. Issue. Video Gradually Falls Behind
Am Mi., 27. Jan. 2021 um 19:09 Uhr schrieb Thomas Seilund via ffmpeg-user : > > > On 1/26/21 6:01 PM, Carl Eugen Hoyos wrote: > > Am Di., 26. Jan. 2021 um 16:51 Uhr schrieb Thomas Seilund via > > ffmpeg-user : > > > >> Input #0, h264, from 'pipe:': > >> Duration: N/A, bitrate: N/A > >> Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 25 > >> fps, 25 tbr, 1200k tbn, 50 tbc > >> Guessed Channel Layout for Input Stream #1.0 : stereo > >> Input #1, pulse, from > >> 'alsa_input.usb-046d_HD_Pro_Webcam_C920_9D715A9F-02.analog-stereo': > >> Duration: N/A, start: 1611673439.592751, bitrate: 1536 kb/s > >> Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s > >> Guessed Channel Layout for Input Stream #2.0 : stereo > >> Input #2, pulse, from > >> 'alsa_output.platform-bcm2835_audio.analog-stereo.monitor': > >> Duration: N/A, start: 1611673439.612473, bitrate: 1536 kb/s > >> Stream #2:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s > > I don't think you can synchronize a stream with no start time with > > two streams with start time, at least not without additional options. > I assume you mean that the video stream does not have a start time and > the two audio streams do. Correct. > Can I set the start time for the video stream to avoid video from > falling more and more behind? The setpts filter should allow you to set the audio start times to 0. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Sync. Issue. Video Gradually Falls Behind
On 1/26/21 6:01 PM, Carl Eugen Hoyos wrote: Am Di., 26. Jan. 2021 um 16:51 Uhr schrieb Thomas Seilund via ffmpeg-user : Input #0, h264, from 'pipe:': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, pulse, from 'alsa_input.usb-046d_HD_Pro_Webcam_C920_9D715A9F-02.analog-stereo': Duration: N/A, start: 1611673439.592751, bitrate: 1536 kb/s Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Guessed Channel Layout for Input Stream #2.0 : stereo Input #2, pulse, from 'alsa_output.platform-bcm2835_audio.analog-stereo.monitor': Duration: N/A, start: 1611673439.612473, bitrate: 1536 kb/s Stream #2:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s I don't think you can synchronize a stream with no start time with two streams with start time, at least not without additional options. Carl Eugen ___ I assume you mean that the video stream does not have a start time and the two audio streams do. Can I set the start time for the video stream to avoid video from falling more and more behind? Or can set additional options to avoid video from falling more and more behind? Thanks Thomas S ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] minterpolate problem
> I didn't know I could get help on individual filters. To be completely fair, that is actually in the docs, but it's not exactly on the front page. P ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] minterpolate problem
On 01/27/2021 05:31 AM, Paul B Mahol wrote: On Wed, Jan 27, 2021 at 6:03 AM Mark Filipak (ffmpeg) wrote: I ask this because I think it can only be answered by looking at the source code. I'm not competent to do that. Your thinking is invalid. What part? Is 'mi_mode=dup' or 'mi_mode=blend' or 'mi_mode=mci' the default? ffmpeg -h filter=minterpolate Thank you, Paul. I didn't know I could get help on individual filters. That will save me some time. Too bad the on-line documentation is incomplete. Of course, that's just my opinion and I'm probably wrong, eh? ;-) -- Someone's sneaking in and turning up the range so that my food burns. I'm sure of it. And the older I get, the more sure of it I become. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] (no subject)
adding realtime before the crop filter dropped the bitrate and increased the encoding speed to 80x i moved the realtime t filter after hwdownload, but the speed was still about 1.78 I looked over the filter documentation: https://ffmpeg.org/ffmpeg-filters.html#realtime_002c-arealtime and noticed there's a speed or limit options; adding realtime=speed=1.04 keeps the speed at 1.04 and the problem is resolved. Thanks for the help! On Tue, Jan 26, 2021 at 4:47 PM Dennis Mungai wrote: > On Tue, 26 Jan 2021, 03:14 owen s, wrote: > > > I am running this command > > > > ffmpeg-git -y \ > > -vaapi_device /dev/dri/renderD128 \ > > -framerate 60 -i ./image.jpg \ > > -stream_loop -1 -i ./audio.mp3 \ > > -map 0:v \ > > -c:v h264_vaapi \ > > -vf > > > > > 'crop=2560:1440:0:0,format=nv12|vaapi,hwupload,loop=loop=-1:size=1:start=0,hwdownload,format=yuv420p' > > \ > > -rc_mode 2 -b:v 20M \ > > -c:v libx264 \ > > -map 1:a \ > > -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 \ > > -af "dynaudnorm=f=150:g=15" \ > > -f flv /dev/null > > > > the encoding speed is very fast, typically 1.78x > > > > frame=2512127 fps=107 q=0.0 size=56457493kB time=11:37:47.36 > > bitrate=11046.8kbits/s speed=1.79x > > > > Is there any way to limit this speed to a standard 1x? > > ___ > > > > > Add the realtime filter to your filter chain, right before crop. So you'd > have -vf "realtime,crop..." etc > > > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] minterpolate problem
On Wednesday, 27 January 2021, 10:31:35 GMT, Paul B Mahol wrote: > ffmpeg -h filter=minterpolate Y'know, I've been using ffmpeg for a really long time, and I had no idea you could do that. P ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] minterpolate problem
On Wed, Jan 27, 2021 at 6:03 AM Mark Filipak (ffmpeg) wrote: > I ask this because I think it can only be answered by looking at the > source code. I'm not competent > to do that. > Your thinking is invalid. > > Is 'mi_mode=dup' or 'mi_mode=blend' or 'mi_mode=mci' the default? > ffmpeg -h filter=minterpolate > > > On 01/26/2021 09:49 PM, pdr0 wrote: > > Jim DeLaHunt-2 wrote > >> Perhaps the character between 'mci' and 'mc_mode' should be ':' instead > >> of '='? > > > > That works for me > > > > -vf > > > minterpolate=fps=6/1001:mi_mode=mci:mc_mode=obmc:scd=fdiff:scd_threshold=10 > > > > Each one is a separate option and argument > > > > > https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_minterpolate.c > > Thank you. It works for me, too. I don't know why it didn't work the 1st > time (except maybe because > I have so many balls in the air). > > So, unlike what is shown in the documentation, 'mc_mode' is _not_ an > argument of 'mci'. > > Apparently, 1, 'mi_mode=mci' is a valid argument and, 2, that 'mc_mode' > (and perhaps 'me_mode' & > 'me') are valid solely if mi_mode=mci but are otherwise not arguments of > 'mi_mode=mci' but are > direct options of 'minterpolate'. That kind of scope is probably what the > author intended when > he/she indented them below 'mci', but the indenting is very misleading. > > I will try all combinations of minterpolate to resolve all the options and > issues and return with a > new beautified version of the minterpolate documentation. Perhaps that > will save people in the > future because minterpolate is an important and amazing function. > > -- > Someone's sneaking in and turning up the range so that my food burns. > I'm sure of it. > And the older I get, the more sure of it I become. > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] What is the usage for -cgop/+cgop and -g options.
On Wed, Jan 27, 2021 at 10:52 AM pdr0 wrote: > > Hongyi Zhao wrote > > I noticed there are -cgop/+cgop and -g options used by ffmpeg. But I > > really can't figure out the usage of them. Any hints will be highly > > appreciated. > > -g is the maximum gop length (the maximum keyframe interval) . Some > codecs/settings have adaptive GOP and I frame placement, but it will never > exceed that value I've tried to search through the whole source code repo and still can't find any definitive explanation about this parameter. > cgop is for specifying closed GOP Same for this one. Best -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] minterpolate problem
On 2021-01-26 20:05, Mark Filipak (ffmpeg) wrote: On 01/26/2021 09:49 PM, pdr0 wrote: Jim DeLaHunt-2 wrote Perhaps the character between 'mci' and 'mc_mode' should be ':' instead of '='? That works for me -vf minterpolate=fps=6/1001:mi_mode=mci:mc_mode=obmc:scd=fdiff:scd_threshold=10 Each one is a separate option and argument https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_minterpolate.c Thank you. It works for me, too. I don't know why it didn't work the 1st time (except maybe because I have so many balls in the air). So, unlike what is shown in the documentation, 'mc_mode' is _not_ an argument of 'mci'. Apparently, 1, 'mi_mode=mci' is a valid argument and, 2, that 'mc_mode' (and perhaps 'me_mode' & 'me') are valid solely if mi_mode=mci but are otherwise not arguments of 'mi_mode=mci' but are direct options of 'minterpolate'. That kind of scope is probably what the author intended when he/she indented them below 'mci', but the indenting is very misleading. Having looked at the code, that is correct. Yes, the indenting is misleading. Yes, 'mc_mode' and 'me_mode' and 'me' are top-level options for the minterpolate filter, but the filter only consults their values if 'mi_mode'='mci'. This is the part of the minterpolate video filter which defines the options: https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_minterpolate.c#L205-L235 [The following looks better in a fixed-pitch font.] static const AVOption minterpolate_options[] = { { "fps", "output's frame rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "60"}, 0, INT_MAX, FLAGS }, { "mi_mode", "motion interpolation mode", OFFSET(mi_mode), AV_OPT_TYPE_INT, {.i64 = MI_MODE_MCI}, MI_MODE_DUP, MI_MODE_MCI, FLAGS, "mi_mode" }, CONST("dup", "duplicate frames", MI_MODE_DUP, "mi_mode"), CONST("blend", "blend frames", MI_MODE_BLEND, "mi_mode"), CONST("mci", "motion compensated interpolation", MI_MODE_MCI, "mi_mode"), { "mc_mode", "motion compensation mode", OFFSET(mc_mode), AV_OPT_TYPE_INT, {.i64 = MC_MODE_OBMC}, MC_MODE_OBMC, MC_MODE_AOBMC, FLAGS, "mc_mode" }, CONST("obmc", "overlapped block motion compensation", MC_MODE_OBMC, "mc_mode"), CONST("aobmc", "adaptive overlapped block motion compensation", MC_MODE_AOBMC, "mc_mode"), { "me_mode", "motion estimation mode", OFFSET(me_mode), AV_OPT_TYPE_INT, {.i64 = ME_MODE_BILAT}, ME_MODE_BIDIR, ME_MODE_BILAT, FLAGS, "me_mode" }, CONST("bidir", "bidirectional motion estimation", ME_MODE_BIDIR, "me_mode"), CONST("bilat", "bilateral motion estimation", ME_MODE_BILAT, "me_mode"), { "me", "motion estimation method", OFFSET(me_method), AV_OPT_TYPE_INT, {.i64 = AV_ME_METHOD_EPZS}, AV_ME_METHOD_ESA, AV_ME_METHOD_UMH, FLAGS, "me" }, CONST("esa", "exhaustive search", AV_ME_METHOD_ESA, "me"), CONST("tss", "three step search", AV_ME_METHOD_TSS, "me"), CONST("tdls", "two dimensional logarithmic search", AV_ME_METHOD_TDLS, "me"), CONST("ntss", "new three step search", AV_ME_METHOD_NTSS, "me"), CONST("fss", "four step search", AV_ME_METHOD_FSS, "me"), CONST("ds", "diamond search", AV_ME_METHOD_DS, "me"), CONST("hexbs", "hexagon-based search", AV_ME_METHOD_HEXBS, "me"), CONST("epzs", "enhanced predictive zonal search", AV_ME_METHOD_EPZS, "me"), CONST("umh", "uneven multi-hexagon search", AV_ME_METHOD_UMH, "me"), { "mb_size", "macroblock size", OFFSET(mb_size), AV_OPT_TYPE_INT, {.i64 = 16}, 4, 16, FLAGS }, { "search_param", "search parameter", OFFSET(search_param), AV_OPT_TYPE_INT, {.i64 = 32}, 4, INT_MAX, FLAGS }, { "vsbmc", "variable-size block motion compensation", OFFSET(vsbmc), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS }, { "scd", "scene change detection method", OFFSET(scd_method), AV_OPT_TYPE_INT, {.i64 = SCD_METHOD_FDIFF}, SCD_METHOD_NONE, SCD_METHOD_FDIFF, FLAGS, "scene" }, CONST("none", "disable detection", SCD_METHOD_NONE, "scene"), CONST("fdiff", "frame difference", SCD_METHOD_FDIFF, "scene"), { "scd_threshold", "scene change threshold", OFFSET(scd_threshold), AV_OPT_TYPE_DOUBLE, {.dbl = 10.}, 0, 100.0, FLAGS }, { NULL } }; What that means: There is an option, "fps", which means "output's frame rate". It can (I believe) take any frame rate value describe in 7.5 "Frame Rate" (http://ffmpeg.org/ffmpeg-all.html#Video-rate), including integers, rational numbers, and 8 special names (because "AV_OPT_TYPE_VIDEO_RATE"). The default value is 60 (because '{.str = "60"}'). There is an option, "mi_mode", which means "motion interpolation mode". It can take any of the following values: "dup", meaning "duplicate frames"; "blend", meaning "blend frames"; or "mci", meaning "motion