Search code examples
ffmpegvideo-streamingmetadatahttp-live-streaming

FFmpeg: Generating .ts files and adding Metadata to them


Before I was following the steps:

  1. Create some metadata:

    id3taggenerator -o 1.id3 -artist "Emma Stone"
    id3taggenerator -o 2.id3 -artist "Patricia Clarkson"
    
  2. Create a file saying where to place the metadata in the file:

    68 id3 /path/to/file/1.id3
    78 id3 /path/to/file/2.id3
    
  3. Segment the files and include the metadata

    mediafilesegmenter -f video -M meta.txt video.mp4
    

More detail:

http://jmacmullin.wordpress.com/2010/11/03/adding-meta-data-to-video-in-ios/

I want to do something similar to this, but with FFmpeg.

I am also wondering if I could first segment the file into .ts files and add metadata directly to those?

I am having trouble finding the solution on the website. Any help or resources would be great. Thanks!


Solution

  • You can use -metadata flag

    ffmpeg -i maida.mp2 \
      -metadata TITLE='Obelisk' \
      -metadata ALBUM='2003-09-03: Maida Vale, London, UK' \
      -metadata ARTIST='The Mars Volta' \
      -metadata LABEL='' \
      -metadata DATE='2003' \
      maida.flac