goal: render videos on eu4's timeline function

Related tags

Videoeu4-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

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

1 Mar 08, 2022
Telegram Music/ Video Streaming Bot Using Pytgcalls

Video Player 🔥 ᴢᴀɪᴅ ᴠᴄ ᴘʟᴀyᴇʀ ɪꜱ ᴀ ᴛᴇʟᴇɢʀᴀᴍ ᴘʀᴏᴊᴇᴄᴛ ʙᴀꜱᴇᴅ ᴏɴ ᴘʏʀᴏɢʀᴀᴍ ꜰᴏʀ ᴘʟᴀʏ ᴍᴜꜱɪᴄꜱ ɪɴ ᴠᴄ ᴄʜᴀᴛꜱ... 🅡🅔🅟🅞 🅢🅣🅐🅣🅢 ʀᴇQᴜɪʀᴇᴍᴇɴᴛꜱ 📝 FFmpeg NodeJ

16 Nov 30, 2022
Python application that can be used to generate video thumbnail for mp4 and mkv file types.

Thumbnail Generator 🎬 What is This This is a Python application that can be used to generate video thumbnail for mp4 and mkv file types. Installation

Tharindu N. 13 Jan 03, 2023
Code from the 2021 Signal Video Superclass

Twilio Video Demo This is the code written during the live Twilio Video demo during Twilio's Signal 2021 Superclass. It creates a simple Video applica

2 Oct 21, 2021
Rune - a video miniplayer made with Python.

Rune - a video miniplayer made with Python.

1 Dec 13, 2021
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

Chaoyi Zhu 0 Jun 23, 2022
Video Object Segmentation(VOS) From Zero to HeroVideo Object Segmentation(VOS) From Zero to Hero

Video Object Segmentation(VOS) From Zero to Hero! Goal 1:train a two layers cnn model for vos. Finish! see model.py FFNet for more diteal.(2021.9.30)

1 Oct 22, 2021
Help for manipulating the plex-media-server transcode on the raspberry pi

raspi-plex-transcode Help for manipulating the plex-media-server transcode on the raspberry pi Ensure hardware decoding works and your firmware is up

10 Sep 29, 2022
Python package to display video in GUI using OpenCV-Python and PySide6

Python package to display video in GUI using OpenCV-Python and PySide6. Introduction cv2PySide6 is a package which provides utility classes and functi

3 Jun 06, 2022
Video-stream - A telegram video stream bot repo

This is a Telegram Video stream Bot. Binary Tech 💫 Features stream videos downl

silentz lk 1 Feb 02, 2022
Stream music with ffmpeg and python

youtube-stream Stream music with ffmpeg and python original Usage set the KEY in stream.sh run server.py run stream.sh (You can use Git bash or WSL in

Giyoung Ryu 14 Nov 17, 2021
Python package for Near Duplicate Video Detection (Perceptual Video Hashing) - Get a 64-bit comparable hash-value for any video.

The Python package for near duplicate video detection ⭐️ Introduction Videohash is a Python package for detecting near-duplicate videos (Perceptual Vi

Akash Mahanty 144 Dec 19, 2022
Automagically synchronize subtitles with video.

FFsubsync Language-agnostic automatic synchronization of subtitles with video, so that subtitles are aligned to the correct starting point within the

Stephen Macke 5.7k Jan 06, 2023
A Advanced Anime Theme VC Video Player created for playing vidio in the voice chats of Telegram Groups

Yui Vidio Player A Advanced Anime Theme VC Video Player created for playing vidio in the voice chats of Telegram Groups Demo Setting up Add this Bot t

Achu biju 32 Sep 16, 2021
Automatically segment in-video YouTube sponsorships.

SponsorBlock Auto Segment [Model Download] Automatically segment in-video YouTube sponsorships. Trained on a large dataset of YouTube sponsor transcri

Akmal 7 Aug 22, 2022
Video Chat Streamer With Python

Voice Chat Streamer This bot can stream audio or video files and urls in telegram voice chats :) 🎯 Follow me and star this repo for more telegram bot

WiskeyWorm 4 Oct 09, 2022
Lightweight, zero-dependency proxy and storage RTSP server

python-rtsp-server Python-rtsp-server is a lightweight, zero-dependency proxy and storage server for several IP-cameras and multiple clients. Features

Vlad 39 Nov 23, 2022
Automatically logs into VTOP and can perform certain tasks

VTOP_Login Automatically logs into VTOP and can perform certain tasks To run the

Jatin 1 Jan 30, 2022
goal: render videos on eu4's timeline function

Rendering Videos on the EU4 Time Line This repository contains code to create an eu4-savefile that plays back a video in question.

29 Dec 24, 2022
Python retagging utility for mkv files using mkvmerge.

pyretag A python script to retag mkv files. Setting Up pip install pyfiglet pip install rich Move the mkv files to input folder.

25 Dec 04, 2022