1

I have a .mov container with a QuickTime text track which QuickTime uses to display chapter markers. In the QuickTime 7 Pro User's Guide, the description for how to do this is in Editing and Authoring with QuickTime Pro -> Changing Movie Properties -> Creating a Chapter List for a Movie. I won't put all 20 steps here.

I'd like to extract that text track back out of the .mov container using ffmpeg. ffmpeg reports these streams as present in my container:

Chapter #0:0: start 0.000000, end 10.000000
Metadata:
  title           :
Chapter #0:1: start 10.000000, end 181.000000
Metadata:
  title           : Course Objectives
Chapter #0:2: start 181.000000, end 257.966667
Metadata:
  title           : References
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], 1489 kb/s, 29.89 fps, 30 tbr, 3k tbn, 60 tbc (default)
Metadata:
  rotate          : 0
  creation_time   : 2012-08-11T01:00:09.000000Z
  handler_name    : Apple Alias Data Handler
Side data:
  displaymatrix: rotation of -0.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 191 kb/s (default)
Metadata:
  rotate          : 0
  creation_time   : 2012-08-11T01:00:09.000000Z
  handler_name    : Apple Alias Data Handler
Stream #0:2(eng): Data: bin_data (text / 0x74786574), 0 kb/s
Metadata:
  rotate          : 0
  creation_time   : 2012-08-11T01:00:09.000000Z
  handler_name    : Apple Alias Data Handler

Does ffmpeg think that each chapter marker is its own stream? What kind of selector should I use with map to select the text track? We have v for video, s for subtitle, etc., but nothing for chapters.

Ideally, I'd like to output the chapters in WebVTT format. Should I just specify my output filename as out.webvtt?

Dumping the Stream #0:2 with ffmpeg -i input_movie.mov -map 0:d:0 -c copy -f data text.bin yields some binary data which contains the chapter names above. However, I can't seem to find the timestamps in that data. The data certainly isn't in the same format as the text file I used as input. Here's the best interpretation I could come up with (by making a binary template for 010 Editor):

Binary data dump

1
  • If you want to extract stream #0:2, use ffmpeg -i in -map 0:d:0 -c copy -f data data.bin – Gyan Jun 7 '18 at 5:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.