← Back to all articles
Blog

EFV intelligent recommendation API with weighted array matching, dedecms publishing, and transcoding improvements

The major addition is an intelligent recommendation API. Given an array, matches in the database generate an order score; results are returned by weight. With well-maintained tags, Following and related recommendations in the frontend and APP become highly relevant. Automated publishing now supports dedecms, or DedeCMS, with flexible mapping to custom fields. Portrait transcoding is also refined, with complex logic explained below. Video compression is improved again, and audio is now 128KB stereo for better headphone and multi-speaker listening.

Updates

Automated publishing supports dedecms custom fields. For example, define m3u8, mp4, tags and gif fields for the m3u8 playback URL, mp4 download URL, tags and animated gif. Map adaptive m3u8 to the m3u8 field, mp4 URLs to mp4, tags to tags and animations to gif. Design templates to play, download or display these fields.

Improved portrait transcoding, correcting orientation detection for phone-camera videos. After dozens of tests on several phone models, complex logic now accurately identifies portrait videos and adapts all transcoding parameters. Outputs retain the original portrait aspect ratio rather than becoming landscape. This matters for planned APP user uploads.

Improved video compression again, with 128KB stereo audio for better headphones and speakers.

Tag-match-based recommendations in the frontend and APP rank combined matches across genres, regions, actors, directors and writers. The virtual order property exposes each returned video or series' score.

Recommendation design

Why add intelligent recommendations to EFV? Popular CMS recommendation systems are too simple and often unrelated to what users view. They do not calculate comprehensive weights for the current video or followed interests. Second, the dedicated APP now lets signed-in users follow tags, with recommendations weighted by those interests. Third, both CMS and APP will eventually recommend based on viewing history. This endpoint also helps third-party CMS users retrieve recommendations and display corresponding content from their own CMS.

Example

Video one: director Andy Lau / writer Stephen Chow / release regions China, United States / genres comedy, science fiction, romance, drama.

Video two: director Sean Lau / writer Andy Lau / release region Hong Kong, China / genres comedy, science fiction.

Video three: director Stephen Chow / writer Andy Lau / release region China / genres science fiction, romance.

Video four: director Andy Lau / writer Tony Leung / release region Hong Kong, China / genre comedy.

Video five: director Sean Lau / writer Stephen Chow / release regions China, United States / genres science fiction, comedy.

Intelligent recommendation API request

/api2/getcontents?tags=周星驰,喜剧,刘德华,科幻,中国&size=5&page=1&type="movie,tv"

The endpoint receives tags, splits them and queries the database. It ranks combined matches across directors, writers, regions and genres, returning video json.

Final ranked results

Video one: order=5; video five: order=4; video two: order=3; video three: order=3; video four: order=2.

The returned order is video one, five, two, three, four.