วันเสาร์ที่ 23 มกราคม พ.ศ. 2559

แก้โปรแกรม Miro Video Converter ให้แปลงไฟล์ .ogv ได้ดีขึ้น

วันนี้มีงานที่ต้องเอาไฟล์วิดีโอมาแปลงเพื่อลงหน้าเว็บ ต้องแปลงทั้งหมด 3 ฟอร์แมท คือ .mp4 , .webm และ .ogv ซึ่งเจ้าสองตัวแรกเราใช้ Adobe Media Encoder และ Miro Video Converter แปลงได้ไม่มีปัญหาอะไร แต่เจ้า .ogv ที่ใช้เจ้า Miro Video Converter แปลง กลับมีคุณภาพที่หยาบสุดๆ แบบว่ารับไม่ได้เลยทีเดียว

ก็เลยไปลองหาว่ามีคนอื่นเค้าแก้ไขกันยังไง ก็ไปเจอวิธีที่ต้องเข้าไป compile ไฟล์ของเจ้า Miro กันใหม่เลย ก็เลยลองทำตามดู ตามนี้ จากคุณ Max Duveen ที่ลิงก์นี้ http://support.mirovideoconverter.com/support/discussions/topics/13550/page/2

Here's what I did:
#1. drag and drop your Miro Video Converter app onto your desktop.
#2. Rename the app to 'miro'
#3. Right mouse click the app and click "show package contents"
double click "Contents" then "Resources" then "lib" then "python2.7" then "mvc"
#4. Edit "basicconverters.py" in your favourite editor or in text edit
#5. Replace line '43' with:

parameters = '-f ogg -vcodec libtheora -c:v libtheora -c:a libvorbis -q:v 4'

#6. Open terminal
#7. copy paste this and hit enter:

cd ~/Desktop/miro.app/Contents/Resources/lib/python2.7/mvc

#8. copy paste this and hit enter:

python -m compileall .

Don't forget the period at the end.
*Thanks to Phil for the solution*

เราลองทำตามทีละ step เลยก็แปลงออกมาใช้งานได้โอเคเลย