Simple Video Player for Raspberry Pi

Simple Video Player on Raspberry Pi
I prepared an archive file for Raspberry Pi with a ready-to-use video player named vplay. vplay is simply GLSL Hacker that has been renamed in vplay. The full source code in Lua is included in the download (in the audio_video/ folder):

Playing a video with vplay is simple. Open a terminal in vplay folder and pass the absolute path to the video file:
$ vplay /video=\"video_file_absolute_path\"
A concrete example:
$ vplay /video=\"/home/pi/mykoolvideo.mp4\"
You can also force the resolution and fullscreen mode like this:
$ vplay /width=1920 /height=1080 /fullscreen /video=\"/home/pi/mykoolvideo.mp4\"
/width, /height and /fullscreen are command line parameters of GLSL Hacker and are not specific to VPlay demo.
By default, the video is played on a quad with an orthographic camera (a 2D camera). But vplay can be easily tweaked to play the video on another kind of support like a 3D box. After all, in a FRAME script, a video is just a simple 2D texture that can be mapped (like any other texture) on any 3D object. I added a command line parameter /usebox (you can add other params by parsing the command line in Lua, look for the gh_utils.get_command_line() function in the source code of the demo, line 167) to play the video using a 3D cube and a perspective camera:
$ vplay /video=\"/home/pi/mykoolvideo.mp4\" /usebox
And the result:

Simple Video Player on Raspberry Pi
The video played on a 3D cube

Simple Video Player on Raspberry Pi
The video played on a quad with a texture tiling factor of 2.0
INIT script:
-- Opening of the video file. av1 = gh_av.decoder_open(av_filename, loop_mode) -- video resolution. video_width, video_height = gh_av.video_get_resolution(av1) -- Creation of a 2D texture with correct resolution (width x height). video_tex = gh_av.video_init_texture(av1, PF_U8_RGB) -- Starting of the audio-video processing thread. gh_av.start_audio_video_processing(av1, update_video, update_audio)
FRAME script:
-- Binding of the video texture and updating from the current video frame. gh_texture.bind(video_tex, 0) gh_av.video_update_texture(av1, video_tex) -- Now the texture can be mapped on any mesh.
TERMINATE script:
-- Stopping of the audio-video processing thread. gh_av.stop_audio_video_processing(av1) -- Closing of the video file. gh_av.decoder_close(av1)
The full source code is in the archive, so do not hesitate to hack it!
-
Shangul Mangul HabeAngur Shangul Mangul HabeAngur (City of Goats) is a game for child (4-8 years). they learn how be useful in the city and respect to people. Persian n...
-
Resume Full name Sayed Ahmadreza Razian Age 38 (Sep 1982) Website ahmadrezarazian.ir Email ahmadrezarazian@gmail.com Education MS...
-
Drowning Detection by Image Processing In this research, I design an algorithm for image processing of a swimmer in a pool. This algorithm diagnostics the swimmer status. Every time graph s...
-
Tianchi-The Purchase and Redemption Forecasts 2015 Special Prize – Tianchi Golden Competition (2015) “The Purchase and Redemption Forecasts” in Big data (Alibaba Group) Among 4868 teams. Introd...
-
معرفی نام و نام خانوادگی سید احمدرضا رضیان پست الکترونیکی ahmadrezarazian@gmail.com درجات علمی کارشناسی : ریاضی کاربردی – دانشگاه اصفهان (معدل 14...
-
Nokte – نکته نرم افزار کاربردی نکته نسخه 1.0.8 (رایگان) نرم افزار نکته جهت یادداشت برداری سریع در میزکار ویندوز با قابلیت ذخیره سازی خودکار با پنل ساده و کم ح...
-
1st National Conference on Computer Games-Challenges and Opportunities 2016 According to the public relations and information center of the presidency vice presidency for science and technology affairs, the University of Isfah...
-
Tianchi-Brick and Mortar Store Recommendation with Budget Constraints Ranked 5th – Tianchi Competition (2016) “Brick and Mortar Store Recommendation with Budget Constraints” (IJCAI Socinf 2016-New York,USA)(Alibaba Group...
-
Optimizing raytracing algorithm using CUDA Abstract Now, there are many codes to generate images using raytracing algorithm, which can run on CPU or GPU in single or multi-thread methods. In t...
-
2nd Symposium on psychological disorders in children and adolescents 2016 2nd Symposium on psychological disorders in children and adolescents 2016 Faculty of Nursing and Midwifery – University of Isfahan – 2 Aug 2016 - Ass...
-
My City This game is a city simulation in 3d view. Gamer must progress the city and create building for people. This game is simular the Simcity.
-
ببین و بپر به زودی.... لینک صفحه : http://bebinbepar.ir
-
SVM Review On this review, i compare 4 papers about 4 famous models by SVM. These models are : Maximum Likelihood Classification (ML) Backpropagatio...
-
Watching Jumping Coming Soon... Visit at : http://bebinbepar.ir/
-
Environmental Education Software In this game , Kids learn that They must respect to Nature and the Environment. This game was created in 3d . 600x420 (0x0) 66.45 KB ...
- AMD Ryzen Downcore Control AMD Ryzen 7 processors comes with a nice feature: the downcore control. This feature allows to enable / disabl...
- Fallout 4 Patch 1.3 Adds NVIDIA HBAO+ and FleX-Powered Weapon Debris Fallout 4 launched last November to record player numbers, swiftly becoming the most popular third-party game...
- Detecting and Labeling Diseases in Chest X-Rays with Deep Learning Researchers from the National Institutes of Health in Bethesda, Maryland are using NVIDIA GPUs and deep learni...
- NVIDIA TITAN Xp vs TITAN X NVIDIA has more or less silently launched a new high end graphics card around 10 days ago. Here are some pictu...
- Automatic Colorization Automatic Colorization of Grayscale Images Researchers from the Toyota Technological Institute at Chicago and University of Chicago developed a fully aut...
- Back to Dinosaur Island Back to Dinosaur Island takes advantage of 15 years of CRYENGINE development to show users the sheer endless p...
- Unity – What’s new in Unity 5.3.3 The Unity 5.3.3 public release brings you a few improvements and a large number of fixes. Read the release not...
- ASUS GeForce GTX 1080 TURBO Review This GTX 1080 TURBO is the simplest GTX 1080 I tested. By simplest, I mean the graphics card comes with a simp...
- Assisting Farmers with Artificial Intelligence With our planet getting warmer and warmer, and carbon dioxide levels steadily creeping up, companies are using...
- کودا – CUDA کودا به انگلیسی (CUDA) که مخفف عبارت انگلیسی Compute Unified Device Architecture است یک سکوی پردازش موازی و مد...
- Virtual Reality in the Military Virtual reality has been adopted by the military – this includes all three services (army, navy and air force)...
- Diablo Meets Dark Souls in Isometric Action-RPG Eitr Among the indie games Sony showcased during its E3 press conference this week, Eitr was what most stood out to...
- Diagnosing Cancer with Deep Learning and GPUs Using GPU-accelerated deep learning, researchers at The Chinese University of Hong Kong pushed the boundaries...
- Head-mounted Displays (HMD) Head-mounted displays or HMDs are probably the most instantly recognizable objects associated with virtual rea...
- Together mode in Microsoft Teams – SkypeTogether mode is a new meeting experience in Teams that …
- How GPUs are Revolutionizing Machine LearningTraining the sophisticated deep neural networks that power applications such …
- Automatic Colorization Automatic Colorization of Grayscale ImagesResearchers from the Toyota Technological Institute at Chicago and University …
- Enabling human-robot rescue teamSystem could help prevent robots from overwhelming human teammates with …
- Xbox One update boosts Party Chat and lets you buy Xbox 360 gamesFor Microsoft and Sony, the start of a new month …
- Artificial Intelligence Helps the Blind ‘See’ Facebook5 April, Facebook introduced a new feature that automatically generates …
- Microsoft confirms there will be no Windows 11Microsoft says that Windows 10 will be its final release …
- Introducing Parker, NVIDIA’s Newest SOC for Autonomous VehiclesNVIDIA today took the cloak off Parker, our newest mobile …
- Impressive Pixel Shader of a Snail (GLSL)The wizard behind Shadertoy has struk once again with this …
- GeForce GTX 980 Notebooks a VR Developer’s DreamVirtual reality takes immense amounts of computing horsepower. Creating VR …
Leave a Reply