I started off this section by logging into Github and downloading the files for VideoCodecRename, which is a program I made to learn programming and get something done. There was no program to do what I wanted, and I had a friend who is a software engineer convince me to just make it myself. That's where this ugly bit of code came from. It evolved from a janky command line tool to something that actually looks like a program people would use. I used tkinter for the interface, as it's a standard tool used with Python. I wanted to keep things simple. I may use it for my PiCarts project as well, since it has a rather old school look to it. I am currently stuck on getting tkinter installed and working. Current error when running my program:
VideoCodecRename-main/VideoCodecRename_1.2.py", line 19, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
Silly me, I ran
sudo apt install python-tk
when I should have run:
sudo apt install python3-tk
Notice the "3" in the second command. That installs the Python 3 version, which is what this program is written with. I got past that error, but now get the following, which I already knew about:
VideoCodecRename-main/VideoCodecRename_1.2.py", line 21, in <module>
from ffprobe3 import FFProbe
ModuleNotFoundError: No module named 'ffprobe3'
My previous notes on this call for the following:
sudo pip3 install ffprobe3
. The program now opens. It appears to be working, but only ever returns the codec tag [ERROR], which is used to cover literally any error in the program. Digging through the output reveals that the ffprobe module is not found, so the video file isn't even being opened. Fixed by installing ffmpeg:
sudo apt install ffmpeg
Now the program is working on two different codec types. It seems to fail on a particular file with the H265 codec. No errors, no output. It simply does not rename the file. It is skipping the file for some reason. I get the following error:
FutureWarning: Possible nested set at position 1
BaseName = re.sub('[[@*&?].*[]@*&?]', '', CurrentName)
Testing on another H265 file:
Same result. In this folder, there are two files; H264 and H265. H265 fails, H264 does not. Opening the H265 file manually:
Both play using VLC. I suspect it may have something to do with support for the H265 codec on the Pi. Unable to get it to load the ffprobe3 module in the Thonny editor, though it uses the same Python executable as the terminal, which does load it. I got ffprrobe3 installed in Thonny using the built in package manager. My program now runs and can be tweaked in Thonny. I can finally get back to development on it.
This is too involved for me to deal with right now. It's about time for me to get sent back out to work, so I need to get dinner and get ready.
I know this is supposed to be a log for getting this Pi set up for basic software development, and it still is. I was able to code and work on it without any real problems caused by the Pi itself. I am used to a full size keyboard on my 17 inch laptop, so typing is taking some getting used to. Otherwise, the experience was perfectly fine.
Going to run another system back up and take a break.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.