Add watermark to video with seven KN interface

Source: Internet
Author: User

Because the video watermark function is used in the project, the program efficiency is comparatively low.

Finally decided to upload the video to seven cattle, and then call the API to the specified video watermark function, the implementation of the specific

            //Initialize Ak,sk            stringSaccess_key ="seven kn account corresponding to AK"; stringSsecret_key ="seven kn account corresponding to the SK"; stringNamekey = DateTime.Now.ToString ("HHMMSS")+". mp4"; byte[] B = System.Text.Encoding.Default.GetBytes ("Watermark:"+ Namekey);//Place watermark video into watermark storage spaceString Saveasurl = convert.tobase64string (b);//save to-file under target space            stringFoPs ="avthumb/mp4/wmtext/ymlhbw==/wmfontcolor/cmvk/wmfontsize/30/wmgravitytext/southeast|saveas/"+ Saveasurl;//Execute the command, part of the character Base64            stringPipeline ="Watermark_line"; stringNotifyurl ="http://www.test.com/demo/ui/ResultNotifyQiniuWM.aspx";//URL of the successful callback            stringBucket ="ZNMLR";//Target Space            stringKey ="Hello.mp4";//file nameMac Mac =NewMac (Saccess_key, Ssecret_key); Pfop px=NewPfop (MAC); Pfopresult result= PX.PFOP (bucket, key, FoPs, pipeline, Notifyurl,true); if(result.) Persistentid = =NULL) {                stringSS =result.            Response;            } Console.WriteLine (Jsonconvert.serializeobject (Result)); Console.ReadLine ();

Use this feature to refer to Qiniu.dll and Newtonsoft.json (9.0.0 version)

Add watermark to video with seven KN interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.