alfg/ffprobe-wasm

Show Chapters command

Closed this issue · 5 comments

Hello,

was trying your FFProbe wasm version but realised that there's not way to get the chapters from a video while on FFProbe you can do that using -show_chapters

Was trying to implement it looking at then original repo but I'm not familiarized enough with the code, any idea or any plan to include this on your version?

alfg commented

Hey @Albermonte. Thanks for reporting this. I may be able to add support. Do you have a minimal MP4 example I can use to try this out?

Sure, I have made one for you to test

Coffee.Run.Blender.Open.Moviefull.Movie.mp4

You can see the chapters using

ffprobe -v quiet -show_chapters -i "https://user-images.githubusercontent.com/14013679/149618158-231474b2-2f6c-4322-8578-ae35ff0a0b97.mp4" -print_format json
And the result looks like this
{
  "chapters": [
      {
          "id": 0,
          "time_base": "1/1000",
          "start": 0,
          "start_time": "0.000000",
          "end": 6000,
          "end_time": "6.000000",
          "tags": {
              "title": "Intro"
          }
      },
      {
          "id": 1,
          "time_base": "1/1000",
          "start": 6000,
          "start_time": "6.000000",
          "end": 106000,
          "end_time": "106.000000",
          "tags": {
              "title": "Part A"
          }
      },
      {
          "id": 2,
          "time_base": "1/1000",
          "start": 106000,
          "start_time": "106.000000",
          "end": 164000,
          "end_time": "164.000000",
          "tags": {
              "title": "Part B"
          }
      },
      {
          "id": 3,
          "time_base": "1/1000",
          "start": 164000,
          "start_time": "164.000000",
          "end": 183999,
          "end_time": "183.999000",
          "tags": {
              "title": "Credits"
          }
      }
  ]
}
alfg commented

@Albermonte Thanks for the example and mp4 sample. I'll take a look at this soon.

alfg commented

Hi @Albermonte, I've added support for displaying chapters (if available) on the overview tab. Feel free to check it out:
https://ffprobe-wasm.netlify.app/

Awesome, working like a charm.
Thanks