[ rss / options / help ]
post ]
[ b / iq / g / zoo ] [ e / news / lab ] [ v / nom / pol / eco / emo / 101 / shed ]
[ art / A / beat / boo / com / fat / job / lit / map / mph / poof / £$€¥ / spo / uhu / uni / x / y ] [ * | sfw | o ]
logo
technology

Return ]

Posting mode: Reply
Reply ]
Subject   (reply to 27176)
Message
File  []
close
Capture.jpg
271762717627176
>> No. 27176 Anonymous
26th July 2019
Friday 4:27 pm
27176 spacer
how to remove empty parts of these mpg files?

only the blue parts of the files were available in the torrent, the red parts are all zeroes

i can do it manually in hxden but it's a pain in the arse, is there a program that can do it automatically?
Expand all images.
>> No. 27177 Anonymous
27th July 2019
Saturday 3:59 pm
27177 spacer
Can't you just write a simple program in C/C++/C#/pick your poison that loops over the memory and deallocates every byte of 0x00?
>> No. 27178 Anonymous
27th July 2019
Saturday 4:37 pm
27178 spacer
>>27176
That seems oddly specific. What, precisely, are you trying to achieve and to what end?
>> No. 27179 Anonymous
27th July 2019
Saturday 5:20 pm
27179 spacer
How is this 4chan-esque questioning style not banned?
>> No. 27180 Anonymous
27th July 2019
Saturday 5:32 pm
27180 spacer
>>27177

That would delete legit zero bytes too, though. Instead, the program would have to look at the files generated by the torrent program in order to know what blocks got downloaded, and just delete those bits. You could also just tell the program what the torrent block size is, and then delete all-zero blocks, since it is unlikely that all-zero blocks are legit.
>> No. 27181 Anonymous
28th July 2019
Sunday 11:20 am
27181 spacer
>open in notepad++
>use regex to delete blocks of zeroes

(A good day to you Sir!)
>> No. 27182 Anonymous
29th July 2019
Monday 11:16 am
27182 OP
it's ok now, i downloaded them from another place

they're jana model videos
>> No. 27322 Anonymous
6th December 2019
Friday 2:13 am
27322 spacer
I wrote this in python. It works but it's a slow as fuck.

Adjust the 3 constants at the top accordingly.

import sys src = r'' output = r'' blockSize = 1024 * 1024 with open(src, 'rb') as inFile, open(output, 'wb') as outFile: nZeroes = 0 eof = False while not eof: inByte = inFile.read(1) if not inByte: eof = True elif inByte == b'\x00': nZeroes = (nZeroes + 1) % blockSize else: for _ in range(nZeroes): outFile.write(b'\x00') nZeroes = 0 outFile.write(inByte) for _ in range(nZeroes): outFile.write(b'\x00')

Return ]
whiteline

Delete Post []
Password