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 GUI application for cropping images from videos

v-trimming-gui A GUI application for cropping images from videos. 動画をシークバーで操作しながらスクリーンショットを撮るためのアプリ。 Requirement Python =3.7 opencv-python ^4.5.5 PyS

Menrui 6 Feb 05, 2022
Spotify playlist video generator

This program creates a video version of your Spotify playlist by using the Spotify API and YouTube-dl.

0 Mar 03, 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 02, 2022
Video-to-GIF-Converter - A small code snippet that can be used to convert any video to a gif

Video to GIF Converter Project Description: This is a small code snippet that ca

Hassan Shahzad 3 Jun 22, 2022
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
Ffmpeg videostream - High speed video frame access in Python, using FFmpeg and FFshow

FFmpeg VideoStream High speed video frame access in Python, using FFmpeg and FFshow This script requires: Karl Kroening's 'ffmpeg-python' library. (ht

3 Sep 29, 2022
基于BililiveRecorder 的集群录播客户端

高度自动化的录播服务端! 一、项目介绍 1、介绍 这是NGlive的录播服务器集群的客户端部分实现代码,它可以自动化的进行录制-压制-上传-通知,同时流程高度可自定义,并且可以任意受中心服务器的调度,有一定的错误修复能力。可以保证长期稳定的运行。 2、基本功能 这个客户端集 录制、转码压制、上传为一

NGWORKS 7 Jul 10, 2022
TkVideoplayer - This is a simple library to play video files in tkinter.

TkVideoplayer - This is a simple library to play video files in tkinter.

Art/Paul 38 Dec 23, 2022
Synchronize Two Cameras in Real Time using Multiprocessing

Synchronize Two Cameras in Real Time using Multiprocessing In progress ... 📁 Project Structure 📚 Install Libraries for this Project (requirements.tx

Eduardo Carvalho Nunes 2 Oct 31, 2021
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

Forrest Knight 155 Dec 19, 2022
KonomiTV: Kind and Optimized Next brOadcast watching systeM Infrastructure for TV

備考・注意事項 現在 α 版で、まだ実験的なプロダクトです。通常利用には耐えないでしょうし、サポートもできません。 安定しているとは到底言いがたい品質ですが、それでも構わない方のみ導入してください。 使い方などの説明も用意できていないため、自力でトラブルに対処できるエンジニアの方以外には現状おすすめ

tsukumi 244 Dec 31, 2022
Telegram Video Stream

Video Stream An Advanced VC Video Player created for playing video in the voice chats of Telegram Groups And Channel Configs TOKEN - Get bot token fro

mr_lokaman 46 Dec 25, 2022
Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze cameras including v3

Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze cameras including v3. No Third-party or special firmware required.

1.2k Jan 07, 2023
Vigia-youtube - The YouTube Watch bot is able to monitor channels on Google's video platform

Vigia do YouTube O bot Vigia do YouTube é capaz de monitorar canais na plataform

Alessandro Feitosa Jr 10 Oct 03, 2022
Turn any live video stream or locally stored video into a dataset of interesting samples for ML training, or any other type of analysis.

Sieve Video Data Collection Example Find samples that are interesting within hours of raw video, for free and completely automatically using Sieve API

Sieve 72 Aug 01, 2022
Real-time video and audio streams over the network, with Streamlit.

streamlit-webrtc Example You can try out the sample app using the following commands.

Yuichiro Tachibana (Tsuchiya) 648 Jan 01, 2023
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.

ShellTear 3 Mar 03, 2022
This plugin generates json files used by deovr allowing you to play 2d and 3d video's using the player

deovr-plugin This plugin generates json files used by deovr allowing you to play 2d and 3d video's using the player. Deovr looks for an index file /de

10 Sep 29, 2022
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 03, 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

1 Mar 08, 2022