[FFmpeg-user] Combining xfade and drawtext

Paul B Mahol onemda at gmail.com
Mon Sep 12 20:48:44 EEST 2022


On 9/12/22, Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
> Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> writes:
>
>> I am using xfade and drawtext without problems. But now I want to use
>> both. But combining the two goes wrong.
>>
>> I use:
>> ffmpeg -ss 308 -t 4 -i 00011-00016.MTS -ss 329 -to 374 -i 00011-00016.MTS
>> -pix_fmt yuv420p -vcodec libx264 -crf 26 -acodec libmp3lame -qscale:a 9
>> -preset veryfast -filter_complex
>> 'xfade=transition=hlslice:duration=4:offset=0;acrossfade=d=4,drawtext=
>>                            box        = 1:
>> boxborderw = 6:                         boxcolor   = black at 0.2:
>>      fontcolor  = white at 0.4:                 fontfile   =
>> FreeSerifBold.ttf:         fontsize   = 32:                        text
>>    = © 2022 Cecil Westerhof - Cecil at Decebal.nl:             x          =
>> ((main_w - text_w) / 2):   y          = main_h - (text_h * 2)    '
>> xfadeMusicalTestTemp/accordeonmuziek.ts
>
> I should have thought a little longer. :'-(
>
> Found something that works:
> ffmpeg -ss 308 -t 4 -i 00011-00016.MTS -ss 329 -to 374 -i 00011-00016.MTS
> -pix_fmt yuv420p -vcodec libx264 -crf 26 -acodec libmp3lame -qscale:a 9
> -preset veryfast -filter_complex '
>     [0:v][1:v] xfade=transition=hlslice:
>                      duration=4:
>                      offset=0
>    [v01];
>     [0:a][1:a] acrossfade=d=4
>    [a01];
>     [v01]      drawtext=
>                    box        = 1:
>                    boxborderw = 6:
>                    boxcolor   = black at 0.2:
>                    fontcolor  = white at 0.4:
>                    fontfile   = FreeSerifBold.ttf:
>                    fontsize   = 32:
>                    text       = © 2022 Cecil Westerhof - Cecil at Decebal.nl:
>                    x          = ((main_w - text_w) / 2):
>                    y          = main_h - (text_h * 2)
>    [v02]
>          ' -map '[v02]' -map '[a01]' xfadeMusicalTestTemp/accordeonmuziek.ts
>
>
> It looks and sounds OK to me. But I do get:
> [h264 @ 0x56182acb1a00] reference picture missing during reorder
> [h264 @ 0x56182acb1a00] Missing reference picture, default is 2147483647
> [h264 @ 0x56182aca9140] Found reference and non-reference fields in the same
> frame, which is not implemented. Update your FFmpeg version to the newest
> one from Git. If the problem still occurs, it means that your file has a
> feature which has not been implemented.
> [h264 @ 0x56182aca9140] If you want to help, upload a sample of this file to
> https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing
> list. (ffmpeg-devel at ffmpeg.org)
> [h264 @ 0x56182aca9140] decode_slice_header error
> [h264 @ 0x56182add8340] reference picture missing during reorder
> [h264 @ 0x56182add8340] Missing reference picture, default is 2147483647
> [h264 @ 0x56182acb1a00] reference picture missing during reorder
> [h264 @ 0x56182acb1a00] Missing reference picture, default is 2147483647
> [h264 @ 0x56182aca9140] mmco: unref short failure
> [h264 @ 0x56182ae6a4c0] mmco: unref short failure
> [h264 @ 0x56182b03f880] reference picture missing during reorder
> [h264 @ 0x56182b03f880] Missing reference picture, default is 2147483647
> [h264 @ 0x56182b031280] Found reference and non-reference fields in the same
> frame, which is not implemented. Update your FFmpeg version to the newest
> one from Git. If the problem still occurs, it means that your file has a
> feature which has not been implemented.
> [h264 @ 0x56182b031280] If you want to help, upload a sample of this file to
> https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing
> list. (ffmpeg-devel at ffmpeg.org)
> [h264 @ 0x56182b031280] decode_slice_header error
> [h264 @ 0x56182aca4080] reference picture missing during reorder
> [h264 @ 0x56182aca4080] Missing reference picture, default is 2147483647
> [h264 @ 0x56182b6ba1c0] reference picture missing during reorder
> [h264 @ 0x56182b6ba1c0] Missing reference picture, default is 2147483647
> [h264 @ 0x56182b031280] mmco: unref short failure
> [h264 @ 0x56182b03f880] mmco: unref short failure
>
>
> Is this something to worry about?

If this is from input files there is not much that can be done.

>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list