See the question asked here.
How to merge audio and video streams with different lengths trimming audio to fit video using ffmpeg
ffmpeg is creating output, the audio file itself plays, the video itself plays.
but the output file has no sound. ffmpeg is not throwing any errors.
neither vlc or mplayer two of the most complete video players in Linux are producing sound from the output.mp4
both however are creating some interesting output.
on vlc the following is being outputted:
[00
007f12500065a0] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.16.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
[00007f12500065a0] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
[00007f12500065a0] gl gl: Initialized libplacebo v4.208.0 (API v208)
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[00007f12500065a0] gl gl: Initialized libplacebo v4.208.0 (API v208)
[h264 @ 0x7f126cdf32c0] get_buffer() failed
[h264 @ 0x7f126cdf32c0] thread_get_buffer() failed
[h264 @ 0x7f126cdf32c0] decode_slice_header error
[h264 @ 0x7f126cdf32c0] no frame!
[h264 @ 0x7f126ce10040] get_buffer() failed
[h264 @ 0x7f126ce10040] thread_get_buffer() failed
[h264 @ 0x7f126ce10040] decode_slice_header error
[h264 @ 0x7f126ce10040] no frame!
[h264 @ 0x7f126ce2cdc0] get_buffer() failed
[h264 @ 0x7f126ce2cdc0] thread_get_buffer() failed
[h264 @ 0x7f126ce2cdc0] decode_slice_header error
[h264 @ 0x7f126ce2cdc0] no frame!
[h264 @ 0x7f126cdf32c0] get_buffer() failed
[h264 @ 0x7f126cdf32c0] thread_get_buffer() failed
[h264 @ 0x7f126cdf32c0] decode_slice_header error
[h264 @ 0x7f126cdf32c0] no frame!
[h264 @ 0x7f126ce10040] get_buffer() failed
[h264 @ 0x7f126ce10040] thread_get_buffer() failed
[h264 @ 0x7f126ce10040] decode_slice_header error
[h264 @ 0x7f126ce10040] no frame!
[h264 @ 0x7f126ce2cdc0] get_buffer() failed
[h264 @ 0x7f126ce2cdc0] thread_get_buffer() failed
[h264 @ 0x7f126ce2cdc0] decode_slice_header error
[h264 @ 0x7f126ce2cdc0] no frame!
On Mplayer the following is being outputted:
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[aac @ 0x7fb5c71d39e0]Multiple frames in a packet.
AUDIO: 48000 Hz, 2 ch, floatle, 2.3 kbit/0.07% (ratio: 284->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
[aac @ 0x7fb5c71d39e0]channel element 0.0 duplicate
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1092x614 => 1092x614 Planar YV12
A: 10.4 V: 10.4 A-V: 0.000 ct: -0.021 0/ 0 12% 2% 0.9% 1 0
Exiting... (Quit)
None of the errors relate to audio. Libplacebo and libva are video rendering apparently.
In Mplayer the stream is being loaded.
What could cause ffmpeg to not mux the streams properly ?
bear in mind the stream lengths are different. the audio is about a minute longer than the video.