Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
1,967
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. Perl script:
  2.  
  3. >>> Download the script from https://files.fm/u/qgppvrrx and save it to the "strawberry\temp" folder.
  4.  
  5.  
  6. In windows: Install strawberry perl, from http://strawberryperl.com choose the recommended version, 64 bit if your OS is 64 bit, and it probably is, or 32 bit otherwise.
  7.  
  8. Once perl is installed, cut and paste the script into a file (using notepad, or another text editor that saves plain text). File-Save and save somewhere, like c:\users\[your windows username]\Downloads\videocleaner.pl
  9.  
  10. Open a command line window: In the start menu search for either "cmd" or "powershell", without quotes. Run either one, and wait for the command prompt. Powershell is slow the first time it runs.
  11.  
  12. The following example assumes the cleaner script and the media file are both in the same directory, c:\users\[your windows username]\Downloads\ but they can be anywhere as long as you type in full filenames like c:\path\videocleaner.pl and c:\otherpath\video.mp4 instead of videocleaner.pl and video.mp4
  13.  
  14. The script works on both wmv and mp4.
  15.  
  16. cd c:\users\[your windows username]\Downloads\
  17. perl videocleaner.pl video.mp4
  18. perl videocleaner.pl -f video.mp4
  19.  
  20.  
  21. The first line puts you in the directory with the script and video file. If they're in different places, you'll need to use full paths for one or both of them.
  22.  
  23. The first perl line will print out some information about the file, and at the end if your file has trailing data, the script will tell you to run with the -f flag because there's trailing data that needs to be removed.
  24.  
  25. The second perl line will print out the same information, then modify the video file by removing the trailing invalid data and putting it in a separate .tag file.
  26.  
  27. Files need to be full paths or relative paths from the current directory.
  28.  
  29. If they're in different places, use full paths like this.
  30. perl c:\[path to script directory]\videocleaner.pl c:\[path to video directory]\video.mp4
  31. perl c:\[path to script directory]\videocleaner.pl -f c:\[path to video directory]\video.mp4
  32.  
  33.  
  34. You'll end up with these files:
  35.  
  36. video.mp4 which is clean
  37. video.mp4.tag which is the trailing data that was removed from the video file.
  38. video.backup (or whatever you named it, if you copied the original to make a backup). The size of the backup will be the total of the size of the clean video and the size of the tag file.
  39.  
  40. If the filenames are difficult to type because of the brackets, either rename them without the brackets, or there's a trick that works in both cmd and powershell. Instead of starting at the beginning of the filename, find a part that's easy to type. For daniela milked 2, the filenamename includes a-hj366. So you can type this to match it:
  41.  
  42. perl c:\[path to script]\videocleaner.pl c:\[path to video]\*a-hj366*
  43. Then, before pressing enter on that command line, press tab. It will expand the * and autocomplete to the first matching file it finds. If there's more than one match, pressing tab more than once cycles through all the matches.
  44.  
  45.  
  46. Short version, for anyone who understands file locations and paths without needing all that rambling and hints.
  47.  
  48. Copy the script, in spoiler tags in the last post, to a file so you can run it, like videocleaner.pl
  49.  
  50. Get strawberry perl if on windows. On any other OS, perl is probably on your computer already.
  51.  
  52. Look at videocleaner.pl, until you're convinced it's not doing anything bad.
  53.  
  54. Run it on the video file.
  55. videocleaner.pl videofile.mp4
  56.  
  57.  
  58. Look at what it says and use common sense. If it needs to be cleaned, rerun
  59. videocleaner.pl -f videofile.mp4
  60.  
  61.  
  62. You'll end up with videofile.mp4 and videofile.mp4.tag. The second one can be deleted assuming the script didn't accidentally corrupt the file. That would be surprising, but you could join the two files back together and try something else.
  63.  
  64. The script should work on c4s and kinkbomb so far.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement