Adding WaterMarks/Text to live stream with Vp6

296 views
Skip to first unread message

Annie

unread,
Dec 15, 2009, 4:43:17 AM12/15/09
to xuggler-users


Hi All,
1. I need to ask if there is any encoder which can transcode live
stream from flash in SorensenSpark?Nelly Moser format to VP6 with
water marks

2.Is it possible to add watermarks(images/text) to stream in Vp6 ?


Thanks


ddprasad

unread,
Dec 15, 2009, 4:48:51 AM12/15/09
to xuggler-users
People say that with xuggler it is possible. I am also on the same
track.

Annie

unread,
Dec 15, 2009, 5:23:52 AM12/15/09
to xuggler-users
Thanks
But I have read that Xuggler doesnt support VP6

Art Clarke

unread,
Dec 15, 2009, 10:20:13 AM12/15/09
to xuggle...@googlegroups.com
Xuggler doesn't support encoding VP6, that's true.  You can encode to SorensenSpark or H264 and you can add WaterMarks.

And before Prassad says so, no, we don't have the exact code you need already written for you, but review the tutorials and demo code, get familiar with the Java AWT image library, and you should be able to figure it out.

- Art

--

You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.





--
http://www.xuggle.com/
xu‧ggle (zŭ' gl) v. To freely encode, decode, and experience audio and video.

Use Xuggle to get the power of FFmpeg in Java.

ddprasad

unread,
Dec 15, 2009, 10:30:20 AM12/15/09
to xuggler-users
Hmm, I have a bad reputation.
> > xuggler-user...@googlegroups.com<xuggler-users%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/xuggler-users?hl=en.
>
> --http://www.xuggle.com/

Hugo Flambó

unread,
Dec 15, 2009, 10:50:03 AM12/15/09
to xuggle...@googlegroups.com
Add a watermark is kind easy!!! if you look into examples you might
see you have almost all that you need to perform it!

Simple solution:D



public static void main(String[] args) throws IOException{
if (args.length < 2){
System.out.println("Usage: ModifyAudioAndVideo <inputFileName>
<outputFileName>");
System.exit(-1);
}

File inputFile = new File(args[0]);

if (!(inputFile.exists())){
System.out.println("Input file does not exist: " + inputFile);
System.exit(-1);
}

File outputFile = new File(args[1]);

IMediaReader reader = ToolFactory.makeReader(inputFile.toString());
reader.setBufferedImageTypeToGenerate(5);

IMediaWriter writer = ToolFactory.makeWriter(outputFile.toString(), reader);


File waterMarkFile = new File("pearls-watermark.png");
BufferedImage waterMark = ImageIO.read(waterMarkFile);
IMediaTool addWatermark = new WatermarkTool(waterMark);

reader.addListener(addWatermark);
addWatermark.addListener(writer);

//show conversion result window
writer.addListener(ToolFactory.makeViewer());

while (reader.readPacket() == null);

}


static class WatermarkTool extends MediaToolAdapter{

BufferedImage waterMark = null;

private static final int __WATERMARK_WIDTH = 100;
private static final int __WATERMARK_HEIGHT = 50;

public WatermarkTool(BufferedImage waterMark) {
this.waterMark = waterMark;
}


public void onVideoPicture(IVideoPictureEvent event){

BufferedImage image = event.getImage();
Graphics2D g = image.createGraphics();


g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
0.4f));// 40% transp
g.drawImage(waterMark, image.getWidth() - waterMark.getWidth(),
image.getHeight() - waterMark.getHeight(), null);// draw in lower
right corner

//Image watermarkLogo =
waterMark.getScaledInstance(__WATERMARK_WIDTH, __WATERMARK_HEIGHT, 0);
//g.drawImage(watermarkLogo, image.getWidth() - __WATERMARK_WIDTH,
image.getHeight() - __WATERMARK_HEIGHT, null);// draw in lower right
corner

super.onVideoPicture(event);
> To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.

Annie

unread,
Dec 16, 2009, 6:15:14 AM12/16/09
to xuggler-users
Thankyou All,

Just need to know that Is it possible to add water mark to the
stream in VP6 format?
Which encoder does it best

Thanks

Art Clarke

unread,
Dec 16, 2009, 9:47:49 AM12/16/09
to xuggle...@googlegroups.com
As far as I know, ON2 makes the only available (and commercial) VP6 encoder, but you need to use their software APIs to use it.  We have not integrated ON2 with Xuggler.

- Art

For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.





--
Reply all
Reply to author
Forward
0 new messages