We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ef8a8f commit dc86a8cCopy full SHA for dc86a8c
src/torchcodec/_core/Encoder.cpp
@@ -674,7 +674,9 @@ void VideoEncoder::initializeEncoder(
674
validatePixelFormat(*avCodec, videoStreamOptions.pixelFormat.value());
675
} else {
676
const AVPixelFormat* formats = getSupportedPixelFormats(*avCodec);
677
- // Use first listed pixel format as default.
+ // Use first listed pixel format as default (often yuv420p).
678
+ // This is similar to FFmpeg's logic:
679
+ // https://www.ffmpeg.org/doxygen/4.0/decode_8c_source.html#l01087
680
// If pixel formats are undefined for some reason, try yuv420p
681
outPixelFormat_ = (formats && formats[0] != AV_PIX_FMT_NONE)
682
? formats[0]
0 commit comments