hr3lxphr6j / bililive-go

一个直播录制工具
GNU General Public License v3.0
3.83k stars 493 forks source link

猫耳直播没有声音 #474

Closed supercell532 closed 1 year ago

supercell532 commented 1 year ago

程序版本

latest

所使用的 config 文件的内容

No response

程序 log

No response

自由描述

rt,录制下来的文件没有声音

kira1928 commented 1 year ago

贴一下

程序版本号 所使用的 config 文件的内容 程序 log

supercell532 commented 1 year ago

版本 v0.7.12

config rpc: enable: true bind: 127.0.0.1:8080 debug: false interval: 10 out_put_path: ./ log: out_put_folder: ./ save_last_log: true save_every_log: false feature: use_native_flv_parser: false remove_symbol_other_character: false live_rooms:

log文件内容: time="2023-06-14 17:15:59" level=info msg="BiliLive-go Version: v0.7.12 Link Start" time="2023-06-14 17:16:00" level=info msg="Server start at 127.0.0.1:8080" time="2023-06-14 17:16:11" level=error msg="this live has a listener" url="https://fm.missevan.com/live/128351929" time="2023-06-14 17:16:16" level=error msg="this live has a listener" url="https://fm.missevan.com/live/868868512" time="2023-06-14 20:04:32" level=error msg="failed to load room info" error="http2: server sent GOAWAY and closed the connection; LastStreamID=1999, ErrCode=NO_ERROR, debug=\"\"" url="https://live.douyin.com/940031487128" time="2023-06-14 22:57:56" level=info msg="Live Start" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:56" level=info msg="Record Start" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:57" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:57" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:57" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:58" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:58" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:59" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:59" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:59" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:57:59" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:58:00" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 22:58:00" level=info msg="exit status 1" host="桥桥oo" room="3D 温柔乡" time="2023-06-14 23:10:19" level=info msg="Live Start" host="仙仙い" room="【3D】姐姐の温柔治愈" time="2023-06-14 23:10:19" level=info msg="Record Start" host="仙仙い" room="【3D】姐姐の温柔治愈" time="2023-06-14 23:39:22" level=info msg="Live Start" host="奶橘尢🍊(声控助眠💤)" room="3D没有技术全是感情" time="2023-06-14 23:39:22" level=info msg="Record Start" host="奶橘尢🍊(声控助眠💤)" room="3D没有技术全是感情" time="2023-06-14 23:46:23" level=error msg="failed to load room info" error="stream error: stream ID 1375; INTERNAL_ERROR; received from peer" url="https://live.douyin.com/349284730993" time="2023-06-15 01:24:08" level=info msg="Live Start" host="声控女友-水水" room="声控轻语" time="2023-06-15 01:24:08" level=info msg="Record Start" host="声控女友-水水" room="声控轻语" time="2023-06-15 01:27:46" level=info msg="Live end" host="声控女友-水水" room="声控轻语" time="2023-06-15 01:27:46" level=info msg="Record End" host="声控女友-水水" room="声控轻语" time="2023-06-15 01:27:46" level=info msg="" host="声控女友-水水" room="声控轻语" time="2023-06-15 01:32:11" level=info msg="Live end" host="桥桥oo" room="3D 温柔乡" time="2023-06-15 01:32:11" level=info msg="Record End" host="桥桥oo" room="3D 温柔乡" time="2023-06-15 01:32:17" level=info msg="" host="桥桥oo" room="3D 温柔乡" time="2023-06-15 01:38:06" level=info msg="Live Start" host="声控女友-水水" room="声控轻语" time="2023-06-15 01:38:06" level=info msg="Record Start" host="声控女友-水水" room="声控轻语" time="2023-06-15 02:00:50" level=info msg="Live end" host="仙仙い" room="【3D】姐姐の温柔治愈" time="2023-06-15 02:00:50" level=info msg="Record End" host="仙仙い" room="【3D】姐姐の温柔治愈" time="2023-06-15 02:00:56" level=info msg="" host="仙仙い" room="【3D】姐姐の温柔治愈" time="2023-06-15 02:08:57" level=info msg="Live end" host="声控女友-水水" room="声控轻语" time="2023-06-15 02:08:57" level=info msg="Record End" host="声控女友-水水" room="声控轻语" time="2023-06-15 02:09:03" level=info msg="" host="声控女友-水水" room="声控轻语" time="2023-06-15 02:31:30" level=info msg="Live end" host="奶橘尢🍊(声控助眠💤)" room="3D没有技术全是感情" time="2023-06-15 02:31:30" level=info msg="Record End" host="奶橘尢🍊(声控助眠💤)" room="3D没有技术全是感情" time="2023-06-15 02:32:27" level=info msg="" host="奶橘尢🍊(声控助眠💤)" room="3D没有技术全是感情" time="2023-06-15 02:58:30" level=error msg="failed to load room info" error="http2: server sent GOAWAY and closed the connection; LastStreamID=1999, ErrCode=NO_ERROR, debug=\"\"" url="https://live.douyin.com/349284730993" time="2023-06-15 07:01:54" level=error msg="failed to load room info" error="stream error: stream ID 1847; INTERNAL_ERROR; received from peer" url="https://live.douyin.com/349284730993" time="2023-06-15 10:27:57" level=error msg="failed to load room info" error="stream error: stream ID 749; INTERNAL_ERROR; received from peer" url="https://live.douyin.com/349284730993" time="2023-06-15 12:05:39" level=error msg="failed to load room info" error="http2: server sent GOAWAY and closed the connection; LastStreamID=1999, ErrCode=NO_ERROR, debug=\"\"" url="https://live.douyin.com/940031487128"

supercell532 commented 1 year ago

更正,录制的文件是flv格式。使用potplayer不能正常播放

supercell532 commented 1 year ago

使用ffmpeg -i 可以提取出mp3格式的音频

kira1928 commented 1 year ago

这个PR修复了这个问题,但目前修复后的版本还没有发布 release 版。 预计会在下一个版本的 0.7.13 中修复这个问题。修复方式为以后录制的文件格式为 *.aac,只录制声音。我印象中测试的时候录制下来的 aac 是可以在 potplayer 中播放的。 新版本可能在这周末发布。

kira1928 commented 1 year ago

cc @DUYA112233

DUYA112233 commented 1 year ago

potplayer自带的解码器无法处理现在此程序录制的仅有音轨的flv,若使用LAV作为解码器可正常播放,下一版程序将会把猫耳输出文件格式改为aac 另外,flv中音轨为aac,若转换为mp3是有损质量的,请使用此命令进行flv->aac的手动转换: ffmpeg -i {input_file.flv} -vn -acodec copy {output_file.aac} 也可以尝试我的自用python脚本:

import os
import fnmatch
import subprocess

# 遍历指定目录及其子目录中的所有flv文件
for root, dirnames, filenames in os.walk('.'):
    for filename in fnmatch.filter(filenames, '*.flv'):
        # 提取 AAC
        input_file = os.path.join(root, filename)
        print(input_file)
        output_file = os.path.join(root, os.path.splitext(filename)[0] + '.aac')
        subprocess.call(['ffmpeg', '-i', input_file, '-vn', '-acodec', 'copy', '-y', output_file])
        # 删除源文件
        os.remove(input_file)

将此脚本放在“猫耳”文件夹下,运行后将自动遍历所有子文件夹中的flv并转换为aac

kira1928 commented 1 year ago

0.7.13版本发布了。 你可以更新到最新版试试看。