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

BiliBili flac audio of video download failed #1035

Closed
5 of 6 tasks
zjns opened this issue Aug 31, 2023 · 7 comments
Closed
5 of 6 tasks

BiliBili flac audio of video download failed #1035

zjns opened this issue Aug 31, 2023 · 7 comments
Assignees
Labels
bug Something isn't working upstream This is an upstream issue which cannot be solve here

Comments

@zjns
Copy link

zjns commented Aug 31, 2023

Checklist

Describe the bug

On bilibili, people can upload videos that bumpped with flac audio. Only vip member can download that kind videos. Seal can not download those videos.

To Reproduce

No response

Error reports

App version: 1.10.0 (11000)
Device information: Android 13 (API 33)
Supported ABIs: [arm64-v8a, armeabi-v7a, armeabi]
Yt-dlp version: 2023.07.06

URL: https://www.bilibili.com/video/BV15F411k7V6
[debug] Command-line config: ['--no-mtime', '--cookies', '/data/user/0/com.junkfood.seal/cache/cookies.txt', '-v', '--no-playlist', '--concurrent-fragments', '8', '-x', '--embed-metadata', '--embed-thumbnail', '--convert-thumbnails', 'jpg', '--convert-thumbnails', 'png', '--parse-metadata', '%(release_year,upload_date)s:%(meta_date)s', '--parse-metadata', '%(album,title)s:%(meta_album)s', '--write-thumbnail', '-P', '/storage/emulated/0/Download/Seal/Audio', '-P', 'temp:/data/user/0/com.junkfood.seal/cache/tmp', '-o', '%(title).200B [%(id)s].%(ext)s', '--no-cache-dir', '--ffmpeg-location', '/data/app/~~m14M8eIap56HSOZVjXOjpw==/com.junkfood.seal-ACaeDv5Un_waWQ0kAafSsg==/lib/arm64/libffmpeg.so', 'https://www.bilibili.com/video/BV15F411k7V6']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (zip)
[debug] Python 3.8.0 (CPython aarch64 64bit) - Linux-4.19.113-688815-aarch64-with-libc (OpenSSL 1.1.1t 7 Feb 2023, libc)
[debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1
[debug] Optional libraries: Cryptodome-3.17, mutagen-1.46.0, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Searching for '(?P<meta_date>.+)' in '%(release_year,upload_date)s'
[debug] Searching for '(?P<meta_album>.+)' in '%(album,title)s'
[debug] ffmpeg command line: '/data/app/~~m14M8eIap56HSOZVjXOjpw==/com.junkfood.seal-ACaeDv5Un_waWQ0kAafSsg==/lib/arm64/libffmpeg.so' -y -loglevel repeat+info -f image2 -pattern_type none -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/“中元节,听闪灵” 百万级录音棚听《Midnight, The Stars And You》——《闪灵》OST【Hi-Res】 [BV15F411k7V6].jpg' -update 1 -movflags +faststart 'file:/data/user/0/com.junkfood.seal/cache/tmp/“中元节,听闪灵” 百万级录音棚听《Midnight, The Stars And You》——《闪灵》OST【Hi-Res】 [BV15F411k7V6].png'
[debug] Invoking http downloader on "https://xy115x231x140x209xy.mcdn.bilivideo.cn:4483/upgcxcode/90/42/1250934290/1250934290-1-30251.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEqxTEto8BTrNvN0GvT90W5JZMkX_YN0MvXg8gNEV4NC8xNEV4N03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=&uipk=5&nbs=1&deadline=1693453606&gen=playurlv2&os=mcdn&oi=3062570298&trid=00003b814b0a51224316a5c07c9ed3140186u&mid=11188491&platform=pc&upsig=e304db967858351cb5a595cd5b6ee2c4&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&mcdnid=1003147&bvc=vod&nettype=0&orderid=0,3&buvid=909661AE-040C-BD47-FFF9-352488A74E3C46618infoc&build=0&f=u_0_0&agrr=1&bw=61712&logo=A0000001"
[debug] ffmpeg command line: '/data/app/~~m14M8eIap56HSOZVjXOjpw==/com.junkfood.seal-ACaeDv5Un_waWQ0kAafSsg==/lib/arm64/libffmpeg.so' -y -loglevel repeat+info -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/“中元节,听闪灵” 百万级录音棚听《Midnight, The Stars And You》——《闪灵》OST【Hi-Res】 [BV15F411k7V6].m4a' -map 0 -dn -ignore_unknown -vn -acodec copy -write_id3v1 1 -metadata 'title=“中元节,听闪灵” 百万级录音棚听《Midnight, The Stars And You》——《闪灵》OST【Hi-Res】' -metadata date=20230830 -metadata 'description=【闪灵】百万级录音棚听《Midnight, The Stars And You》

音响:真力1234
录音MIC:纽曼149 2支
录音设备:SSL Duality Delta Pro Station + Protools
侵删' -metadata 'synopsis=【闪灵】百万级录音棚听《Midnight, The Stars And You》

音响:真力1234
录音MIC:纽曼149 2支
录音设备:SSL Duality Delta Pro Station + Protools
侵删' -metadata purl=https://www.bilibili.com/video/BV15F411k7V6 -metadata comment=https://www.bilibili.com/video/BV15F411k7V6 -metadata artist=JLRS-jayfm -metadata 'album=“中元节,听闪灵” 百万级录音棚听《Midnight, The Stars And You》——《闪灵》OST【Hi-Res】' -movflags +faststart 'file:/data/user/0/com.junkfood.seal/cache/tmp/“中元节,听闪灵” 百万级录音棚听《Midnight, The Stars And You》——《闪灵》OST【Hi-Res】 [BV15F411k7V6].temp.m4a'
[debug] ffmpeg version 5.1 Copyright (c) 2000-2022 the FFmpeg developers
built with Android (8490178, based on r450784d) clang version 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)
configuration: --prefix=/home/runner/work/build-ffmpeg/build-ffmpeg/build/ffmpeg/arm64-v8a --enable-cross-compile --target-os=android --arch=aarch64 --sysroot=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot --cc=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --cxx=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++ --ld=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --ar=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar --as=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --nm=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm --ranlib=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib --strip=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --extra-cflags='-O3 -fPIC -I/home/runner/work/build-ffmpeg/build-ffmpeg/build/external/arm64-v8a/include' --extra-ldflags='-L/home/runner/work/build-ffmpeg/build-ffmpeg/build/external/arm64-v8a/lib -lm -lm -lm -lm -lz' --enable-shared --disable-static --disable-vulkan --pkg-config=/usr/bin/pkg-config --enable-protocol=https --enable-version3 --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libtwolame --enable-libspeex --enable-libvpx --enable-libwebp --enable-libfreetype --enable-libfribidi --enable-mbedtls --enable-libbluray --enable-libx264
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:/data/user/0/com.junkfood.seal/cache/tmp/“中元节,听闪灵” 百万级录音棚听《Midnight, The Stars And You》——《闪灵》OST【Hi-Res】 [BV15F411k7V6].m4a':
Metadata:
major_brand : iso5
minor_version : 1
compatible_brands: iso5dsmsmsixdash
encoder : Lavf58.29.100
description : Bilibili XCoder v2.0.2
Duration: 00:03:24.80, start: 0.000000, bitrate: 491 kb/s
Stream #0:00x1: Audio: flac (fLaC / 0x43614C66), 48000 Hz, stereo, s32 (24 bit), 10 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
[ipod @ 0xb4000073c5269850] Could not find tag for codec flac in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
Stream mapping:
Stream #0:0 -> #0:0 (copy)

