[FFmpeg-user] Alpha Channel QT with SubTitles

Chris Davis chrisdavis03 at gmail.com
Mon Nov 5 19:07:33 EET 2018


Gandharv,

I have come up with the following example that behaves as you are expecting
it to.

ffmpeg -r 23.976 -loop 1 -i {path_to_alphaOnly_PNG} -t 30  -vf
subtitles="{path_to_srt}:*alpha=1*:force_style='Fontsize=18,BorderStyle=1,Outline=0,Shadow=1,MarginV=25,PrimaryColour=&hffffff,FontName=Circular
Spotify Head'" -c:v prores_ks -profile:v 4 -pix_fmt yuva444p10 -y test.mov

The chief difference is the codec profile and the pix_format and the
"alpha=1" parameter in the subtitle filter.

Enjoy!
Chris Davis

On Tue, Feb 6, 2018 at 5:01 AM Gandharv Bhagat <fradac at hotmail.com> wrote:

> hey Carl,
>
>
> I generated the test file and no subs are rendered from the subs2.mov
> file. I see the test pattern/colorbars/clock.  Instead of using a
> transparent PNG, could I instead generate an alpha channel 1920x1080 canvas
> directly from ffmpeg? I wonder if my PNG file is causing the issue?
>
>
> Gandharv
>
>
> p.s. When I say I see nothing, I mean its a black image with no text.
>
> ________________________________
> From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> on behalf of Carl
> Eugen Hoyos <ceffmpeg at gmail.com>
> Sent: Monday, February 5, 2018 7:26:37 AM
> To: FFmpeg user questions
> Subject: Re: [FFmpeg-user] Alpha Channel QT with SubTitles
>
> 2018-01-17 17:34 GMT+01:00 Gandharv Bhagat <fradac at hotmail.com>:
>
> > Thanks for the frame rate multiplier correction, will make the change.
> >
> > As for the file, I am checking in FCP 7. When alpha type is set to
> > ‘none/ignore’ I see a white background and white text and the drop
> > shadow. When the alpha type is set to ‘straight’, ‘black’, or ‘white’
> > I don’t see anything.
>
> I wonder how it is possible not to "see anything" on a video screen...
>
> The most relevant question from our point-of-view is if the following
> command (or a variant) indicates transparency in your video:
> $ ffmpeg -f lavfi -i testsrc=s=hd1080 -i Subs2.mov -filter_complex
> overlay -qscale 2 -vcodec mpeg4 out.mov
>
> The issue hitting you may be that a flag has to be set in the mov
> file or the video bitstream to indicate the type of the transparency.
>
> Please do not top-post here, Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
>
> https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-user&data=02%7C01%7C%7C4b8be448d4d84c27456108d56c949044%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636534307684783710&sdata=7XNGuBzb1jLhbuDHlEWcU3I5OpOs69Ginn55nCyJ5cc%3D&reserved=0
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://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