Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some good or messy changes.. #29

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Conversation

Taris9047
Copy link

Not sure this messy code would help.. but I've been modifying the source to fit my usage.

Also, added some Qt5 based GUI for tracks.txt edit.

Taris9047 and others added 30 commits June 27, 2020 07:03
1. Added output format selector. Now works with m4a
2. Added file timestamp skipping.
3. Added tagging for m4a, mp4 files.
FFMpeg's internal AAC codec is pretty much usable in these days. So,
I've decieded to use it instead of pesky fdk-aac. The sound quality is
actually better as well.

Now to implement some kind of GUI...
…ake a stand-alone executable which can work itself ... only if tracks.txt (or track information file) is supplied!!
Nothing serious..
1. The GUI is Tkinter based: Ugly but usable.
2. Simply, you can paste those timestamp text into the Tkinter window and close it!
   --> You can even adjust some timing or title text if you want.
3. Fixed a bug on encoding stuff.
If -yt supplied and tracks file was not supplied, it tries to generate a track information by running the Tkinter GUI. The filename will be <YouTube Video ID>_tracks.txt. If it exists, (for some reason, if you try to run the split on the same video again) it will just read in the existing tracks file.
Now it uses PyQt5.. instead of the old Tkinter... The change was due to the error message from OS X platform... Tkinter was deprecated long time ago but it was still valid in Windows platform but not on others... So, why not!
1. GUI not closing when selected Exit from the main menu.
2. Extended track parser capability with triple digit track number.
3. GUI font selection issue on OS X.
4. tracks file now filters out a line starts with # as a comment line.
Pydub wasn't capable of handling a file has more than 4GB of size for some reason. So, I've implemented subprocess routine to use external FFMpeg in this case. In fact, FFMpeg is being used by pydub if given codec is not LAME or OGG. So, there's nothing too much to worry about it implementing something dependent on ffmpeg.

Maybe I need to include FFMpeg into the package... But the script is supposed to be platform independent. So, just ask people to install FFMpeg instead!
slight bug fixes!
At first, setting the quality to 0 seemed to be incorrect. But later found out that unless you have a premium account, 128k is the maximum audio quality that YouTube provides. Thus, setting up output file quality to higher than 128k seems to be waste of storage space. As information theory says, once data are lost, it cannot be recovered in any way, increasing entropy.

I believe youtube-dl doesn't actually support premium account. Thus, setting up YouTube source file bitrate to 128k seems logical...

Well, you need to get FLAC or some other lossless format if you are really an audiophilie. But for most people, 128k is good enough.
but... just found out that we can use ffmpeg-python

Ha!

gotta change all the ffmpeg implementation with this!!
1. boring stuff first: ffmpeg-python was crappy for our case. So, implemented our own ffmpeg interfacing library!
2. Now supports encoding and tagging of ogg(vorbis), flac, and opus!!
3. Pydub sent back to contingency plan. Now we use system ffmpeg primarily... make sure you have ffmpeg and ffprobe!
4. Fixed GUI issue with 'too long font family.' at least on Windows 10 platform.
ogg profile wasn't able to detect codecs. fixed.
opus constant bitrate was too high. reduced to 128k. It's opus!
1. Tracks_editor now has a search/replace!
2. Tracks_editor now can estimate any errors in music durations.
1. Now it supports line number!!
2. Also the parser supports some pesky utf-8 dashes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants