Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Cineverse

Physics based sandbox sim in which you run a video rental store · By WoodenCat

CUSTOM RADIO/TV/TAPES/CASSETTES READ ME Sticky Locked

A topic by WoodenCat created 56 days ago Views: 42
This topic is locked
Viewing posts 1 to 1
Developer (1 edit)

The Radio, TV, Cassettes and VHS tapes all work very similarly. 

For the Radio or TV, either drop files straight into ch1 or ch2  (st1, st2 for radio) or just make any amount of new folders (named ch3, st3 and up) and drop them in there!  

For VHS, make a new folder in tapes called tape1, tape2 and so on, and drop your file into there. VHS "technically" can have more than one file but there is no continuity check to keep it playing and it won't play in order. Tapes can have cover art! There's no size limit or requirements other than it has to be a PNG. Just drop cover.png into the individual tape folder you made with the video in it and that's it! There are cover templates in /assets/textures/blanktape and /assets/textures/blankcasstte 

Cassettes work the exact same as VHS but need to be put in it's respective 'cassettes' folder. It also must be named 'cassette1', 'cassette2' and so on and so forth. 

My recommendation is that if you have numbered tracks (you can have 14 on one cassette!), to number them 01, 02, and so forth, then 10-14 can be regular. Otherwise the sorting goes 1,10,11,12,13,14,2,3,4,etc... silly I know. It also can take cover art the same way as the vhs, there is no wrong resolution as long as it roughly follows the template and is named cover.png 

If you don't want to have 100+ movie files in the game because, ya know, that takes up a lot of space, you can solely collect covers (Legally and on your own; I don't know laws on this stuff, so find them yourselves) and still make folders for them each and put them in there and it will generate a "blank" tape with that case. It will still act in game as a regular tape, you simply won't be able to watch it. Customers will still try and rent it, can be removed from case, etc. 

If you name a TV channel or Radio station a higher number than you have actual folders, it'll create empty static stations in between to make up for it. This doesn't happen with Cassettes/VHS, but rather if you only have one folder named 'tape5', it'll internally call it 'tape1' because it's the only one it found, hence the naming convention, same with 'cassette5', etc. 

There's no limit that I'm aware of to how many files you can put onto a station or channel and there's no limit to how many stations/channels/cassettes/tapes you can have. 

If you want to watch just a single file again and again, don't yap at me to turn on file looping or whatever, just put it on it's own channel/station and it'll loop. You can also put it onto a tape now f*** off. 

Custom Video/Audio is passed through FFMPEG so it should be able to handle most file types, hardware depending. 

***********HEVC, H265, 10bit or 4K video just shouldn't be used for performancereasons*********** 

In fact, during my own tests, I found that only until you get into larger file sizes for 1080p does it ever become an issue (20gb+) and even then, it's just a bit of audio de-sync. But 4k, 10bit video, HEVC, H265 whatever, they all crashed the game and I don't care enough to fix it. It works great as is. 

I have not extensively tested audio support. 

For best results, I'd use video/audio files that have mono audio tracks. This will allow the 3D audio in game to work proper and is how the game is meant to be played. You can easily convert your own files using FFMPEG. If it's music, you only have to merge: 

----------------------------- 

(THIS IS FOR ONE FILE) 

Split audio from original video file ('input.mp4' should match your file): 

ffmpeg -i input.mp4 -vn -acodec copy output.aac 

Merge audio streams into mono channel('input.aac' should be the file you just made above and .aac should change based on the video codec. If its an .mkv video, its .mka): 

 

ffmpeg -i input.aac -ac 1 output.aac 

Recombine the old video with the new audio ('input.mp4' should be original video, 'input.aac' should be the mono audio we just made): 

ffmpeg -i input.mp4 -i input.aac -c copy -map 0:v:0 -map 1:a:0 output.mp4 

Delete your original video (if you want) and the audio streams we made, that's it! 

-------------------------------- 

(THIS IS TO BATCH CONVERT ALL IN A FOLDER) 

BATCH SPLIT,CONVERT and RECOMBINE DUAL AUDIO TO MONO (these have to be done in CMD, no powershell, and can each be literally copy/pasted one at a time once you're in the folder in CMD) 

Split audio from original file (.mp4 and .aac should change based on the video codec. If its an .mkv video, its .mka): 

for %i in (*mp4) do ffmpeg -i "%i" -vn -acodec copy "%i output.aac" 

batch convert all dual channel audio in a folder into mono 

for %i in (*.aac) do ffmpeg -i "%i" -ac 1 "%~ni mono.aac" 

Recombine the old video with the new audio: 

for %i in (*.mp4) do ffmpeg -i "%i" -i "%i output mono.aac" -c copy -map 0:v:0 -map 1:a:0 "%i MONO.mp4" 

Delete your original videos (if you want) and the audio streams we made, that's it! 

------------------------------- 

Also, "f***" 

Also, also, here's a few more helpful FFMPEG tools for stuff: 

Convert *input file type* into H264 (change .mkv to whatever file type your videos are): 

ffmpeg -i 'input.mkv' -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy 'output.mkv' 

Batch convert all *input file type* in a folder into H264 (this one can't be done from powershell, has to be CMD or similar. Change .mkv to whatever file type your videos are) 

for %i in (*.mkv) do ffmpeg -i "%i" -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy "%~ni [H264 re-encode].mkv" 

without subtitle decoding: add '-sn' to the above. If you had an issue running the command and it's because of subtitles, this probably will help.