Status
Not open for further replies.

codexbd

Member
6
2013
0
0
Hii,

I am trying to watermark video files in my centos PC. Regarding watermark i'm a newbie. So i searched Google. As per experts advise the plugin FFMPEG can do that. So i tried that but no result.

Can anyone advise how could i watermark a mp4 file in Centos linux vps.

Thanks in advance.
 
2 comments
I'm not sure about encoding from Linux, but I'm using a Advanced Substation Alpha (*.ass) file to watermark my video and add it as a textsub on avisynth scripts. It's manual encoding though, so it might be different from what you are looking for.
 
Hii,

I am trying to watermark video files in my centos PC. Regarding watermark i'm a newbie. So i searched Google. As per experts advise the plugin FFMPEG can do that. So i tried that but no result.

Can anyone advise how could i watermark a mp4 file in Centos linux vps.

Thanks in advance.

Showing what commands you tried in the bash script would be very helpful but as a norm the command would be like this:

Adding a Watermark


Use the overlay video filter:
Code:
ffmpeg -i input.flv -i logo.png -filter_complex \
"[0:v][1:v]overlay=W-w-10:H-h-10[watermark]" -map "[watermark]" \
-map 0:a -codec:v libx264 -preset veryfast -crf 18 -codec:a copy \
output.mp4

[LIST]
[*]The filtergraph: [0:v][1:v]overlay=W-w-10:H-h-10[watermark]
[LIST]
[*][0:v] is a stream specifier referring to the video stream(s) of the first input (input.flv). [1:v] refers to the video stream(s) of the second input (logo.png).
[*]W-w-10 is placing the [I]x[/I] axis and refers to the width of the main input (W) and the width of the overlay input (w). H-h-10 is similar but for the [I]y[/I] axis. This example places the logo in the bottom right with a padding of 10 pixels. See [URL="http://ffmpeg.org/ffmpeg-filters.html#overlay"]overlay video filter documentation[/URL] for more info.
[*][watermark] is the output link label. Some omit this but I prefer to explicitly label my outputs to remove ambiguity.
[/LIST]

[*]-crf 18 is often considered roughly "visually lossless", so I assume that value will suffice for you. If not then reduce the value until you achieve an acceptable quality. Then use the slowest preset you have patience for. See the [URL="https://trac.ffmpeg.org/wiki/x264EncodingGuide"]FFmpeg and x264 Encoding Guide[/URL] for more info on -crf and -preset.
[*]-codec:a copy will [URL="http://ffmpeg.org/ffmpeg.html#Stream-copy"]stream copy[/URL] the audio. If you player does not like what I assume is MP3 audio then use something like -codec:a aac -strict experimental -b:a 128k instead. See the[URL="https://trac.ffmpeg.org/wiki/AACEncodingGuide"]FFmpeg and AAC Encoding Guide[/URL] for more info.
[/LIST]
 

Attachments

  • bgKN5.jpg
    bgKN5.jpg
    12.3 KB · Views: 3
Status
Not open for further replies.
Back
Top