I search to read/write the most faster possible a short TXT tag in a video file.
I have found and try some console exe for do that, FFMPEG, EXIFTOOL, but apparently the soft is forced to recomplile or copy each the video for adding the tag inside (Title, Subtitle, Comment, Date, etc ...) and it's really long
So i have the idea to do like the virus, put text at the end of the file, that works perfectly and more faster i think it's not possible, so i hope
It's just for read, not modify or save the video, because i know the video software like VLC, virtualDub etc ..., surely erase this text when it save the new video
I need your advice about this method :
Is it dangerous or safe ?
I have try several time to read with VLC, the video works perfectly and my TAG is not cleared
Have you a better and more safe method ?
Code: Select all
Film1$ = "D:\Video\TheMovie.avi"
Canal = ReadFile(#PB_Any, Film1$)
If Canal
TailleFichier = Lof(Canal)
*Buffer = AllocateMemory(TailleFichier)
Debug ReadData(Canal, *Buffer, TailleFichier)
CloseFile(Canal)
EndIf
RefDateHeure.s = FormatDate("%yy%mm%dd", Date()) + FormatDate("%hh%ii%ss", Date())
Film2$ = "D:\Video\TheMovie_" + RefDateHeure + ".avi"
Canal = CreateFile(#PB_Any, Film2$)
If Canal
Debug WriteData(Canal, *Buffer, TailleFichier)
Commentaire$ = "Hello i'm the tag at the end of the video"
Debug WriteString(Canal, Commentaire$, #PB_Ascii)
CloseFile(Canal)
EndIf