Transcoaster
Daemon, Controller and Communication
Creating the daemon infrastructure, managing the communication and refactoring the project into more complex, but far easier to handle application.Pixel Format
RPi4 was not able to properly play a video file, so an investigation was to be made, and the findings was satisfying.Apostrophe
Apparently for some odd reason, it is close to impossible to use apostrophes inside input files for complex filters, as ffmpeg hates this. I’m not sure why, and I’ve tried several ways to replicate it through bash, but the only way was to put quotes around the input file itself. The reason for this is still unknown, so I opt for a temporary solution by creating a temporary symbolic link to the input file and try it that way. No idea if this may have any issues for streaming data through pipe, but apparently it works.
Bump in the road
I stumbled upon the first video with image-based subtitles, so now I have an actual video to try it out with. It worked pretty smoothly, but there was one error that made the subtitles unreadable: If your subtitles have a bigger size than the actual video output, it will not scale to the video and place the subtitles outside the video instead. I suspect the reason for this was so you could display the subtitles outside the video, leaving more room for the video itself. The problem is that I hadn’t added any black bars around the video to fit that size, neither is the subtitles scaled to fit the video, the default option for how VLC seem to handle it.
Next step
The program is getting more stable, so the next step is probably to daemonize it and create a webui frontend. I probably will add more features as I go, but the less features, the easier for anyone else to use it. A daemon could also work with the cli, as then I can add more to the queue without having to wait for the first batch to finish. I can currently add as much as I want, but the terminal has an input limitation. And it opens up for the webui later too. As the previous project, I will add JSON-RPC for communication, as that sounds reasonable and easy to implement.
Second step
While I sifted through, throwing files at the script, I realized that I had to add more and more tests, as there was no coherent standard on metadata naming and what tags existed or not. And then different type of subtitles! After testing different formats I had laying around, my latest addition was to add support for external subtitles. This was pretty tricky, as ffmpeg requires you to add a file, normally the video file with included subtitles, so this should be pretty easy, right? Nope! The problem was with the interface, where it either had no idea about the subtitle files existing (could be in a different folder too), or if I threw it a folder it included all the files, and as ffprobe was trying to check the files, subtitles it recognized as a valid format.
First step
I reached out to some developers as this is quite a heavy task to do alone, and got a response and we started a team. It was named Encoaster. We geared toward Rust with TypeScript on the frontend. The idea was to contain each service in docker so it could be deployed anywhere, and scaled accordingly.
Problem was that the dedication faltered, priority on the project was lowered significantly until put to a halt. As we had not come far enough everyone left the project.
Background
As I have certain older hardware or finicky software, I was more forced to convert my video files to a better format. It either was subtitles not showing up, audio track being wrong, or not being to play at all. My first solution was to use Handbrake, which works fine for occasional transcoding, but is bothersome on tens or even hundreds of files, leaving my desktop up all night and day. I then moved it to my server, but it occasionally crashed, and I still needed to do all the config manually for each video.
Info
A tool to batch transcode video files with burn-in subtitles to a more accessible format for certain older hardware and software. Either through cli or webui.