ERROR: Postprocessing: Stream #0:0 -> #0:0 (copy)
Traceback (most recent call last):
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3439, in process_info
replace_info_dict(self.post_process(dl_filename, info_dict, files_to_move))
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3621, in post_process
info = self.run_all_pps('post_process', info, additional_pps=info.get('__postprocessors'))
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3603, in run_all_pps
info = self.run_pp(pp, info)
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3581, in run_pp
files_to_delete, infodict = pp.run(infodict)
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/common.py", line 24, in run
ret = func(self, info, *args, **kwargs)
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/common.py", line 129, in wrapper
return func(self, info)
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/ffmpeg.py", line 711, in run
self.run_ffmpeg_multiple_files(
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/ffmpeg.py", line 329, in run_ffmpeg_multiple_files
return self.real_run_ffmpeg(
File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/ffmpeg.py", line 367, in real_run_ffmpeg
raise FFmpegPostProcessorError(stderr.strip().splitlines()[-1])
yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: Stream #0:0 -> #0:0 (copy)

Screenshots & Screen Records

No response

Additional context

No response

@zjns zjns added bug Something isn't working new issue This issue is not triaged labels Aug 31, 2023
@JunkFood02
Copy link
Owner

Seems like a FFmpeg bug, did you try using custom commands to download this format? I haven't got a membership subscription to reproduce this.

@JunkFood02 JunkFood02 added upstream This is an upstream issue which cannot be solve here and removed new issue This issue is not triaged labels Aug 31, 2023
@zjns
Copy link
Author

zjns commented Sep 1, 2023

Sorry for replying so late. I don't know how to use custom commands. So could you provide a e-mail address? Then I will send you a vip member cookies so you can reproduce the issue.

@JunkFood02
Copy link
Owner

you can contact me at telegram

@zjns
Copy link
Author

zjns commented Apr 4, 2024

可不可以单独添加一个输出格式的选项,我发现现在只要指定格式为mkv(--merge-output-format mkv),就能正常合并flac音频。使用自定义命令模板可以做到这一点但会失去大部分gui,比如分轨选择,所以我想单独加一个选项,提供默认以保持之前版本的行为。

@zjns
Copy link
Author

zjns commented Apr 4, 2024

默认会选择mp4格式,而mp4格式对flac的支持并不好,(报错提示添加-strict -2可以尝试以mp4合并)所以会报错。

@JunkFood02 JunkFood02 self-assigned this Apr 4, 2024
@JunkFood02
Copy link
Owner

Thanks for the input! You can install the CI artifact of this run to test if this workaround works for this case (Settings - Format - Remux video container)

@zjns
Copy link
Author

zjns commented Apr 4, 2024

Bravo! it works perfect now, thanks, this issue should be marked as resolved now.

@zjns zjns closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream This is an upstream issue which cannot be solve here
Projects
None yet
Development

No branches or pull requests

2 participants