I have a raspberry pi 3 running a custom nodejs managing system. It can talk to beamers, to the gpio and it can play movies.
That way I can use the raspberry pi to say on the press of a button: turn on a beamer using pjlink, play a movie and when its finished turn the beamer off.
Now this works wonderfully when I use a beamer or a tv-screen, something with a standard aspect ratio. I use omxplayer to actually play the video files. To control omxplayer I've used a nodejs library called omxdirector.
Now the problem: I've felt the need to play some video files with this system and displaying them on the official 7" touchscreen display.
(Im going to build them inside a scale model of an old factory and use the screen to play old video footage of people working there)
I've noticed the screen has a somewhat odd resolution of 800 x 480. So i made some video files having exactly that resolution ( incorporating black bars inside the video to prevent distorting)
When I tried to play the video's I ran into a problem. while the raspberri pi verbose screen uses the entire display. Same goes for when I use startx( i see a little distortion wich I blame the slightly non square pixels for). But when I play a video using omxplayer the video is very distorted and squashed in the Y axis. It seems omxplayer thinks the screen has an odd resolution. When I use omxplayer directly via the commmand line the problem persists. It looks like omxplayer thinks the video or the screen is somewhere in the order of 800x400 or 800x350.
Things I've tried:
- Setting some settings in the /boot/config.txt
Code: Select all
- I've started the video file using omxplayer directly, with the same result
- I've used omxplayer --display 4 /location/of/file.mp4
- I've used omxplayer -I file.mp4
Code: Select all
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Fatplayer/media/5-ScreenSaver.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 2018-07-16 13:27:55 encoder : Lavf57.71.100 Duration: 00:02:00.02, start: 0.000000, bitrate: 35 kb/s Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 800x480 [SAR 1:1 DAR 5:3], 26 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: creation_time : 2018-07-16 13:27:55 handler_name : VideoHandler timecode : 00:00:00:00 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default) Metadata: creation_time : 2018-07-16 13:27:55 handler_name : SoundHandler Stream #0:2(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2018-07-16 13:27:55 handler_name : TimeCodeHandler timecode : 00:00:00:00 Video codec omx-h264 width 800 height 480 profile 77 fps 25.000000 Audio codec aac channels 2 samplerate 48000 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0 V:PortSettingsChanged: [email protected] interlace:0 deinterlace:0 anaglyph:0 par:1.25 display:0 layer:0 alpha:255 aspectMode:0
- I've used a .mov video file (maybe the codec messses things up ... it didnt)
- The only thing that seems to work is using the --win "0 0 799 479" argument. However this is not an argument I can use (afaik) within the omxdirectory library
Do you guys have any idea where I might start looking for a solution to my problem? Like can I force omxplayer to stretch all video to 800x480? Or does omxplayer have a certain settings file where he fetches the screensize wich I need to adjust?
Thanks a bunch in advance!