Repository navigation
Closed
Description
Problem Description
hello, I'm making this bug report here, because I carried out encoding tests and this reading problem only occurs with handbrake, I tried the same encoding with ffmpeg from AAC 5.1 to AC3 5.1 and no problem.
when I convert an aac 5.1 video to ac3 5.1 with handbrake, the videos are unreadable on firestick
video test :
AAC 5.1 => OK
AC3 5.1 => KO
Activity Log, Crash Log or any other details
activity_log_main.11292.txt :
HandBrake 1.9.0 (2024120100)
OS: Microsoft Windows NT 10.0.19045.0
CPU: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Ram: 32671 MB,
GPU Information:
NVIDIA GeForce RTX 3060 - 32.0.15.6094
Screen: 1920x1080
Temp Dir: C:\Users\dvt-salon\AppData\Local\Temp\
Install Dir: C:\Users\dvt-salon\Downloads\HandBrake-1.9.0-x86_64-Win_GUI (2)\HandBrake\
Data Dir: C:\Users\dvt-salon\AppData\Roaming\HandBrake
-------------------------------------------
[16:04:52] hb_init: starting libhb thread
# Starting Scan ...
[16:04:52] CPU: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
[16:04:52] - Intel microarchitecture Haswell
[16:04:52] - logical processor count: 12
[16:04:52] Intel Quick Sync Video support: no
[16:04:52] hb_scan: path=Z:\test audio\AAC 5.1 fichier original.mp4, title_index=0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Z:\test audio\AAC 5.1 fichier original.mp4':
Metadata:
major_brand : avc1
minor_version : 0
compatible_brands: isomavc1
creation_time : 2012-05-17T00:54:33.000000Z
Duration: 00:00:46.63, start: 0.000000, bitrate: 188 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 800x600, 26 kb/s, 8 fps, 8 tbr, 8 tbn (default)
Metadata:
creation_time : 2012-05-17T00:54:33.000000Z
handler_name : GPAC ISO Video Handler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, 5.1, fltp, 159 kb/s (default)
Metadata:
creation_time : 2012-05-17T00:56:13.000000Z
handler_name : GPAC ISO Audio Handler
vendor_id : [0][0][0][0]
[16:04:52] scan: decoding previews for title 1
[16:04:52] scan: audio 0x1: aac, rate=44100Hz, bitrate=159999 Unknown (HE-AAC, 5.1 ch, 159 kbps)
[16:04:53] scan: 10 previews, 800x600, 8.000 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 1:1, color profile: 1-1-1, chroma location: left
[16:04:53] scan: supported video decoders: avcodec hwaccel
[16:04:53] libhb: scan thread found 1 valid title(s)
# Scan Finished ...
Aac 5.1 Fichier Original-1_encode_01.26.2025 16-05-06 :
HandBrake 1.9.0 (2024120100)
OS: Microsoft Windows NT 10.0.19045.0
CPU: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Ram: 32671 MB,
GPU Information:
NVIDIA GeForce RTX 3060 - 32.0.15.6094
Screen: 1920x1080
Temp Dir: C:\Users\dvt-salon\AppData\Local\Temp\
Install Dir: C:\Users\dvt-salon\Downloads\HandBrake-1.9.0-x86_64-Win_GUI (2)\HandBrake\
Data Dir: C:\Users\dvt-salon\AppData\Roaming\HandBrake
-------------------------------------------
# Starting Encode ...
[16:05:06] base preset: hdlight 1080p v2
[16:05:06] Remote Process started with Process ID: 10100 using port: 8037. Max Allowed Instances: 1
[16:05:07] Worker: Starting HandBrake Engine ...
[16:05:07] Worker: Parent Process Id 11292
[16:05:07] Worker: Starting Web Server on port 8037 ...
[16:05:07] Worker: Starting Listener: 1
[16:05:07] Worker: Server Started
[16:05:07] Worker: Disconnected worker monitoring enabled!
[16:05:07] Compile-time hardening features are enabled
[16:05:07] nvenc: version 12.2 is available
[16:05:07] nvdec: is available
[16:05:07] CUDA Version: 8.6
[16:05:07] vcn: not available on this system
[16:05:07] qsv: not available on this system
[16:05:07] hb_init: starting libhb thread
[16:05:07] Starting work at: Sun Jan 26 16:05:07 2025
[16:05:07] 1 job(s) to process
[16:05:07] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 384,
"DRC": 0,
"Encoder": "ac3",
"Gain": 0,
"Mixdown": 7,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [],
"FallbackEncoder": "av_aac"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapitre1"
}
],
"ChapterMarkers": true,
"AlignAVStart": false,
"File": "C:\\Users\\dvt-salon\\Videos\\Aac 5.1 Fichier Original-1.mkv",
"Options": {
"IpodAtom": false,
"Optimize": false
},
"Mux": "av_mkv"
},
"Filters": {
"FilterList": [
{
"ID": 6,
"Settings": {
"mode": "7"
}
},
{
"ID": 4,
"Settings": {
"block-height": "16",
"block-thresh": "80",
"block-width": "16",
"filter-mode": "1",
"mode": "0",
"motion-thresh": "2",
"spatial-metric": "2",
"spatial-thresh": "3"
}
},
{
"ID": 20,
"Settings": {
"crop-bottom": "0",
"crop-left": "0",
"crop-right": "0",
"crop-top": "0",
"height": "600",
"width": "800"
}
},
{
"ID": 11,
"Settings": {
"mode": "2",
"rate": "27000000/900000"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 1
},
"Title": 1,
"Path": "Z:\\test audio\\AAC 5.1 fichier original.mp4",
"HWDecode": 4,
"KeepDuplicateTitles": false
},
"Subtitle": {
"Search": {
"Burn": false,
"Default": false,
"Enable": false,
"Forced": false
},
"SubtitleList": []
},
"Video": {
"Encoder": "x264",
"Level": "4.0",
"MultiPass": true,
"Turbo": true,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "veryfast",
"Profile": "main",
"Quality": 24,
"QSV": {
"Decode": false
},
"HardwareDecode": 0
}
}
[16:05:07] CPU: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
[16:05:07] - Intel microarchitecture Haswell
[16:05:07] - logical processor count: 12
[16:05:07] Intel Quick Sync Video support: no
[16:05:07] hb_scan: path=Z:\test audio\AAC 5.1 fichier original.mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Z:\test audio\AAC 5.1 fichier original.mp4':
Metadata:
major_brand : avc1
minor_version : 0
compatible_brands: isomavc1
creation_time : 2012-05-17T00:54:33.000000Z
Duration: 00:00:46.63, start: 0.000000, bitrate: 188 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 800x600, 26 kb/s, 8 fps, 8 tbr, 8 tbn (default)
Metadata:
creation_time : 2012-05-17T00:54:33.000000Z
handler_name : GPAC ISO Video Handler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, 5.1, fltp, 159 kb/s (default)
Metadata:
creation_time : 2012-05-17T00:56:13.000000Z
handler_name : GPAC ISO Audio Handler
vendor_id : [0][0][0][0]
[16:05:08] scan: decoding previews for title 1
[16:05:08] scan: audio 0x1: aac, rate=44100Hz, bitrate=159999 Unknown (HE-AAC, 5.1 ch, 159 kbps)
[16:05:08] scan: 10 previews, 800x600, 8.000 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 1:1, color profile: 1-1-1, chroma location: left
[16:05:08] scan: supported video decoders: avcodec hwaccel
[16:05:08] libhb: scan thread found 1 valid title(s)
[16:05:08] Starting Task: Encoding Pass
[16:05:08] work: skipping crop/scale filter
[16:05:08] work: track 1, dithering not supported by codec
[16:05:08] work: only 1 chapter, disabling chapter markers
[16:05:08] job configuration:
[16:05:08] * source
[16:05:08] + Z:\test audio\AAC 5.1 fichier original.mp4
[16:05:08] + title 1, chapter(s) 1 to 1
[16:05:08] + container: mov,mp4,m4a,3gp,3g2,mj2
[16:05:08] + data rate: 188 kbps
[16:05:08] * destination
[16:05:08] + C:\Users\dvt-salon\Videos\Aac 5.1 Fichier Original-1.mkv
[16:05:08] + container: Matroska (libavformat)
[16:05:08] * video track
[16:05:08] + decoder: h264 8-bit (yuv420p)
[16:05:08] + bitrate 26 kbps
[16:05:08] + filters
[16:05:08] + Comb Detect (mode=0:spatial-metric=2:motion-thresh=2:spatial-thresh=3:filter-mode=1:block-thresh=80:block-width=16:block-height=16)
[16:05:08] + Decomb (mode=39)
[16:05:08] + Framerate Shaper (mode=2:rate=27000000/900000)
[16:05:08] + frame rate: 8.000 fps -> peak rate limited to 30.000 fps
[16:05:08] + Output geometry
[16:05:08] + storage dimensions: 800 x 600
[16:05:08] + pixel aspect ratio: 1 : 1
[16:05:08] + display dimensions: 800 x 600
[16:05:08] + encoder: H.264 (libx264)
[16:05:08] + preset: veryfast
[16:05:08] + profile: main
[16:05:08] + level: 4.0
[16:05:08] + quality: 24.00 (RF)
[16:05:08] + color profile: 1-1-1
[16:05:08] + color range: tv
[16:05:08] + chroma location: left
[16:05:08] * audio track 1
[16:05:08] + decoder: Unknown (HE-AAC, 5.1 ch, 159 kbps) (track 1, id 0x1)
[16:05:08] + bitrate: 159 kbps, samplerate: 44100 Hz
[16:05:08] + mixdown: 5.1 Channels
[16:05:08] + encoder: AC3 (libavcodec)
[16:05:08] + bitrate: 384 kbps, samplerate: 44100 Hz
[16:05:08] sync: expecting 373 video frames
[16:05:08] encx264: min-keyint: 8, keyint: 80
[16:05:08] encx264: encoding at constant RF 24.000000
[16:05:08] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 UnalignedStack
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[16:05:08] sync: first pts video is 0
[16:05:08] sync: "Chapitre1" (1) at frame 1 time 0
[16:05:08] sync: first pts audio 0x1 is 0
[16:05:09] reader: done. 1 scr changes
[16:05:09] work: average encoding speed for job is 0.000000 fps
[16:05:09] comb detect: heavy 0 | light 0 | uncombed 373 | total 373
[16:05:09] decomb: deinterlaced 0 | blended 0 | unfiltered 373 | total 373
[16:05:09] vfr: 373 frames output, 0 dropped and 0 duped for CFR/PFR
[16:05:09] vfr: lost time: 0 (0 frames)
[16:05:09] vfr: gained time: 0 (0 frames) (0 not accounted for)
[16:05:09] aac-decoder done: 1004 frames, 0 decoder errors
[16:05:09] h264-decoder done: 373 frames, 0 decoder errors
[16:05:09] sync: got 373 frames, 373 expected
[16:05:09] sync: framerate min 8.000 fps, max 8.000 fps, avg 8.000 fps
x264 [info]: frame I:5 Avg QP: 7.87 size: 17957
x264 [info]: frame P:93 Avg QP:13.45 size: 987
x264 [info]: frame B:275 Avg QP:11.86 size: 50
x264 [info]: consecutive B-frames: 1.3% 0.0% 3.2% 95.4%
x264 [info]: mb I I16..4: 83.3% 0.0% 16.7%
x264 [info]: mb P I16..4: 1.4% 0.0% 0.5% P16..4: 0.3% 0.1% 0.0% 0.0% 0.0% skip:97.7%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.4% 0.0% 0.0% direct: 0.0% skip:99.5% L0:72.6% L1:27.3% BI: 0.2%
x264 [info]: coded y,uvDC,uvAC intra: 15.3% 12.8% 10.4% inter: 0.0% 0.1% 0.1%
x264 [info]: i16 v,h,dc,p: 87% 9% 3% 1%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 21% 23% 3% 9% 6% 6% 6% 7%
x264 [info]: i8c dc,h,v,p: 89% 5% 5% 1%
x264 [info]: Weighted P-Frames: Y:1.1% UV:1.1%
x264 [info]: kb/s:33.50
[16:05:09] mux: track 0, 373 frames, 195037 bytes, 33.38 kbps, fifo 512
[16:05:09] mux: track 1, 1338 frames, 2236916 bytes, 382.79 kbps, fifo 2048
[16:05:09] Finished work at: Sun Jan 26 16:05:09 2025
[16:05:09] libhb: work result = 0
# Job Completed!
What Operating System are you running?
windows 10
What version of HandBrake are you running?
1.9.0
Where did you download HandBrake from?
Metadata
Metadata
Assignees
Labels
No labels
Activity
hnsteyding commentedon Jan 26, 2025
Please post HandBrake log file.
devildant commentedon Jan 26, 2025
Hi, i post the log, I didn't have put them because I don't have any errors in handbrake, just that the videos are not readable on firestick 4k
devildant commentedon Jan 26, 2025
same result with lc AAC or HE AAC 5.1 to AC3 5.1
sr55 commentedon Jan 26, 2025
Both files you posted appear to be valid and play correctly so this would appear to be an issue with the fire tv decoder or demuxer.
devildant commentedon Jan 26, 2025
yes I have no problem reading anywhere other than on firestick, that's why I mentioned it in the title. on the firestick side I tried to see with them... but well it goes round in circles, amazon it's impossible to go back to them... and the same file encoded with ffmpeg is readable on firestick in ac3 5.1
sr55 commentedon Jan 26, 2025
HandBrake also uses libavcodec (ffmpeg) for ac3 encoding but there are literally dozens of reasons why it may have a problem. It could be something silly like they need an optional field specified.
Have you tried other software than plex on the stick to see if it plays back?
I did run your file though a validator that confirms the containers good and tested the audio in a number of players / devices and everything plays fine without any warnings or errors.
Unfortunately, I don't think there is an awful lot we can do about this without feedback from upstream and even then, it may not be anything for us to act on.
devildant commentedon Jan 26, 2025
I tested the same video under plex with an nvidia shield and there was no problem... the problem does not seem to come from plex. and currently I cannot test under another player :( it would be possible to try to compare the video encoded with ffmpeg, and that with handbrake to try to see if there is a difference? I tried with media info but nothing meaningful
devildant commentedon Jan 26, 2025
test audio.zip
2 fils in archive
ACC 5.1 TO AC3 5.1 with ffmpeg.mkv
ACC 5.1 TO AC3 5.1 with handbrake.mkv
devildant commentedon Jan 26, 2025
i exctract the audio
test audio.zip
devildant commentedon Jan 26, 2025
i tried to pass the audio file to ffprobe -show_frames -show_streams -show_format -print_format json ...
audio scan.zip
https://www.diffchecker.com/jxBy4UQF/
left ffmpeg <=> right handbrake
sr55 commentedon Jan 26, 2025
Nothing of significance. I'll bet it's a container, not an audio track problem.
devildant commentedon Jan 26, 2025
I also reproduce the problem with AAC 5.1 to EAC3 5.1 on nvidia shield
i try to use vlc in shield and no pb, but with plex and video encode from AAC to EAC3, read impossible
plex uses exoplayer which is embedded in android tv, and it crashes when trying to play the encoded video with handbrake (i have stacktrace in client plex log)
plex log :
devildant commentedon Jan 26, 2025
good point, I remuxed the video with mkvtoolnix, which does not work in EAC3 encode by handbrake, and the remuxed video works
this could correspond to this warning lever in the log plex:
01-26 20:40:02.524 i: [FFmpeg] [WARN] [matroska,webm @ 0x28b4339f70] Could not find codec parameters for stream 1 (Audio: eac3, 5.1(side), s16p): unspecified sample rateWould a fix be possible?
ps: thank you for your time :)
devildant commentedon Jan 26, 2025
devildant commentedon Jan 26, 2025
test audio.zip
1 remaining item
galad87 commentedon Jan 30, 2025
Maybe those players want an empty codec private? Let's check the Matroska specs.
libhb: do not always set audio extradata
galad87 commentedon Jan 30, 2025
Try the build on https://github.com/HandBrake/HandBrake/actions/runs/13051999650?pr=6590
devildant commentedon Jan 30, 2025
Hi, good job it's work:
475331212_9267724473283730_3822244738642719174_n.mp4
for my personal culture, I do not understand the modification.
Shouldn't the need_extradata also be on AC3 and EAC3?
because the switch is based on audio->config.out.codec, therefore the output codec
although it works I don't understand why ^^
devildant commentedon Jan 30, 2025
I will have feedback this evening on the firestick, I was able to test on the shield in AAC 5.1 to EAC3, it's OK, but I confirm this evening with the stick for AAC 5.1 to AC3
galad87 commentedon Jan 30, 2025
AC3 and EAC3 don't need extradata in MKV, the issue was that HandBrake wrote it, and the some players tried to read and parse it even they didn't need to.
devildant commentedon Jan 30, 2025
Thank you very much for the explanation, I see
I will confirm this evening if the problem is resolved on the firestick, but I am confident :p
sr55 commentedon Jan 30, 2025
These type of devices often use ffmpeg for demuxing so I'll bet it's just a really old version from the dark ages.
devildant commentedon Jan 30, 2025
it's true, plex uses the system functions... but yes it's android tv 10 or 11, and as we are dependent on the goodwill of the manufacturers for updates... these boxes remain very comfortable, but it gets stuck quite a bit on updates... and it's impossible to update elements like ffmpeg for the user without root access
devildant commentedon Jan 30, 2025
@galad87
Perfect on shield and firestick with aac 5.1 to ac3 5.1 and aac 5.1 to eac3 5.1, thx for the fix and your work
devildant commentedon Jan 30, 2025
@sr55 thx for your investigation and analyse
devildant commentedon Jan 30, 2025
tell me if you want me to close the issue :)
sr55 commentedon Jan 30, 2025
It'll close automatically once the commit goes in. Thanks for the feedback
libhb: do not always set audio extradata