I am going to show my friend some video. But there are some scenes that could be inappropriate for him. So, I decided to turn some frames black (as audio should remain). But I have no idea how to do this. Any help will be appreciated.

OS: Xubuntu 16.04

  • Close voters, I'm working on this. – Elder Geek Jan 10 '17 at 22:18

While this is possible it's not a trivial task. You can succeed in this endeavor by utilizing the highly versatile ffmpeg You'll need to do the following:

Prerequisite: If you don't have ffmpeg you'll need to install it.

You can do this either by either (pick one)

A) obtaining a static build


B) Installing from the repositories which requires enabling the universe repository and then installing with the command sudo apt-get update&&sudo apt-get install ffmpeg

Step 1 Extract the audio to a separate file to preserve it for re-use later n the process.

Step 2 Extract the frames and examine them all to decide which ones to replace.

Step 3 Replace those frames you deem necessary with a blank/black image of the same dimensions (you may avoid creating one if one already exists in the video that you can re-use.) insure the black frames have the same name as the frames you are replacing in order to maintain continuity.

Step 4 Assemble the frames back into a video.

Step 5 Re-apply the audio.

This is an oversimplified example as there are critical details regarding source material that doesn't exist in your question and you'll probably want to match bitrates with your source material so as to avoid quality loss. Also you'll want to extract and reassemble the same type of images whether you choose png or jpg. The examples provided should give you a great start though and there's a great deal of information available in the documentation

If there's anything unclear here or you get stuck somewhere along the way, drop me a comment and I'll do my best to clarify.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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