9 Commits

Author SHA1 Message Date
6da120f632 Version bump to v0.2.3
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-10-26 20:13:29 -04:00
a22b59d87c Updated woodpecker config to put compiled packages into proper directories for organization
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-10-26 20:13:04 -04:00
dfca3b1fd6 Updated woodpecker config for pushing to Linux package repos
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-10-26 16:59:42 -04:00
530d83f57d Updated woodpecker config for pushing to Linux package repos
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-10-26 16:35:49 -04:00
d836e27305 Updated woodpecker config for pushing to Linux package repos
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline failed
2022-10-26 16:25:35 -04:00
8bca6b3b0b Updated woodpecker config for pushing to Linux package repos
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-10-26 15:42:19 -04:00
958ffa397c Version bump to v0.2.2
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-10-26 12:21:01 -04:00
1671b95128 Changed the FFMPEG command output to get logged under debug to clean up log file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-10-26 12:20:22 -04:00
3bcbabf1b6 Fixed output file naming; adding debug line so user knows that transcoding is taking place
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-10-26 12:15:39 -04:00
3 changed files with 59 additions and 6 deletions

View File

@ -30,3 +30,49 @@ pipeline:
title: "${CI_COMMIT_TAG}"
when:
event: tag
copy_deb_package:
image: appleboy/drone-scp
settings:
host: "repo.int.metaunix.net"
username:
from_secret: repo_admin
password:
from_secret: repo_password
port: 22
target: /srv/repo/apt/zealot/
source: target/debian/zealot*.deb
strip_components: 2
when:
event: tag
copy_rpm_package:
image: appleboy/drone-scp
settings:
host: "repo.int.metaunix.net"
username:
from_secret: repo_admin
password:
from_secret: repo_password
port: 22
target: /srv/repo/dnf/zealot/
source: target/generate-rpm/zealot*.rpm
strip_components: 2
when:
event: tag
update_repos:
image: appleboy/drone-ssh
settings:
host:
- repo.int.metaunix.net
username:
from_secret: repo_admin
password:
from_secret: repo_password
port: 22
command_timeout: 2m
script:
- "sudo /home/xadmin/scripts/update_repo.sh"
when:
event: tag

View File

@ -1,7 +1,7 @@
[package]
name = "zealot"
description = "Bit Goblin automated video transcoding service."
version = "0.2.1"
version = "0.2.3"
edition = "2021"
readme = "README.md"
license = "BSD 2-Clause"

View File

@ -2,7 +2,7 @@ use config::Config;
use std::path::Path;
use std::process;
use std::{thread, time};
use log::{info};
use log::{debug, info};
use crate::util::io;
use super::repository::Repository;
@ -57,13 +57,20 @@ impl Transcoder {
fn transcode(&self, file: &str) {
let ingest_file = Path::new(&self.repository.ingest_dir).join(file);
let output_file = Path::new(&self.repository.output_dir).join(file);
let video_format = &self.config.get_string("transcoder.video_format").unwrap();
let output_stem = Path::new(file).file_stem().unwrap();
let output_bits = vec![output_stem.to_str().unwrap(), &video_format];
let output_name = output_bits.join(".");
let output_file = Path::new(&self.repository.output_dir).join(output_name);
let video_codec = &self.config.get_string("transcoder.video_codec").unwrap();
info!("Transcoding {} to {} with the {} encoder.", ingest_file.display(), output_file.display(), video_codec);
let cmd_output = process::Command::new("/usr/bin/ffmpeg")
.arg("-i") .arg(&*ingest_file.to_string_lossy())
.arg("-y")
.arg("-f") .arg(&self.config.get_string("transcoder.video_format").unwrap())
.arg("-c:v") .arg(&self.config.get_string("transcoder.video_codec").unwrap())
.arg("-f") .arg(&video_format)
.arg("-c:v") .arg(&video_codec)
.arg("-s") .arg(&self.config.get_string("transcoder.video_resolution").unwrap())
.arg("-r") .arg(format!("{}", self.config.get_string("transcoder.video_framerate").unwrap()))
.arg("-vf") .arg(format!("format={}", &self.config.get_string("transcoder.video_color").unwrap()))
@ -76,6 +83,6 @@ impl Transcoder {
assert!(cmd_output.status.success());
let results_raw = &String::from_utf8_lossy(&cmd_output.stderr);
info!("{}", results_raw);
debug!("{}", results_raw);
}
}