Skip to content
Advertisement

FFmpeg export codec not supported by Samsung

I am using FFmpeg to render videos (concatenating image files with audio and then applying speed and volume filters) to export videos to upload to TikTok. As a result, I must first move the videos to my phone.

I do not understand why my phone (S20) will happily play one of the videos (codec information pictured first), but presents an error “Codec not supported” when playing the other (information second).

The Supported File

The unsupported file

The codec information is from VLC, and as you can see, both videos have identical Codecs (H264-MPEG4).

From analysing the information, the only conclusion I come to is that it has something to do with the fact that the “Decoded Format” differs across the videos. How can I change my export command on the latter so my phone supports the codec?

CONCATENATION CODE ffmpeg -f concat -safe 0 -i {path_temp}\clips.txt -c copy -y "{path_temp}\{title}_a.mp4

FILTER CODE ffmpeg -i input.mp4 -filter:a "volume={volume}" -y temp.mp4"

SECOND FILTER ffmpeg -i temp.mp4 -filter_complex "[0:v]setpts={1/speed}*PTS[v];[0:a]atempo={speed}[a]" -map "[v]" -map "[a]" -y output.mp4

Advertisement

Answer

Since you’re re-encoding, do it in one step.

ffmpeg -f concat -safe 0 -i {path_temp}\clips.txt -filter_complex "[0:v]setpts={1/speed}*PTS,format=yuv420p[v];[0:a]volume={volume},atempo={speed}[a]" -map "[v]" -map "[a]" -y output.mp4

format=yuv420p generates to a widely compatible pixel format.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement