【问题标题】:Extracting audio data from FLV and injecting into MP3从 FLV 中提取音频数据并注入 MP3
【发布时间】:2009-10-17 20:21:14
【问题描述】:

我需要从 FLV 中提取音频数据并使用 C# 将其注入 MP3。所以我正在为此寻找一个库或如何使用 rawdata/file 结构。

【问题讨论】:

    标签: c# audio mp3 flv raw-data


    【解决方案1】:

    看看FLVExtract。一个 oss flv 音频流提取器。

    编辑: 感兴趣的文件位于Library 文件夹下。要在您的项目中使用它们,请尝试以下操作:

    using (FLVFile flvFile = new FLVFile(fileName))
    {
        // first param is whether or not to extract audio streams (true)
        // second param is whether or not to extract video streams (false)
        // third param is whether or not to extract timecodes (false)
        // fourth param is the delegate that gets called in case of an overwrite prompt (leave null in case you want to overwrite automatically)
        flvFile.ExtractStreams(true, false, false, null);
    }
    

    【讨论】:

    • 几天前我发现了这个,我查看了源代码,但是非常混乱(我对 C# 有点陌生)。我只是想让 FLV 转 MP3 FLVExtract 比这更复杂。
    • FLV 可以包含除 MP3 之外的其他音频流。所以要么你想提取音频流,要么你想对其进行转码。如果你想提取它,FLVExtractor 是你最好的选择。
    • 如果有帮助,我添加了一些示例代码。图书馆很简单。将库文件包含到您的项目中,并将using JDP; 添加到您要从中调用它的源文件中。
    • 是的,这就是我最终所做的。我第一次看它时,我的意图是简单地获取获取音频所需的代码,这并不简单。但是感谢您的帮助,我只是需要另一种方式来看待它。
    猜你喜欢
    • 2011-04-22
    • 1970-01-01
    • 1970-01-01
    • 2022-08-13
    • 2014-04-16
    • 2010-10-30
    • 1970-01-01
    • 2021-04-13
    • 2011-05-26
    相关资源
    最近更新 更多