imgbrd-grabber icon indicating copy to clipboard operation
imgbrd-grabber copied to clipboard

Remux WebM to MP4

Open ProtagNeptune opened this issue 1 year ago • 3 comments

Maybe add the option "Remux WebM to MP4" in the Filename below "Replace JPEG by JPG"? image https://stackoverflow.com/questions/18123376/webm-to-mp4-conversion-using-ffmpeg/60443156#60443156

This will also solve ExifTool being incompatible with WebM for adding metadata to the downloaded videos in Grabber.

ProtagNeptune avatar Jan 27 '24 05:01 ProtagNeptune

Just pushed a commit to implement this. The setting is in "Save > Format conversion" and requires ffmpeg to be present somewhere in the PATH where Grabber can find it.

image

Note that it has one drawback however: the files will be properly detected if you use a MD5 list, as the remuxed path will be stored in the MD5 database, but they won't be found without it. Because if you use %ext% to check if the image exists on the disk, it will search for "webm" files, but those won't exist. Working around this would be a quite extensive change, so for now I believe it should be fine.

Bionus avatar Jan 29 '24 23:01 Bionus

Just pushed a commit to implement this. The setting is in "Save > Format conversion" and requires ffmpeg to be present somewhere in the PATH where Grabber can find it.

I'm wondering if this happens before applying metadata. So that ExifTool can apply the metadata to the remuxed mp4?

ProtagNeptune avatar Jan 30 '24 09:01 ProtagNeptune

Note that it has one drawback however: the files will be properly detected if you use a MD5 list, as the remuxed path will be stored in the MD5 database, but they won't be found without it. Because if you use %ext% to check if the image exists on the disk, it will search for "webm" files, but those won't exist. Working around this would be a quite extensive change, so for now I believe it should be fine.

Maybe add a flag or something in the MD5 database that this file has "convert" to "mp4"? So that when searching for it, it finds the "webm" file with the "convert" flag set to "mp4" so it checks if there's an mp4 of that file. You might also add the "origin" flag with "webm" for example in case you need it.

ProtagNeptune avatar Jan 30 '24 13:01 ProtagNeptune