How to code youtube2mp3 3.01 release
๐ ๊ตฌ๊ตฌ์ ์
Hows it going?
3.00 -> 3.01
ํจ์น ๋ด์ฉ ์ ๋ฐ์ดํธ ํด๋๋ฆฌ๊ฒ ์ต๋๋ค.
pafy๊ฐ ์ต๊ทผ์๋ ์ ๋ฐ์ดํธ๊ฐ ์๋๊ณ ์์ด์ ํด๊ฒฐ๋์ง ์์ ๋ฒ๊ทธ๊ฐ ๋ง์ ๊ฒ์ ํ์ธ ํ ์ ์์์ต๋๋ค
๊ทธ๋์ pafy๋ฅผ ์ง์ฐ๊ณ ๋ชจ๋ ๊ธฐ๋ฅ์ pytube๋ก ์ฎ๊ฒผ์ต๋๋ค.
ํ์ฌ๋ก์ฌ ์ด๋ฒ ํจ์น๋ฅผ ๋ง๋ฌด๋ฆฌ๋ก youtube2mp3 ํ๋ก์ ํธ๋ ๋ง๋ฌด๋ฆฌ๋ฅผ ํ ๋ ค๊ณ ํฉ๋๋ค.
์ด ํ๋ก์ ํธ๋ฅผ ์งํํ๋ฉด์ ์์ ์ ๋ฐฐ์ ์๋ ํ์ด์ฌ ์ธ์ด๋ฅผ ๋ค์ ์์ ์ตํ ์ ์์๊ณ ์ ๊ฐ ํ์ํ ์ดํ๋ฆฌ์ผ์ด์ ์ ์ง์ ๊ฐ๋ฐํด์ ์ฌ์ฉ์ ํ ์ ์๋ค๋๊ฒ์ ๋ํด์ ํ๋ก๊ทธ๋๋จธ๋ ์ง์ ์ ์๋ถ์ฌ์ ๋ง์ด ์๊ฒผ์ต๋๋ค.
ํน์ ์ฌ์ฉํ์๋ค ๋ฒ๊ทธ๊ฐ ์์ผ๋ฉด issue report๋ฅผ ํด์ฃผ์๋ฉด ๋ต๋ฒ ํด๋๋ฆฌ๊ฒ ์ต๋๋ค.
Check out my repository here!
git repo
: https://github.com/jinlee487/youtube2mp3๐ Release Notes
2.00
- created a GUI
- downdable youtube audio streams
- only compatable with Windows
3.00
- switched from pafy to pytube due to a bug with pafyโs remux_audio in download parameter options.
- fixed the encoding problem so that iTunes can read the downloaded M4A file correctly.
- fixed file name with regrex
- mp4 and mp3 downloadable
-
automatically chooses highest quality files
Possible future releases โฆ
- better GUI
- IOS compatable
- working progress bar
3.01
- removed pafy due to out of date bugs
- added moviepy to convert mp4 into mp3
- added temp file name function
try:
# Insert Local Video File Path
clip = mp.AudioFileClip(out_file)
# Insert Local Audio File Path
clip.write_audiofile(out_file[:-4] + ".mp3")
clip.close()
new_file = os.path.join(destination.strip(),self.fulltitle.strip())
os.rename(out_file[:-4] + ".mp3", new_file[:-4] + ".mp3")
self.downloadText.insert(1.0,"Succefully saved file at location \n" + destination + "\n")
os.remove(out_file)
except Exception as e:
messagebox.showwarning("Warning", str(e) + "\nFailed to convert mp4 file to mp3")
return
Leave a comment