Skip to content

Conversation

@Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Jun 26, 2025

using YoutubeExplode;
using YoutubeExplode.Converter;

var youtube = new YoutubeClient();
var videoUrl = "https://youtube.com/watch?v=u_yIGGhubZs";

await youtube.Videos.DownloadAsync(videoUrl, "video.mp4", o => o
    // Set custom variables
    .SetEnvironmentVariable("FFREPORT", "file=foo.log")
);

@Tyrrrz Tyrrrz requested a review from Copilot June 26, 2025 16:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the ability to pass custom environment variables to FFmpeg.

  • Updated FFmpeg to accept and utilize a dictionary of environment variables.
  • Modified ConversionRequestBuilder and ConversionRequest to include environment variables configuration.
  • Added tests to validate the custom environment variables functionality.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
YoutubeExplode.Tests/StreamSpecs.cs Removed an unused using directive for better code clarity.
YoutubeExplode.Converter/FFmpeg.cs Updated the FFmpeg constructor and execution call to support environment variables.
YoutubeExplode.Converter/ConversionRequestBuilder.cs Added a SetEnvironmentVariable method and introduced a dictionary for environment variables.
YoutubeExplode.Converter/ConversionRequest.cs Modified constructors to accept and expose environment variables.
YoutubeExplode.Converter/ConversionExtensions.cs Updated instantiation of FFmpeg to forward environment variables.
YoutubeExplode.Converter.Tests/GeneralSpecs.cs Renamed an integration test for improved clarity.
YoutubeExplode.Converter.Tests/EnvironmentSpecs.cs Added new tests to ensure proper handling of custom environment variables.

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.

2 participants