Multimedia File Conversion

Post Reply
User avatar
Quincunxian
Posts: 63
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Multimedia File Conversion

Post by Quincunxian » Wednesday 04th September 2019 5:08am

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 4 times
Cheers - Quin.
I code therefore I am

User avatar
cogier
Site Admin
Posts: 302
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Multimedia File Conversion

Post by cogier » Wednesday 04th September 2019 3:29pm

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 2 times

User avatar
Quincunxian
Posts: 63
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Multimedia File Conversion

Post by Quincunxian » Wednesday 04th September 2019 10:18pm

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: 63
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Multimedia File Conversion

Post by Quincunxian » Friday 06th September 2019 3:01am

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 3 times
Cheers - Quin.
I code therefore I am

User avatar
cogier
Site Admin
Posts: 302
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Multimedia File Conversion

Post by cogier » Friday 06th September 2019 1:26pm

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: 63
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Multimedia File Conversion

Post by Quincunxian » Friday 06th September 2019 11:31pm

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

Post Reply