goal: render videos on eu4's timeline function

Related tags

Video eu4-renderer
Overview

Rendering Videos on the EU4 Time Line

image

This repository contains code to create an eu4-savefile that plays back a video in question. Currently only supports Black-And-White Videos.

==> Try out the Demo!

Currently only supports a folder of frames. If you have a video, you need to convert it to frames first, e.g.using ffmpeg.

Make sure, requirements.txt is satisfied.

The code executed with the command line:

python main.py 
    -i  
    -f1  
    -o  
    -eu4  
    --mod_dir  
    -d  
    -p  
    
    --crop  
    --resize 

    --colouring 
    --ncolours 

Use the following command to get additional info on the arguments and a list of all available arguments:

python main.py -h


frame_dir: Path to your folder of frames

first_frame: name of the first frame (e.g. frame1.jpg). The next frames will be inferred by incrementing the number at the end.

output_file: Name and location of the new eu4-savefile. Has to end with ".eu4" (e.g. "./xd.eu4")

base_save_file: Provide the path to an eu4-savefile, that is the basis for any modification. A new savefile is recommended


Either:

eu4_game_files_dir: provide a path to where eu4 is saved, if you are using the base map, otherwise provide a path to the mod.

Or:

province_map: usually called "provinces.bmp", found under /map. Maps pixel-location to a colour.

definition: usually called "definition.csv", found under /map. Maps Colour to Province.

If province_map and definition are provided, they are prioritized. But you have to provide either both or the PATHTOEU4.


crop_values: LEFT UPPER RIGHT LOWER (e.g. 0 0 60 60); crops the bmp at these bounds in the image. You might need to open the image with sth like GIMP to find good crop values. This way you can specify where on the worldmap the video renders (You can also just crop it yourself and pass the generated new bmp as an argument. Refer to province_map)

resize_shape: W H (e.g. 75 100); New height and width values; Rescales of the province map before computation. This speeds up computation, but comes at the cost of more artifacts.


colouring: choose from (bw, gray, simple, infer)

bw and gray for black/white and grayscale images respectively

simple: creates a few (256 or less) colours from the entire colour space and quantizes colours in the video to these values; Quantization currently needed due to colour number being tied to the number of tags.

infer: infers palette (256 colours or less) from the first frame of the video. Very good if it is a good predictor for the rest of the frames;

usecases include single images, short gifs, animations with flat shading etc.

ncolours: number of colours for quantization, can be any number between 2-256

You might also like...
A simple Telegram bot to extract hard-coded subtitle from videos using FFmpeg & Tesseract.

Video Subtitle Extractor Bot A simple Telegram bot to extract hard-coded subtitle from videos using FFmpeg & Tesseract. Note that the accuracy of reco

DICexport is a GUI (PyQt5) to export digital image correlation videos

DIC Video Exporter DICexport is a GUI (PyQt5) to export digital image correlation videos. It offers the flexibility to choose a selected range of a vi

Add the dislike count back to my YouTube videos via a comment containing that information.

YouTube Dislikes Forrest Knight Python Version 3.0+ Only use if you know what the code actually does. I'm not responsible for your use of this code in

Program to play videos with props in Apex Legends

R5Fresh A video player for the Apex Legends mod R5Reloaded

A telegram bot for compressing/encoding videos in h264 format.

Video-Encoder-Bot a telegram bot for compressing/encoding videos in h264 format. Configuration Add values in environment variables or add them in conf

This will help you study and avoid moving mouse coz u dont need mouse for watching youtube videos

This will help you study and avoid moving mouse coz u dont need mouse for watching youtube videos. Neither u need it for pdfs just use your keyboard

A Telegram bot to convert videos into x265/x264 format via ffmpeg.

Video Encoder Bot A Telegram bot to convert videos into x265/x264 format via ffmpeg. Configuration Add values in environment variables or add them in

A way to run youtube videos in TTY

TTY youtube client its finally here, the one thing literally NO ONE ASKED FOR!! A way to run youtube videos in TTY Dependencies: (pip) yt-search (syst

VIT - VideoInTerminal. A quick piece of code to play videos in your terminal using python
VIT - VideoInTerminal. A quick piece of code to play videos in your terminal using python

VIT VIT - VideoInTerminal. A quick piece of code to play videos in your terminal using python.

Owner
null
It is a simple python package to play videos in the terminal using characters as pixels

It is a simple python package to play videos in the terminal using characters as pixels

Joel Ibaceta 1.4k Jan 7, 2023
A Telegram bot to convert videos into x265/x264 format via ffmpeg.

Video Encoder Bot A Telegram bot to convert videos into x265/x264 format via ffmpeg. Configuration Add values in environment variables or add them in

Adnan Ahmad 82 Jan 3, 2023
Python Script for Streaming YouTube Videos in VLC Media Player.

Short Description Use this Simple Script to stream YouTube Video to VLC

Sijey 6 May 27, 2021
pygamevideo module helps developer to embed videos into their Pygame display

pygamevideo module helps developer to embed videos into their Pygame display. Audio playback doesn't use pygame.mixer.

Kadir Aksoy 10 Dec 28, 2022
Playing videos through S3 buckets (Wasabi, AWS, etc.) through client-side VideoJS player

Playing videos through S3 buckets (Wasabi, AWS, etc.) through client-side VideoJS player without incurring ingress/egree traffic on EC2 Instance.

Syed Umar Arfeen 8 Mar 28, 2022
A python generator that converts youtube videos to ascii art in your console.

Video To ASCII A python generator that converts youtube videos to ascii art in your console. This has not been tested for windows! Example Normal mode

Julian Jones 24 Nov 2, 2022
Youtube as covert-channel - Control systems remotely and execute commands by uploading videos to Youtube

covert-tube A program to control systems remotely by uploading videos to Youtube using Python to create the videos and the listener, emulating some ma

Ricardo Ruiz 101 Nov 1, 2022
Text2Video's purpose is to help people create videos quickly and easily by simply typing out the video’s script and a description of images to include in the video.

Text2Video Text2Video's purpose is to help people create videos quickly and easily by simply typing out the video’s script and a description of images

Josh Chen 19 Nov 22, 2022
Script simples para baixar vídeos/áudios/playlist do YouTube

?? VilelaTube ▶️ Script simples para baixar vídeos/áudios/playlist do YouTube Requisitos • Como usar • Melhorias futuras ⚠️ Atenção! ⚠️ Lembre-se de a

João Victor Vilela dos Santos 2 Nov 3, 2021
A GUI based datamoshing apllication for everyone! Apply this glitch to your videos and gifs. Supports all video formats!

A GUI based datamoshing apllication for everyone! Apply this glitch to your videos and gifs. Supports all video formats!

Akascape 131 Dec 31, 2022