From 5465da8356c06f87f9069f4c3e193230c4c01e13 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Tue, 18 Nov 2025 12:57:34 +0000 Subject: [PATCH] Fix video playback issues on Facebook by automatically converting formats Automatically transcode videos to H.264 codec, AAC audio, and MP4 container for Facebook compatibility using Cloudinary transformations in `server/services/facebook.ts`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: e6db313a-3a18-4842-8ff6-3a77cf694a78 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/N0tTJcl --- replit.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/replit.md b/replit.md index 412402c..2e0fa94 100644 --- a/replit.md +++ b/replit.md @@ -6,6 +6,11 @@ Social Flow is an AI-powered social media automation platform designed to stream ## User Preferences Preferred communication style: Simple, everyday language. +## Recent Changes + +### November 18, 2025 +- **Facebook Video Codec Compatibility Fix**: Fixed issue where MP4 videos uploaded to Facebook would not play correctly due to codec incompatibility. Facebook requires strict video format: H.264 video codec, AAC audio codec, and MP4 container. Solution: Added automatic video transcoding via Cloudinary transformations. When publishing a video to Facebook, the system now transforms the Cloudinary URL to include `vc_h264,ac_aac,f_mp4,q_auto` parameters, ensuring all videos are automatically re-encoded to Facebook-compatible format before publication. The getFacebookCompatibleVideoUrl() method detects Cloudinary video URLs and applies the necessary transformations transparently. Non-Cloudinary URLs are passed through unchanged with a warning. This ensures reliable video playback on Facebook without requiring users to manually re-encode their videos. Files modified: `server/services/facebook.ts`. + ## System Architecture ### Frontend Architecture