Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Convert audio to video file (Read 1722 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Convert audio to video file

I am trying to convert some flac files from 7digital into mp4 files for my Youtube channel.  There was a web site that worked great and is now adware.  I am mucking with something called Videoproc and it is not working.  I don't need a high def image.  I could download Adobe Premier, but it doesn't look like it would help.  Any suggestions?  I use the cover art for the image.

Neither Premier no Pinnacle recognize 24 bit audio files. 
Daniel L Newhouse

Re: Convert audio to video file

Reply #1
You can use ffmpeg.
https://superuser.com/questions/1041816/combine-one-image-one-audio-file-to-make-one-video-using-ffmpeg

You can upload mkv to youtube. This way you don't need to additionally re-encode audio.
This command will copy original audio and do automatic scaling and padding to 1280x720, keeping aspect ratio of picture. It is needed because not all resolutions are accepted by x264.
Code: [Select]
ffmpeg -r 1 -loop 1 -i "image.png" -i "audio.flac" -c:a copy -c:v libx264 -r 1 -vf "scale=iw*max(1\,sar)*min(1280/(iw*max(1\,sar))\,720/ih/min(1\,sar)):ih/min(1\,sar)*min(1280/(iw*max(1\,sar))\,720/ih/min(1\,sar)):flags=lanczos, pad=1280:720:(1280-iw*min(1280/iw\,720/ih))/2:(720-ih*min(1280/iw\,720/ih))/2" -shortest "output.mkv"

Re: Convert audio to video file

Reply #2
I get a file that is usable in Winamp, but not Youtube. 
Daniel L Newhouse

Re: Convert audio to video file

Reply #3
I have no problem uploading mkv file generated with this command from png image and 24/44.1 FLAC to youtube. It uploads and plays in browser as expected.

Re: Convert audio to video file

Reply #4
If you're on Linux

Code: [Select]
#! /bin/bash
test -z "$2" && echo "I need two input files. The first one must be a picture!" && exit 1
ffmpeg -loop 1 -i "$1" -i "$2" -acodec copy -c:v libx264 -preset veryslow -x264-params keyint=1000 -qp 0 -vf fps=10 -pix_fmt yuv420p -shortest out.mkv

I wrote this script back in 2016 for the exact same purpose. If your PC has fewer than 8 cores or it's old, you may want to replace the preset with something lighter, e.g. medium or even fast.

The image preferably should be exactly 1920x1080.

Re: Convert audio to video file

Reply #5
I got clideo.com to work for a couple of tracks.  Then it went dead on me.
Daniel L Newhouse

Re: Convert audio to video file

Reply #6
I got clideo.com to work for a couple of tracks.  Then it went dead on me.
freeconvert.com does the conversion without a separate cover art assignment.
Daniel L Newhouse

Re: Convert audio to video file

Reply #7
Maybe covert the FLAC to WAV and than it should work with Adobe Premiere, if you cut your video with Premiere anyway.

Re: Convert audio to video file

Reply #8
Quote
Based on the powerful FFmpeg library, OpenShot can read and write most video and image formats. -
- https://www.openshot.org/features/
Quis custodiet ipsos custodes?  ;~)

Re: Convert audio to video file

Reply #9
I've been (slowly) working on a bash script that takes cover.png as background and adds waveform and some moving head over it, example:
https://www.youtube.com/watch?v=iMeYtMcmjug
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung