[FFmpeg-user] Running multiple ffmpeg commands with minimal loss in quality
Michael Nolan
mnolan at mozilla.com
Sat Jul 25 19:50:47 CEST 2015
The application is a bit more complex than that. The source code is
available on Github right now (https://github.com/Nolski/popcoder/ the
ffmpeg commands reside in editor.py and the process of running all of the
commands is in video.py) but since we are stitching together video, doing
overlays, rendering text, simply throwing them into a filter chain is
harder than you would think and I'm not even sure if it's possible at all.
I have attempted to re-encode in a lossless format but no matter the
encoding that I try I always seem to get the error "Error while opening
encoder for output stream #0:0 - maybe incorrect parameters such as
bit_rate, rate, width or height".
By changing the encoding I mean I'm just tacking "-c:v ffvhuff" into the
command before the filter.
On Sat, Jul 25, 2015 at 1:45 AM, Moritz Barsnick <barsnick at gmx.net> wrote:
> On Fri, Jul 24, 2015 at 16:02:22 -0700, Michael Nolan wrote:
> > do things like overlay, scale and trim videos, render text, render
> images,
> [...]
> > The biggest issue that I have is that the application that I run has to
> run
> > ffmpeg multiple times, thus re-encoding the video(s) and making the end
> > video look much lower quality than the original content. The original
> > videos are .webm and encoded using QTmuxingAppLibWebM-0.0.1.
>
> You say it "has to". Could you elaborate?
>
> > Is there any way that I can help prevent this sort of thing or is there
> any
> > existing tooling for taking a series of edits and running them in one
> > command (meaning I don't have to re-encode multiple times)?
>
> Not if it "has to". You didn't give us examples of what you are doing -
> full command lines for the chain of edits - so I can only guess you are
> basically using ffmpeg's filters (in the widest sense) to do these
> edits.
>
> If so, you can chain your filters to a filterchain or a complex filter.
>
> $ ffmpeg [...] -vf filter1=a=a1:b=b1,filter2=c=c1:d=d1 [...]
> $ ffmpeg [...] -filter_complex
> "[0:v][1:v]filter1=...[outv];[0:a]filter2[outa];[outv][2:v]overlay" [...]
>
> Please show us your commands.
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
--
Mike Nolan | Web Development Intern
mnolan at mozilla.com
IRC: nolski
More information about the ffmpeg-user
mailing list