[FFmpeg-user] Alternative to Dynamic Text

Francois Visagie francois.visagie at gmail.com
Wed Nov 3 18:50:19 EET 2021


> From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of
> Adam Nielsen via ffmpeg-user
> Sent: 03 November 2021 15:10
> To: LianCheng Tan
> Cc: Adam Nielsen; FFmpeg user questions
> Subject: Re: [FFmpeg-user] Alternative to Dynamic Text
> 
> > I have tried to do what you have suggested. Somehow, it still cause
> > ffmpeg to crash at the exact moment the file is being renamed.
> >
> > By the way, I am running in Windows environment. Not sure, if in Linux
> > will this issue occurs.
> 
> It works fine for me but I'm on Linux.
> 
> If renaming doesn't work, have you tried copying the new file over the top
of
> the old one?
> 
> I'm not familiar enough with Windows to know how to atomically overwrite a
> file.  But I searched Google and found this:
> 
>   https://stackoverflow.com/questions/167414/is-an-atomic-file-rename-
> with-overwrite-possible-on-windows
> 
> It suggests there is a Windows API function called MoveFileTransacted()
that
> you could use.
> 
> I'm surprised just opening the file in read-write mode, seeking to the
start,
> then writing your content doesn't work though.  You might get a frame here
> or there with incomplete data but it won't cause ffmpeg to exit with an
error.

Possibly the original poster is opening the file with read-write mode also
from within ffmpeg.

That would be unnecessary, and could also explain "... ffmpeg unable to read
the textfile when the other process is updating it."

> 
> Cheers,
> Adam.
> _______________________________________________
> 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