[FFmpeg-user] Copying a EIA-608 subtitle stream in an m4v

Ted Park kumowoon1025 at gmail.com
Fri Mar 27 21:47:45 EET 2020


> Sure. I don't necessarily require *literal* removal of some data from a file. But I'm looking for a process that will *logically* amount to removal of some data. This process could look like:
> mv filename.m4v filename-bak.m4v
> some-command -from filename-bak.m4v -to filename.m4v
> The process is successful if the result of the process looks like what you would expect from literal removal.
Yes, I didn’t think so either, and I don’t think you’ve been misconstrued in that way. In the first place you very rarely gouge out a chunk of bytes from a file on-disk, it is going to be copied to and from memory, kind of like the process you illustrated.

The main point is that ffmpeg will in almost all cases disassemble the multiplexed file apart into its constituent elementary streams and pieces of metadata, then reassemble them to produce its output. So apart from the default stream selection and metadata mapping behavior, which is usually a video stream and audio stream, you will need to specify everything you want.

> -map_metadata 0 doesn't help—the metadata is still stripped (some well-known tags are preserved, but only a few). It appears ffmpeg is not willing to put unrecognized tags in the output when copying from m4v to mov.

Several people have reported the creation_time not being copied, but as I can only guess, I think the metadata you are referring to are extensive comments or synopsis type strings? If it reads like the jacket cover of a book, or some library catalog record, they were probably in their own “box” at the same level as other streams in some sense, instead of short strings in the headers for each track which is the default. I’d suggest trying -movflags +use_metadata_tags. The uncut console output would really be helpful in the absence of a sample for its copyright status. Why leave out which tags were omitted?? ._.

> Stream #0:4(eng): Data: bin_data (tx3g / 0x67337874), 0 kb/s
>    Metadata:
>      creation_time   : 2016-07-15T19:12:05.000000Z
>      handler_name    : Core Media Text
>    Stream #0:5(und): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj444p(pc, bt470bg/unknown/unknown, progressive), 640x360 [SAR 72:72 DAR 16:9], 8 kb/s, SAR 65536:62805 DAR 1048576:565245, 0.0042 fps, 1 tbr, 1k tbn, 1k tbc (attached pic) (timed thumbnails)
>    Metadata:
>      rotate          : 0
>      creation_time   : 2016-07-15T19:12:05.000000Z
>      handler_name    : Core Media Video
>    Side data:
>      displaymatrix: rotation of -0.00 degrees

Again, only a guess, but I think this might be chapter/scene titles track from the timed thumbnails disposition on the image track? I don’t think I’ve seen it like that, it reminds me of mkv’s chapters, curious about it now, I don’t seem to remember iTunes being this way ~2016. Does the movie have working chapter markers? What application saved a file in this format?

Ted Park

More information about the ffmpeg-user mailing list