Hi
I have do an experiment:
cfourcc.exe -i input.avi -u MJPG -d MJPG
where input.avi is an .avi yuy2 file of 18GB
ccfourcc have changed the tag from yuy2 to MJPG in "0" second, without waiting, it don't have rewrite the avi file.
How is possible? if I change hex values into a file I still have to rewrite it, or not?
ps. I have download cfourcc from the Release.7z by this page
https://forum.videohelp.com/threads/341713-GUI-Tool-created-for-batch-video-tasks
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 19 of 19
Thread
-
Last edited by marcorocchini; 5th May 2014 at 07:16.
-
-
Any program can open an existing file, change a few bytes, and only update the portion of the file that it changed. So only four bytes have to be written if you're only changing four bytes. In practice, Windows will read at least one sector (or maybe an entire cluster) change the four bytes, then write back the entire sector (or cluster) -- because that's the smallest I/O unit you can transfer on a hard drive.
It's only necessary to rewrite the entire file if you insert or remove data. Then everything after the insertion/removal point (at least) has to be rewritten. With many kinds of files it's easier to rewrite the the entire file because other structures (indices, lengths, pointers, etc.) within the files have to be updated when you insert or remove data. AVI, files, for example.Last edited by jagabo; 5th May 2014 at 08:56.
-
-
I think you're screwing up the RIFF structure with that cut/paste hack. Use the RIFF viewer in VirtualDub's hex editor to verify.
Last edited by jagabo; 5th May 2014 at 11:04.
-
I can change .avi files with hex editor gui ecc.. but I need to batch automate the timecode writing in file, so I'm looking for a dos command line to simply replace a block of data as image attached
-
You need to understand RIFF structure before you can make patches like that.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318189%28v=vs.85%29.aspx -
I know that my procedure are not regular, but teorically if I want timecode I have to change virtualdub and this is not possible.
I am not able to rewrite a version of virtualdub that do timecode as I want, and think nobody is able to do. Simply I just noticed that replacing bytes as show in attachement, my NLE have the timecode of the clip and and the clip are perfet playable. Analizing riff chink of the .avi file of course I get a "invalid chunk error" but this is not important when I can use clip with timecode in nle and all work ok.
Being that I have no chance to rewrite virtualdub for my specific needs, I'm forced to find a way to change "manually" and automatically with a batch procedure, individual bytes and an entire block in the file .avi header -
If you really want to screw up your files like that search for binary patch utilities.
-
if the position and size of the data is consistantly in the same place for each of the .avi files, and does not require moving data downward, then it may be possible. same way the cfourcc.exe app is doing it with the fourcc tag name--it is only four chars.
-
Except not all AVIs will have that consistently in quite the same place, nor of the same length. To do it right, one needs to parse the RIFF structure and insert/change/remove things accordingly so the structure remains intact and proper. Otherwise, you might get lucky, but you might not.
Scott
(Btw, I allow an exception to this rule - recovery of already-corrupt files) -
-
If it were impossible, we wouldn't need to warn you to avoid such a brute-force approach, would we?
Scott -
I wrote a quick dirty program that can copy a block of data from one file to another, with the positions specified for each.
Code:AviMangler source_file destination_file source_pos length destination_pos
Last edited by jagabo; 6th May 2014 at 19:45.
-
"Whoa, whoa - WHOA! Nice shootin' there, Tex."
Scott -
thanks, in the meantime I have noticed that virtualdub can handle comment tag by the File-->Set text information windows
I need of a "ISMP" tag and the timecode (e.g. 01:34:21:10) and my nle can read timecode. But the problem is that: I can not batch automate the process in virtualdub because it allow only the manual input of a tag trought the "set textual information" window. It don't allow (strange!) e.g.
VirtualDub.video.AddComment(0x00000004,"ISMP","01: 34:21:10");
because it don't allow AddComment in .vcf script
VirtualdubMOD seems allow the addComment in .vcf script but I cannot change any of the default tags in "ISMP" ... -