aboutsummaryrefslogtreecommitdiffstats
path: root/doc/bitstream_filters.texi
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-03-24 23:24:22 +0100
committerMarton Balint <cus@passwd.hu>2020-05-07 23:12:24 +0200
commit2035620b7cc5a3087b4eb632fba188f89af61541 (patch)
tree211dc534aeced5570771ec4afa3dfaf0ce2349e6 /doc/bitstream_filters.texi
parentd7a0071a44ad31511bb0c59fb09b2f3358c03bfd (diff)
downloadffmpeg-2035620b7cc5a3087b4eb632fba188f89af61541.tar.gz
avcodec/pcm_rechunk_bsf: add bitstream filter to rechunk pcm audio
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'doc/bitstream_filters.texi')
-rw-r--r--doc/bitstream_filters.texi30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
index 9aa2f00296..8a2f55cc41 100644
--- a/doc/bitstream_filters.texi
+++ b/doc/bitstream_filters.texi
@@ -548,6 +548,36 @@ ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv
@section null
This bitstream filter passes the packets through unchanged.
+@section pcm_rechunk
+
+Repacketize PCM audio to a fixed number of samples per packet or a fixed packet
+rate per second. This is similar to the @ref{asetnsamples,,asetnsamples audio
+filter,ffmpeg-filters} but works on audio packets instead of audio frames.
+
+@table @option
+@item nb_out_samples, n
+Set the number of samples per each output audio packet. The number is intended
+as the number of samples @emph{per each channel}. Default value is 1024.
+
+@item pad, p
+If set to 1, the filter will pad the last audio packet with silence, so that it
+will contain the same number of samples (or roughly the same number of samples,
+see @option{frame_rate}) as the previous ones. Default value is 1.
+
+@item frame_rate, r
+This option makes the filter output a fixed number of packets per second instead
+of a fixed number of samples per packet. If the audio sample rate is not
+divisible by the frame rate then the number of samples will not be constant but
+will vary slightly so that each packet will start as close to the frame
+boundary as possible. Using this option has precedence over @option{nb_out_samples}.
+@end table
+
+You can generate the well known 1602-1601-1602-1601-1602 pattern of 48kHz audio
+for NTSC frame rate using the @option{frame_rate} option.
+@example
+ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
+@end example
+
@section prores_metadata
Modify color property metadata embedded in prores stream.