Parabolic icon indicating copy to clipboard operation
Parabolic copied to clipboard

Does not generate a video container when selecting a custom audio ID

Open ACT-KK opened this issue 9 months ago • 1 comments

Does not generate the audio muxing in the video container if a custom audio ID is selected, only the audio is downloaded, not the video stream either. It is not possible to get the debug log in plain text.

I want to download video with m4a (AAC) audio for compatibility reasons. Generally it is the audio ID 140 obtained with the -F parameter of yt-dlp. It happens with any youtube URL.

[debugl Encodings: locale cp1252, fs utf-8, pref cp1252, out cp1252 (No VT), error cp1252 (No VT), screen cp1252 (No VT) [debugl yt-dlp version [email protected] from yt-dlp/yt-dlp [4985a4041] (win_exe) [debugl Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.O.19044-SPO (OpenSSL 1.1.1t 7 Feb 2023) [debugl exe versions: ffmpeg n7.1-184-gdc07f98934-20250130 (setts)r ffprobe n7.1-184-gdc07f98934-20250130 [debugl Optional libraries: Cryptodome-3.21.Or brotli-1.1.0, certifi-2025.01.31, curl_cffi-O.5.10, mutagen-l.47.0, requests-2.32.3r sqlite3-3.40.1, urllib3-2.3.0r websockets-15.0

https://github.com/user-attachments/assets/cc596a53-996b-413a-b935-c6fc8d0673ef

ACT-KK avatar Mar 05 '25 02:03 ACT-KK

#include <cstdlib> // For system()

void downloadVideoAndAudio(const std::string& videoId, const std::string& outputFileName) {
    std::string videoFile = "video.mp4";
    std::string audioFile = "audio.mp3";

    // Construct yt-dlp commands for video and audio downloads
    std::string videoCommand = "yt-dlp -f bestvideo -o " + videoFile + " " + videoId;
    std::string audioCommand = "yt-dlp -f bestaudio -o " + audioFile + " " + videoId;

    // Download video
    std::cout << "Downloading video..." << std::endl;
    int videoStatus = std::system(videoCommand.c_str());
    if (videoStatus != 0) {
        std::cerr << "Error downloading video!" << std::endl;
        return;
    }

    // Download audio
    std::cout << "Downloading audio..." << std::endl;
    int audioStatus = std::system(audioCommand.c_str());
    if (audioStatus != 0) {
        std::cerr << "Error downloading audio!" << std::endl;
        return;
    }

    // Merge video and audio using ffmpeg
    std::cout << "Merging video and audio into " << outputFileName << "..." << std::endl;
    std::string mergeCommand = "ffmpeg -i " + videoFile + " -i " + audioFile + " -c copy " + outputFileName;
    int mergeStatus = std::system(mergeCommand.c_str());
    if (mergeStatus != 0) {
        std::cerr << "Error merging video and audio!" << std::endl;
        return;
    }

    std::cout << "Done! Output saved to " << outputFileName << std::endl;
}

int main() {
    std::string videoId = "<VIDEO_ID>"; // Replace with actual video ID or URL
    std::string outputFileName = "output.mp4";

    downloadVideoAndAudio(videoId, outputFileName);

    return 0;
}

ACT-KK avatar Mar 08 '25 03:03 ACT-KK

Ah I found the issue - a fix will be released soon

nlogozzo avatar May 06 '25 10:05 nlogozzo

Parabolic V2025.5.1 is here with a fix for this.

nlogozzo avatar May 06 '25 18:05 nlogozzo

The problem persists on my machine. Version 2025.5.1. This happens when Video (generic) is selected.

Francehelder avatar May 08 '25 04:05 Francehelder

This happens when Video (generic) is selected.

Ah yes, found the fix!

nlogozzo avatar May 08 '25 10:05 nlogozzo

V2025.5.2 is here with a fix for this issue.

nlogozzo avatar May 11 '25 15:05 nlogozzo

V2025.5.2 is here with a fix for this issue.

Thanks Nick, you're great.

ACT-KK avatar May 11 '25 17:05 ACT-KK