[FFmpeg-user] metadata from concat list not working

Goran Obal obal.goran at gmail.com
Mon Sep 30 23:11:03 EEST 2019


OK, thanks to everyone who answered.

I couldn't figure it out any other way, so I am just sending you my
solution in case anyone is interested.

Step 1 (use for loop to create videos (mkv) from all audio files - in my
case wav, change that to what you need):
for %i in (*wav) do ffmpeg -i %i -filter_complex
"[0:a]showfreqs=cmode=separate:colors=cyan|orange,drawtext=text='%~ni':font=verdana:fontsize=56:fontcolor=white:x=(main_w/2-text_w/2):y=20[outv]"
-map [outv] -map 0:a -c:v h264_nvenc -c:a copy -pix_fmt yuv420p -shortest
%~ni.mkv

Step 2 (use for loop to create a list of all created videos):
for %i in (*mkv) do echo file '%i'>>video.txt

Step 3 (concatenate all videos into one):
ffmpeg -f concat -safe 0 -i video.txt -c copy finale.mkv

If anyone has any more suggestions how to bring this into one step, that
would be awesome, if not, this is how to do it if you need/want it.

Kind regards.
Goran


On Mon, Sep 30, 2019 at 11:44 AM Paul B Mahol <onemda at gmail.com> wrote:

> On 9/30/19, Goran Obal <obal.goran at gmail.com> wrote:
> > Hi everyone,
> >
> > I apologize for spamming... I just saw that it is in fact working for me
> > when I do it with pictures, I was just using such examples that the text
> > was not visible. Sorry.
> > So, yes, it seems I don't understand what is different when I create
> video
> > from a bunch of pictures and when I use filter_complex to create video
> from
> > audio files and try to write text over it... I assume that the "picture
> > way" is then packet and the "audio visualization filter way" is then a
> > stream.
> > So I think my question should be: Can I inject metadata to a stream?
>
> Yes with ametadata and metadata filters, read their documentation.
> Note that drawtext filter command you used use only frame metadata,
> and frame metadata
> can be added/removed/changed by mentioned filters above.
> The concat demuxer can not set/remove/change frame metadata.
> Also frame metadata is per each frame and can obviously disappear and
> appear at any time.
> AFAIK there is no way for filters to know stream metadata, so your
> approach to draw text is wrong.
>
> Stream metadata is static per stream and never changes.
> Frame metadata can be available in each filtered frame.
>
> >
> > Best regards.
> > Goran
> >
> >
> > On Mon, Sep 30, 2019 at 10:47 AM Goran Obal <obal.goran at gmail.com>
> wrote:
> >
> >> Hi Nicolas,
> >>
> >> I am trying to understand what you meant, but unfortunately I don't get
> >> it.
> >> I am still a beginner with video filters of ffmpeg and what I read in
> the
> >> documentation for stream metadata and packet metadata didn't help me to
> >> see
> >> what I was confusing.
> >>
> >> What I would like to understand is why does it work for the weather
> >> station (the link in my first email) and why is the same logic accepted
> >> here:
> >>
> https://superuser.com/questions/1336844/is-it-possible-to-burn-a-filename-watermark-in-the-corner-of-a-concatenated-imag
> >> as
> >> an answer.
> >> When I try to reproduce what the weather station has or what this second
> >> link describes, I don't get the text in the video. The weather station
> >> even
> >> posted its video and there you can clearly see that the metadata
> >> from custom-list.txt is displayed on bottom-left of the video
> >> <https://www.youtube.com/watch?v=nq4ZGtLOw6Q>.
> >>
> >> If it worked for them, why doesn't it work when I try to reproduce it?
> >>
> >> Best regards.
> >> Goran
> >>
> >>
> >> On Sun, Sep 29, 2019 at 7:39 PM Nicolas George <george at nsup.org> wrote:
> >>
> >>> Goran Obal (12019-09-29):
> >>> > Somehow this is not working for me and I don't understand why. My
> video
> >>> > displays text "blah", which tells me that ffmpeg can't find the
> >>> metadata...
> >>>
> >>> I suspect you are confusing stream metadata and packet metadata.
> >>>
> >>> Regards,
> >>>
> >>> --
> >>>   Nicolas George
> >>> _______________________________________________
> >>> 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".
> >>
> >>
> > _______________________________________________
> > 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".
> _______________________________________________
> 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