[FFmpeg-user] Hidden audio in H264 - wrapped_avframe
BloodMan
bloodman at gmail.com
Mon Apr 14 22:11:39 EEST 2025
Hello,
Try to omit -dn -sn
or
omit -dn -sn and all -map, something like:
ffmpeg -i file.h264 -hide_banner -loglevel warning -err_detect
ignore_err -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
btw. maybe you can attach a link to short 30sec sample, then I could try...
greets,
W dniu 2025-04-14 o 20:36, Hans Schuell (GiraOne) pisze:
> Thanks for the suggestion, but the command leads to the same error, I already had:
>
> Stream map '' matches no streams.
> To ignore this, add a trailing '?' to the map.
> Failed to set value '0:a' for option 'map': Invalid argument
>
> Regarding "you cannot STORE raw h264 video (without reencode) in mp4 container": If I omit the audio, then I can use "-map 0:0 -codec:v copy" and the result is a useable MP4 (without audio). But the audio must be somewhere in the file, otherwise the HQCAM converter tool wouldn't be able to access it.
>
>
> -----Ursprüngliche Nachricht-----
> Von: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> Im Auftrag von BloodMan
> Gesendet: Montag, 14. April 2025 14:49
> An: ffmpeg-user at ffmpeg.org
> Betreff: Re: [FFmpeg-user] Hidden audio in H264 - wrapped_avframe
>
> 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