Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specifying decoder and its options #2327

Closed
wants to merge 1 commit into from

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Apr 11, 2022

This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to ffmpeg's -c:v foo and -c:a foo options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.


Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to AVCodecContextPtr, which initializes the actual decoder implementation (AVCodecContext.)

@mthrok mthrok marked this pull request as ready for review April 11, 2022 16:38
@mthrok mthrok force-pushed the ffmpeg-decoder-option branch from becb516 to 7365ce2 Compare April 12, 2022 05:54
@mthrok mthrok mentioned this pull request Apr 12, 2022
7 tasks
@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

mthrok added a commit to mthrok/audio that referenced this pull request Apr 13, 2022
Summary:
This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.

 ---

Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)

Pull Request resolved: pytorch#2327

Differential Revision: D35626904

Pulled By: mthrok

fbshipit-source-id: 6d23477f0a459b139c15d62a4ed4e4fad5ed9c99
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D35626904

@mthrok mthrok force-pushed the ffmpeg-decoder-option branch from 7365ce2 to cfca44b Compare April 13, 2022 22:28
mthrok added a commit to mthrok/audio that referenced this pull request Apr 14, 2022
Summary:
This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.

 ---

Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)

Pull Request resolved: pytorch#2327

Differential Revision: D35626904

Pulled By: mthrok

fbshipit-source-id: 94ddbf5f1c3beb01194675d2792900cf873922f5
@mthrok mthrok force-pushed the ffmpeg-decoder-option branch from cfca44b to 39c9213 Compare April 14, 2022 00:02
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D35626904

mthrok added a commit to mthrok/audio that referenced this pull request Apr 14, 2022
Summary:
This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.

 ---

Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)

Pull Request resolved: pytorch#2327

Differential Revision: D35626904

Pulled By: mthrok

fbshipit-source-id: dec2b67fdac390297fb7449d05ca35c219234370
@mthrok mthrok force-pushed the ffmpeg-decoder-option branch from 39c9213 to 488af4c Compare April 14, 2022 00:27
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D35626904

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D35626904

mthrok added a commit to mthrok/audio that referenced this pull request Apr 14, 2022
Summary:
This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.

 ---

Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)

Pull Request resolved: pytorch#2327

Differential Revision: D35626904

Pulled By: mthrok

fbshipit-source-id: f1301dd09e3259a928fd82cbc0431739f8a16c89
@mthrok mthrok force-pushed the ffmpeg-decoder-option branch 2 times, most recently from 7de1988 to 3409a41 Compare April 14, 2022 05:05
@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mthrok mthrok force-pushed the ffmpeg-decoder-option branch from 3409a41 to 63275e5 Compare April 14, 2022 06:53
mthrok added a commit to mthrok/audio that referenced this pull request Apr 14, 2022
Summary:
This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.

 ---

Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)

Pull Request resolved: pytorch#2327

Differential Revision: D35626904

Pulled By: mthrok

fbshipit-source-id: b411862049affae1e798a639747080bc1c64dd01
@mthrok mthrok force-pushed the ffmpeg-decoder-option branch from 63275e5 to 36e9100 Compare April 14, 2022 06:59
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D35626904

Summary:
This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.

 ---

Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)

Pull Request resolved: pytorch#2327

Differential Revision: D35626904

Pulled By: mthrok

fbshipit-source-id: 1840dd8932b4c2d62b3e3eaa0de4c50af371547b
@mthrok mthrok force-pushed the ffmpeg-decoder-option branch from 36e9100 to 121a611 Compare April 14, 2022 07:06
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D35626904

@github-actions
Copy link

Hey @mthrok.
You merged this PR, but labels were not properly added. Please add a primary and secondary label (See https://github.com/pytorch/audio/blob/main/.github/process_commit.py)

@mthrok mthrok deleted the ffmpeg-decoder-option branch April 14, 2022 16:19
xiaohui-zhang pushed a commit to xiaohui-zhang/audio that referenced this pull request May 4, 2022
Summary:
This commit adds support to specify decoder to Streamer's add stream method.
This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.

This allows to override the decoder codec and/or specify the option of
the decoder.

This change allows to specify Nvidia NVDEC codec for supported formats,
which uses dedicated hardware for decoding the video.

 ---

Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)

Pull Request resolved: pytorch#2327

Reviewed By: carolineechen

Differential Revision: D35626904

Pulled By: mthrok

fbshipit-source-id: a115ed548624e53c16bacfecff5aa6c9d4e8bede
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants