Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does anyone have an idea of how I can put an image mask over the video without changing the audio & video codec?

I'm making different media files for testing purposes and I want control over my audio and video codecs used in a A/V container, now I need to put an image mask over a A/V file, without changing the audio and video codec.

When using ffmpeg -i video.avi -i image.png -filter_complex 'overlay' avi.mkv I can add -acodec copy but not -vcodec copy, this gives the error:

Streamcopy requested for output streaam 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used together.

And when just using the above command FFmpeg encodes my streams to another format (MPEG-4 & MP3)

share|improve this question
add comment

1 Answer

You answered your own question: filters are incompatible with copy. You're using a video filter there, so you can't use -vcodec copy or -c:v copy; if you were using an audio filter, you would be unable to to use -acodec copy or -c:a copy.

copy, as its name suggests, copies the stream specified exactly, with no changes. Filters alter the stream(s) they target. By definition, copy and filters are incompatible.

If you simply want to choose a specific video codec, then that's simple enough: use -c:v [codecname]; you can see a list of all the codecs your ffmpeg supports with

ffmpeg -codecs
share|improve this answer
    
However, this seems like bad architecture. E.g. what if I want to do a "setpts=2*PTS" filter to slow down the video. That should be able to run with only demuxing and muxing and should not require transcoding! (Because it's not accessing the pixel data, just the frame metadatas). –  AlcubierreDrive Jun 16 '13 at 0:25
1  
@EvolvedAI That's a good point, and ffmpeg has support for bit stream filters that can be used with stream copying. I suspect this is just a case of nobody has got around to writing a bit stream filter that does this, because it's a fairly niche use of ffmpeg, and outside of the tool's main purpose. Maybe you should raise this on the ffmpeg-users mailing list, and/or file a request on their bug tracker. –  evilsoup Jun 16 '13 at 9:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.