Skip to content

Join a Bilibili video .m4s and its audio .m4s into one MP4 #659

Closed

Description

@mogana-E

File extension

.m4s

What makes these files?

https://www.bilibili.com/

What should Filee convert them to?

MP4

Anything else?

是BILIBILI上下载的视频格式,但是这里上传不了,抱歉

Protection

  • These files aren't encrypted or copy-protected (DRM), and I can open them without a password.

Activity

  1. KnifeLemon commented on Oct 27, 2026

    @KnifeLemon
    Owner

    感谢!.m4s 已经在 #603 中加入(最早的请求是 #354),会随下一个版本发布:自带完整文件头(ftyp + moov)的 .m4s 可以直接转成 MP4。

    B站的文件有两点需要确认:

    1. B站通常把画面和声音分成两个 .m4s 文件(一个视频、一个音频)。Filee 目前还不能把这两个合成一个带声音的 MP4。
    2. B站电脑客户端缓存的 .m4s 开头多了一段填充字节,FFmpeg 不能直接识别。

    请告诉我们:文件是用什么下载的(B站电脑客户端、手机 App,还是其他下载工具)?同一个视频是不是有两个 .m4s(一大一小)?文件太大上传不了没关系,先回答这两个问题就可以。


    Thanks! .m4s support was added in #603 (first asked in #354) and ships in the next release: an .m4s that carries its own header (ftyp + moov) converts straight to MP4.

    Two things to check for Bilibili files:

    1. Bilibili usually saves the picture and the sound as two separate .m4s files. Filee can't join those two into one MP4 with sound yet.
    2. .m4s files cached by the Bilibili desktop client start with a few padding bytes, so FFmpeg doesn't recognise them as they are.

    Which program saved your files (the Bilibili desktop client, the phone app, or another downloader)? Is there a pair of .m4s files (one large, one small) for each video? No need to upload the file if it's too big; answers to these two questions are enough for now.

  2. KnifeLemon commented on Oct 28, 2026

    @KnifeLemon
    Owner

    Filee 2.2.0 is out and reads .m4s files: https://github.com/KnifeLemon/Filee/releases/tag/v2.2.0

  3. mogana-E commented on Oct 28, 2026

    @mogana-E
    Author
  4. mogana-E commented on Oct 28, 2026

    @mogana-E
    Author
  5. KnifeLemon commented on Oct 28, 2026

    @KnifeLemon
    Owner

    谢谢确认!用 IDM 下载的 B站视频是一对 .m4s:大的是画面,小的是声音。

    • Filee 2.2.0 可以把每个 .m4s 单独转换:大的转成 MP4 只有画面没有声音,小的可以转成 MP3、M4A 等音频。
    • 把这一对合成一个带声音的 MP4,Filee 现在还做不到。这个 issue 留着跟进这件事:同时选中这两个文件拖到圆环上,合成一个 MP4(不重新编码,所以很快、画质不变)。

    Thanks for checking! Bilibili videos saved with IDM come as a pair of .m4s files: the large one is the picture, the small one the sound.

    • Filee 2.2.0 converts each .m4s on its own: the large one gives an MP4 without sound, the small one MP3, M4A and the other audio formats.
    • Joining the pair into one MP4 with sound isn't possible yet. I'm keeping this issue open for that: select both files, drop them on the donut, and get one MP4 (without re-encoding, so it's fast and keeps the quality).
  6. changed the title [-][Format]: .m4s[/-] [+]Join a Bilibili video .m4s and its audio .m4s into one MP4[/+] on Oct 28, 2026
  7. KnifeLemon commented on Oct 30, 2026

    @KnifeLemon
    Owner

    好消息:#787(感谢 @Stamina9)已经合并,下一个版本就可以把 B站的一对 .m4s 合成一个带声音的 MP4:

    1. 同时选中两个 .m4s(大的画面 + 小的声音,顺序不限)。
    2. 拖到视频圆环背面的 合并视频。
    3. 直接复制画面和声音,不重新编码,所以很快,画质也不变。

    用 IDM 下载的文件可以这样合并。B站电脑客户端的缓存文件开头有填充字节,目前还打不开。


    Good news: #787 (thanks, @Stamina9) is merged. From the next release, select a Bilibili .m4s pair (the large video and the small audio, in any order) and drop them on Merge videos to get one MP4 with sound, copied without re-encoding. IDM downloads work. Desktop-client caches with padding bytes still don't. Closing as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    formatsNew formats and enginesquestionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions