djfun / audio-visualizer-python

a little GUI tool to render visualization videos of audio files
Other
239 stars 57 forks source link

Confusing ffmpeg flags #3

Closed rikai closed 8 years ago

rikai commented 8 years ago

So I was looking at the bit of code that defines the ffmpeg output...

I assume that -f rawvideo -vcodec rawvideois defining the input formats for the input file being piped in?

Is the -pix_fmt rgb24 also for that?

I find the ordering of the flags a bit confusing, as -s 1280x720, -r 30& -y are all settings related to the output format, at least i believe, that are intermixed with input format settings, unless i'm misunderstanding?

Additionally, is the matroska container used for a specific reason, or is that just personal preference? I'm looking to increase compatibility in various ways and just want to make sure that's not some sort of hard requirement. :)

Any clarification you might be able to give on these things would be wonderful. 👍

djfun commented 8 years ago

The pixel format, frame rate and frame size should be input parameters, so that ffmpeg knows how to interpret the raw input data. -y obviously is related to the output, but also different from all the other parameters. You should also be able to other other container formats than matroska.

I would not consider myself a ffmpeg expert, but that's at least how I understand this command ;)

rikai commented 8 years ago

Gotcha, thanks. I was unsure about that, but in hindsight i suppose that is needed because a raw video stream doesn't define any of that itself, eh? Thanks for the clarification. :)