sselph / scraper

A scraper for EmulationStation written in Go using hashing
MIT License
448 stars 88 forks source link

convert to yuv420p pixel format #257

Open geoffoxholm opened 4 years ago

geoffoxholm commented 4 years ago

Updated the convertVideo function's use of ffmpeg to ensure the pixel format is yuv420p. This is a more common format, and is required by the OMX player. OMX is the hardware accelerated video player that is becoming standard for Retropie.

I encountered a need for this with some MAME rom videos.

This may fix #194

Here's a video to try with https://clone.screenscraper.fr/api/mediaVideoJeu.php?devid=sselph&devpassword=ROMHasher20160916&softname=sselph-scraper&crc=&md5=&sha1=&systemeid=158&jeuid=43783&media=video&mediaformat=mp4

Its stream info (reported by ffmpeg) is: Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 224x768 [SAR 18:7 DAR 3:4], 136 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc (default)

With this PR the new stream info is: Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x1098 [SAR 1647:640 DAR 3:4], 238 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)