topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 19, 2019, 05:21 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: I work with classics movie files  (Read 2019 times)

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 68
    • View Profile
    • Donate to Member
I work with classics movie files
« on: May 11, 2019, 09:17 AM »
Background:
I am a member of a forum where we have access to many old movies. Many will never be released by the companies that hold the rights to them. Most are recorded on VHS tapes from the 80's and probably will never see the light of day again if we loose them.

Now for the request:
I would like to be able to get some conformity to the naming of the files. So would need something that I could open, go to the file in question, click on it, and then be able to manipulate the name.

Here is a general name by scene standards that I wish to imitate.

Modern.Times.1936.REMASTERED.720p.BluRay.x264-SADPANDA

1) Box to write name
2) Box to write year
3) Box to write misc
4) Drop down to give encoding size
5) Drop down box to give rip type
6) Drop down box to give encoding codec

Would it be simpler to have an INI file? E.G. Ten generic listings and how you set up the INI file it could either be a box to write in or a drop down selection? If something is not selected or written to then it does not add to the name. Standard naming has a period instead of spaces through the entire name.

1) Left blank so I would be able to write in it
2) Left blank so I would be able to write in it
3) -- so programs knows to look at the INI file and get drop down options

INI file might look something like this? Or just each new line below a number is an option.
1:
2:
3: --
3a: SD
3b: 480P
3c: 576P
3d: 720P
3e: 1080P
4: --
5: --
6: --
7: --
8: --
9: --
10:

Once done possibly make a NFO file with the name so information about it can be given? Possible check box to create one and another to open after creating.
Maybe an option to create a folder with the new name and move file and create NFO into it.

Being very descriptive so you get a real idea what I am asking up front. To me this seems a big ask but I am not sure how easy/hard it would be to program something along these lines.

After thought, this is not really needed in the program but would be a nice overall add. The ability to add names to given spots. E.G. a faded name that vanishes once you type in that box or use a drop down menu.

1: {Movie Name}
2: {Movie Year}
3: -- {Resolution}
3a: SD
3b: 480P
3c: 576P
3d: 720P
3e: 1080P
4: -- {Riptype}
4a: VHSRip
4b: UnkownRip
5: -- {Encoding Codec}
5a: DivX3
5b: DivX4
5c: DivX5
5d: Xvid
6: --
7: --
8: --
9: --
10:

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,577
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #1 on: May 11, 2019, 10:28 PM »
Code: PowerShell [Select]
  1. @echo off & setlocal
  2. cd X:\video\path
  3. for /f "delims=" %%i in ('dir /b /a-d *.mp4') do (
  4.     set "fnameo=%%~ni"
  5.     set "fnamee=%%~xi"
  6.     set "Height="
  7.     for /f "delims=" %%j in ('mediainfo "--Inform=Video;%%Height%%" "%%~i"') do set "Height=%%j"
  8.     setlocal enabledelayedexpansion
  9.     call set "selftest=%%fnameo:[x264 !Height!p]=%%"
  10.     if "!selftest!" equ "!fnameo!" if not exist "!fnameo! [x264 !Height!p]!fnamee!" (
  11.         echo rename "!fnameo!!fnamee!" "!fnameo! [x264 !Height!p]!fnamee!"
  12.     )
  13.     endlocal
  14. )

This is the script taken from StackOverflow. It requires you also to download a tool: mediainfo (command-line version, direct link to the download).

After downloading and extracting the archive, you should either copy it into a folder that is part of your system's PATH variable or add the folder you extracted mediainfo into to your system's PATH variable, similar to the following example:
 SET PATH=%PATH%;X:\name\of\your\extract\folder

The script is supposed to take any file from the folder you configure:
cd X:\video\path
and add the resolution of the video/movie file to it's name. That is the only thing the script does in it's current state.

As it is, it only checks for movie files with the extension .mp4 and it won't rename files just yet. It will show you the example of the renaming it is intending to do. So you can still adjust the renaming schema to your liking, without messing up the names the video/movie files currently have.

