Open Sysix opened 5 months ago
Hello,
I'm using download_with_ffmpeg and would like to attach some parameters to the program.
download_with_ffmpeg
I thought something like this:
let mut ffmpeg_options = String::new(); if artist.is_some() && song.is_some() { ffmpeg_options = format!("{} -metadata artist=\"{}\" -metadata title=\"{}\"", ffmpeg_options, artist.unwrap(), song.unwrap()); } let ffmeg_args = Some(FFmpegArgs { format: None, audio_filter: None, video_filter: None, output_args: ffmpeg_options, // metadata, mapping, etc input_args: None // for cover image input });
I don't know much about ffmpeg to be honest. I just learn to program rust and try to copy my old program to rust. here is my typescript code which should explain a bit more :)
const worker = ffmpeg(stream) .audioBitrate(320) .audioQuality(0) .audioChannels(2); if (artist) { worker.outputOptions( '-metadata', `title=${title}`, '-metadata', `artist=${artist}` ) } if (source.coverImage) { try { imagePath = path.resolve(folder, `${mp3Title}-cover`); await downloadImage(source.coverImage, imagePath); worker .addInput(imagePath) .addOption('-map', '0:a') .addOption('-map', '1') .addOption('-disposition:v', 'attached_pic') } catch { // image thumbnail is optional } }
@Mithronn updates on this?
Hello,
I'm using
download_with_ffmpeg
and would like to attach some parameters to the program.I thought something like this:
I don't know much about ffmpeg to be honest. I just learn to program rust and try to copy my old program to rust.
here is my typescript code which should explain a bit more :)