Multimedia File Conversion

So you have written that new, must have program. Let us see it here.
Post Reply
User avatar
Quincunxian
Posts: 171
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Multimedia File Conversion

Post by Quincunxian »

This is a small project that uses a utility called ffmpeg to convert selected media formats.
  • Google webp to standard png
  • Google webm to standard mp4
  • mp4 to mp3 (Very useful for downloaded music videos to playable mp3s )
Instructions:
Unzip the project to your projects folder and run.
The initial folder is set to User.Home { this can be changed manually in the code}
Select the conversion option required.
Select a folder containing the media format you wish to convert.
The list box will populate with any found files meeting this criteria in the selected folder.
Select the files that you wish to convert.
The list box is 'multi-select' so you can hold the Ctl key down to manually select files.
You can also (bulk) Select all, Invert selection or Select none with the appropriate buttons.
You can select to delete the source file once the conversion has taken place if desired.

Conversions of images files is quite quick. ( I did around 20 in a few seconds )
Caveat: Most of the image files in my test set were fairly small - Avg 450K.
Conversions of video files can take a while depending on the size of original ( up to a few minutes each )

Any bugs - let me know.
Attachments
MultimediaFileConvert.tar.gz
(34.48 KiB) Downloaded 462 times
Cheers - Quin.
I code therefore I am
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Multimedia File Conversion

Post by cogier »

I downloaded the file to have a look. The fact that the form is not expandable got me working.. :geek:
I found a bug at, aprox, line 107. The converted file is added to the ListBox, then a few lines later the ListBox is cleared.
Lst_Converted.Add(NewFile)    ''Adds the file to the ListBox
        Lab_Message.Text = "Converted"
        Lst_SourceFiles[TmpInt].Selected = False
        Lst_Converted.Refresh
        Lab_Message.Refresh
        Wait
      Endif
    Next
    Chk_DeleteSourceFiles.Value = False
    RefreshSourceFiles    ''This routine clears the ListBox
I have included the changes in the attached file. I hope it helps.
MultimediaFileConvertCO.tar.gz
(35.71 KiB) Downloaded 472 times
User avatar
Quincunxian
Posts: 171
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Multimedia File Conversion

Post by Quincunxian »

Thanks Cogier - good catch.
This is what happens when you do final testing and then start making 'cosmetic changes'
I had completely forgotten about resizing - I'll get that fixed and re-post.
Cheers - Quin.
I code therefore I am
User avatar
Quincunxian
Posts: 171
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Multimedia File Conversion

Post by Quincunxian »

Updated Multimedia File conversion - now Version 1.02.
Bug Fixes:
  • Form will now resize with all controls located appropriately
  • List of converted files does not clear when conversions are complete
  • As files are converted, they now show up in the message display in the correct order.
Enhancements:
  • Added option to view files of the requested conversion type in the Converted listbox
General:
Discovered a few things along the way and will post these in 'General' for discussion.

Edit: Attachment modified as there was yet another minor bug (There always is) now fixed.
Attachments
MultimediaFileConvert.tar.gz
(35.79 KiB) Downloaded 466 times
Cheers - Quin.
I code therefore I am
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Multimedia File Conversion

Post by cogier »

Very interesting Quincunxian. I notice that you didn't download my version. I suggest you have a look at it. The form is expandable but it is all done in the IDE there is no 'Form_Resize()' routine required.
User avatar
Quincunxian
Posts: 171
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Multimedia File Conversion

Post by Quincunxian »

Hi Cogier,
I did have a look this morning and as I thought, you used the 'H' controls and I don't use those at all.
I like to see the form as the user will see it and the 'H' controls make that difficult if not impossible.
Not saying that they are a bad thing but it's just not my programming style.

I also have a lot of 'Tool-Box' classes that I have developed over the years which amend control position and other assorted parameters so they ( H controls and my Tool-Boxes) would be incompatible.
Not used in the Multimedia Conversion project however, so may post something in General to show the concept.
Cheers - Quin.
I code therefore I am
User avatar
Serban
Posts: 39
Joined: Saturday 28th March 2020 8:17am
Location: Alexandria
Contact:

Re: Multimedia File Conversion

Post by Serban »

Quincunxian wrote: Wednesday 4th September 2019 5:08am [...]
The initial folder is set to User.Home { this can be changed manually in the code}
Please, look at the code of DirLister. You can use the mechanism I used there, to make this more user friendly.
The "Preferences" tab, has a setting that does exactly what you said: sets up a User's Data Directory.
While that might be done in code, for someone who is interested only in using the app, that is the best approach.
Cheers! :)
The only thing necessary for the triumph of evil is for good men to do nothing.”― Edmund Burke;
It's easy to die for an idea. It is way harder to LIVE for your idea! (Me)
Post Reply