When you have set the name schema you like, remove the text 'echo'  from the line:
echo rename "!fnameo!!fnamee!" "!fnameo! [x264 !Height!p]!fnamee!"
and rerun the script.

Doing the renaming by script will make it a job that is done quickly and consistent, without too much user intervention (once it is setup to your liking) now or in the future. From your description I gathered that you need to do this for a lot of files, so scripting is in such cases preferable.

MediaInfo (main website) looks to be a pretty extensive tool for retrieving lots of the data you want to incorporate into the file names. Please investigate further for incorporating more of those features into the script and the files in your forum should soon be properly renamed.

Hope it helps.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 68
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #2 on: May 11, 2019, 10:52 PM »
Thanks but that is not what I am looking for. I appreciate you taking the time to post this but overall this does not come close to my needs as it only tried to identify the resolution of a given file. I am looking to deal with the entire name of a file.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #3 on: May 12, 2019, 03:22 PM »
I'll start work on this tomorrow.   :Thmbsup:

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #4 on: May 14, 2019, 10:49 AM »
Here's a teaser screenshot of the GUI to this point.  Working on the actual functionality now.

2019-05-14_104703.pngI work with classics movie files

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #5 on: May 14, 2019, 05:06 PM »
Most of the functionality is in place.  I'm assuming the following screenshot is pretty close to what you had in mind?

2019-05-14_170333.pngI work with classics movie files

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 68
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #6 on: May 14, 2019, 07:06 PM »
Yes. Are there options to be able to add or remove things in the drop down menues?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #7 on: May 14, 2019, 08:27 PM »
Yes. Are there options to be able to add or remove things in the drop down menues?

Yes, the buttons next to the dropdown are edit buttons.  The "..." are just placeholders; they will be replaced with the typical edit image (pencil).

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 68
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #8 on: May 24, 2019, 10:44 AM »
Any update?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #9 on: May 24, 2019, 12:03 PM »
Apologies, got a bit side-tracked with work.  I have the basics mostly finished and should have something to share this weekend.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #10 on: May 24, 2019, 12:05 PM »
Here's a current screenshot:

2019-05-24_120506.pngI work with classics movie files

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 68
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #11 on: May 24, 2019, 06:05 PM »
Apologies, got a bit side-tracked with work.  I have the basics mostly finished and should have something to share this weekend.

Perfectly understandable. Was just curious since you said you almost had it all done. I use myself as an example in that I get things ready and I am 95% there but then get distracted and truly forget about that project. Six months later a person ask me about it and takes me two minutes to finish.

So I understand.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #12 on: May 24, 2019, 08:29 PM »
Give this a testing, please.

http://www.dcmembers...knamer/Nicknamer.zip

I have coded in quite a bit of error checking but, until we get any kinks worked out, please work on copies of your files.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 68
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #13 on: May 24, 2019, 09:50 PM »
Nicknamer_RTRUmYXcfo.pngI work with classics movie files

Can't see any of the problem characters. Also would it be possible to default the naming to capitalizing? Just the actual name not the other listings.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,162
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #14 on: May 25, 2019, 09:36 AM »
Can't see any of the problem characters. Also would it be possible to default the naming to capitalizing? Just the actual name not the other listings.

Doh, that was an error on my part.  Please redownload.  It should be v1.0.0 build 15 now.

Also would it be possible to default the naming to capitalizing? Just the actual name not the other listings.

Do you mean you want to be able to type something like "a nightmare on elm street" and have it use "A Nightmare On Elm Street" in the actual rename?  If so, yes, it's possible, but I think it's completely counter-intuitive to what would be expected by the majority of users.  I think the majority of users would want the name to appear exactly how they typed it in the field.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 68
    • View Profile
    • Donate to Member
Re: I work with classics movie files
« Reply #15 on: May 25, 2019, 02:20 PM »
So far it is running well. Tested a random file at work and will try more once I am home.

You have a point on the naming. Possible a check box next to name to do this. And this would be only for the actual name in the first box. With maybe a dropdown box on words not to capitalize.

E.G. a, an, the, or..... Unless it is the first word.

As an added idea if it is easy enough to implement.