Skip to content

Add PCM passthru and encoding - #7623

Merged
galad87 merged 3 commits into
HandBrake:masterfrom
Nomis101:pcm
Feb 7, 2026
Merged

galad87 merged 3 commits into
HandBrake:masterfrom
Nomis101:pcm

Conversation

@Nomis101

@Nomis101 Nomis101 commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Description of Change:
Add PCM passthru and PCM encoding for all 3 platforms. It misses a checkbox for PCM passthru in AudioDefaults.xib‎ because I didn't know where to put it. This will fix #950.
I have tested PCM passthru with a video file of my Sony camera (pcm_s24be audio stream) and encoding to 16-bit and 24-bit PCM with different samples.

Tested on:

  • Windows 10+ (via MinGW)
  • macOS 10.13+
  • Ubuntu Linux

@galad87

galad87 commented Feb 5, 2026 •

Copy link
Copy Markdown
Contributor

The bitrate control should be disable like for FLAC and ALAC.

It looks like something is wrong when muxing to MP4, QuickTime Player ignores the track:

user@Mac ~ % avmediainfo bbb_sunflower_1080p_30fps_normal.mp4 
Asset: bbb_sunflower_1080p_30fps_normal.mp4
Duration: 84.767 seconds (84767/1000)
Track count: 1
Track 1: Video 'vide'
	Enabled: Yes
	Format Description 1:
		Format: HEVC 'hvc1'
		Dimensions: 1920 x 1080
		Encoded Pixels: 1920 x 1080
		Presentation Dimensions: 1920 x 1080
	System support for decoding this track: Yes
	Data size: 20755062 bytes
	Media time scale: 90000
	Duration: 84.767 seconds
	Estimated data rate: 1958.795 kbit/s
	Nominal frame rate: 30.000 fps
	Minimum sample duration: 3000/90000 seconds
	Frame reordering required
	1 segment present
	Index   Media Start  Media Duration   Track Start  Track Duration 
	    1  00:00:00.067    00:01:24.767  00:00:00.000    00:01:24.767

Movie analyzed with 3 errors.
Error in Track ID 2 'soun' atom 'minf'. ASBD mBytesPerPacket 2 expected to match common sample size 2048 from the sample table. Atom: 'minf' Offset: 29058961
Error in Track ID 2 'soun' ASBD mBytesPerPacket does not match the common sample size.
Error in Track ID 2 'soun' Omitting a track that encountered an error during atom parsing.

Either libavformat is setting some wrong values, or Apple software can't read PCM stored this way.

@Nomis101

Nomis101 commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

I will investigate.

@Nomis101

Nomis101 commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

Quicktime should be working now.

@galad87

galad87 commented Feb 6, 2026 •

Copy link
Copy Markdown
Contributor

Looks good. I tested some multi-channels files with different channels order, and the output was correct.

@galad87
galad87 merged commit 9f46de1 into HandBrake:master Feb 7, 2026
7 checks passed
@galad87

galad87 commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

The Windows UI might need an additional tweak or two. I'll merge this for now.

@Nomis101

Nomis101 commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for merging and adding the macOS checkbox.

sr55 added a commit that referenced this pull request Feb 7, 2026
@sr55

sr55 commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Couple of minor fixes for the Windows UI pushed

ryancraigdavis pushed a commit to ryancraigdavis/HandBrake that referenced this pull request Feb 7, 2026
ryancraigdavis pushed a commit to ryancraigdavis/HandBrake that referenced this pull request Feb 7, 2026
@Nomis101
Nomis101 deleted the pcm branch February 7, 2026 22:39
@mryanprice

Copy link
Copy Markdown

Thanks @Nomis101 and @galad87 (and all the other contributors)! I've been hoping for this feature for a long time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Feature request: PCM audio output (Inc Passthrough)

4 participants