Using sendVideo with H.264 videos returns ok:true but no preview is shown. For example:
ffmpeg -i source.mkv -an -c:v libx264 -preset fast target.mp4
What adjustments to the video format are required?
Using sendVideo with H.264 videos returns ok:true but no preview is shown. For example:
ffmpeg -i source.mkv -an -c:v libx264 -preset fast target.mp4
What adjustments to the video format are required?
hey, try using h.264 baseline profle with an mp4 container. i had issues with other settings and this setup fixed it for me. give it a shot!
In my experience, besides selecting the appropriate codec configuration, ensuring the video file is optimized for streaming is crucial. I encountered similar issues when the preview was not displaying because the file was not prepared for progressive downloading. Including the faststart option (-movflags faststart) allowed the metadata to be placed at the beginning of the file, making it more compatible with Telegram’s requirements. Additionally, confirming that the pixel format is yuv420p and that the resolution remains within Telegram limits has resolved preview issues consistently.
I once faced a similar problem when experimenting with Telegram’s sendVideo device. My first approach was to simply convert the video using H.264, but I observed that the preview still wasn’t showing. It turned out that placing the moov atom at the beginning of the file was critical, so I updated my FFmpeg command with the faststart option. Additionally, I verified that the baseline profile was used, which ensured better compatibility. Fine tuning these settings made the video preview display correctly in Telegram after a few trials.
hey, i had a similar issue and found that making the video a constant frame rate (e.g. fps=30) helped show the preview. i used ffmpeg to normalize it and it solved my problem. give it a try!