Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.3, 6.8.1
-
Windows 10, Windows 11, macOS 15.1
-
-
afbb68f9d (dev), 2b741f30f (6.9), 79c76f961 (6.8)
-
Multimedia wk 51-2
Description
How to reproduce
- Build and run the "Camera Example" on Windows (or on macOS)
- Switch to "Video" mode
- Settings: Either keep the "Default audio codec" or set to "Advanced Audio Codec (AAC)" - both create the same file format.
- Record a video file and make some noise.
- Play back the video in Windows Media Player (without any additional codecs/packs installed) or with Quicktime on macOS
There is no audio!
ffprobe the video
ffprobe of the generated file results in:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video_0004.mp4':
[...]
Duration: 00:00:04.35, start: 0.000000, bitrate: 3924 kb/s
Stream #0:0[0x1](und): Audio: aac (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 54 kb/s (default)
[...]
Stream #0:1[0x2](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 3905 kb/s, SAR 1:1 DAR 16:9, 30.20 fps, 60 tbr, 30k tbn [...]
Reencoding audio using ffmpeg works
Interestingly, reencoding the audio of the generated file using ffmpeg.exe -i video_0004.mp4 -acodec aac -vcodec copy video_0004_reencoded.mp4 results in a file that plays back correctly in Windows Media Player and Quicktime on macOS.
The reencoded file's ffprobe output is:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\ChristophNiederberge\Videos\video_0004_reencoded.mp4':
[...]
Duration: 00:00:04.35, start: 0.000000, bitrate: 3924 kb/s
Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 3875 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 60 tbr, 30k tbn
[...]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 54 kb/s (default)
[...]
With the subtle but important difference of having a `aac (LC)` instead of the `aac` as audio codec information.
Attachments
- video_0004.mp4 is the original recording
- video_0004_reencoded.mp4 is the video reencoded with ffmpeg
Notes
- Playback of the videos works correctly in VLC both on Windows and macOS
- This is independent of the container format
- This is independent of the video codec
- This is independent of the video resolution
- This is independent of the encoding quality or bitrate settings
- This seems to be independent of the audio sample rate
Attachments
Issue Links
- relates to
-
QTBUG-128336 Camera widget example does not record audio with default AAC format
-
- Closed
-
For Gerrit Dashboard: QTBUG-132463 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
618299,3 | FFMpeg: update streams from context | tqtc/lts-6.5 | qt/tqtc-qtmultimedia | Status: NEW | 0 | -1 |
614920,4 | FFMpeg: update streams from context | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
614956,2 | FFMpeg: update streams from context | 6.9 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
614962,2 | FFMpeg: update streams from context | 6.8 | qt/qtmultimedia | Status: MERGED | +2 | 0 |