[FFmpeg-user] Hidden audio in H264 - wrapped_avframe

BloodMan bloodman at gmail.com
Mon Apr 14 15:49:27 EEST 2025


Hello,

And IMO should not work.

.h264 is video only stream in general. Does not contain audio so 
searching or encoding audio will not succeed. BUT:

I do not work with wrapped_avframe, but you may try:

ffmpeg -i file.h264 -hide_banner -loglevel warning -err_detect 
ignore_err -dn -sn -map 0:v -map 0:a -f fifo -pix_fmt yuv420p
-c:v libx264 -preset veryfast -profile:v high -level 41 -crf 16
-tune film -c:a aac -b:a 160k -ac 2 -ar 48000 -shortest -y
-f mp4 output.mp4

Why? you cannot STORE raw h264 video (without reencode) in mp4 container 
- so you should reencode first (just like audio).

Hope it helps.



W dniu 2025-04-14 o 13:57, Hans Schuell (GiraOne) pisze:
[cut]
>
> ffmpeg -i file.h264 -hide_banner -loglevel warning -err_detect ignore_err
> -dn -sn -map 0:0 -codec:v copy -map 0:1 -filter:a
> aresample=osr=8000:ochl=mono -codec:a aac -b:a 64k -shortest file.mp4
> 
> it doesn't work. It leads to


-- 
Pozdrawiam,
bloodman at gmail.com


More information about the ffmpeg-user mailing list