Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
gl_credits_readme.txt | 2020-11-09 | 2.4 kB | |
main.c | 2020-11-09 | 3.5 kB | |
makefile | 2020-11-09 | 359 Bytes | |
gl_bbm_polygon.h | 2020-11-09 | 6.7 kB | |
gl_bbmio.h | 2020-11-09 | 9.1 kB | |
Totals: 5 Items | 22.1 kB | 0 |
GL Credits Readme and Animation Info The GL Credits or gl_credits project was based on the credits sequence at the end of almost every movie. Usually text and pictures scrolls from the bottom to the top of the screen. In this case it's polygons drawn with opengl. I haven't figured out how to add text with freeglut yet. The way this video was achieved was by using my code to create a series of image files for enough frames for a 3 minute video. The frames were black and white 1 bit per pixel bmp images because it takes the least space. Then I used ffmpeg to turn the frames into a video and add music. In this example I used the Rocky theme. ffmpeg -i i/rocky.m4a -r 60 -f image2 -i o/%08d.bmp v/video.mp4 --- other examples I've previously used in my projects below that are for reference Commands I can use to accompish all sorts of weird tricks for animations from the command line when combined with other code. This command can turn the frames into a valid animated gif file. magick convert -delay 5 -loop 0 o/*.bmp o/0.gif Either of these commands can turn frames into video files. The exact options can always be changed and I've forgotten what all of them actually do because ffmpeg is powerful but complicated. ffmpeg -r 30 -f image2 -i o/%08d.bmp -vcodec libx264 -preset veryslow -crf 23 -pix_fmt yuv420p o/v.mp4 ffmpeg -r 30 -f image2 -i o/%08d.bmp -vcodec libx265 -preset veryslow -crf 28 -pix_fmt yuv420p o/v.mp4 This command can take the frames out of a video. ffmpeg -i i/mario3.mp4 -f image2 o/%08d.ppm To extract the audio ffmpeg -i i/mario3.mp4 o/audio.wav Put audio back into the video and encode the frames. ffmpeg -i o/audio.wav -r 30 -f image2 -i o/%08d.bmp -vcodec libx264 -crf 25 -pix_fmt yuv420p o/video.mp4 --- https://support.google.com/youtube/answer/6375112 2160p: 3840x2160 1440p: 2560x1440 1080p: 1920x1080 720p: 1280x720 480p: 854x480 360p: 640x360 240p: 426x240 https://ffmpeg.org/general.html#Image-Formats https://trac.ffmpeg.org/wiki/Encode/H.264 https://trac.ffmpeg.org/wiki/Encode/H.265 https://trac.ffmpeg.org/wiki/Encode/AV1 https://trac.ffmpeg.org/wiki/Encode/VP9 Used when recording my screen with ffmpeg on pinebook pro. ffmpeg -video_size 1920x1080 -framerate 60 -probesize 64M -f x11grab -i :0.0 -c:v libx264rgb -crf 0 -preset ultrafast output.mkv