1

I need to get infos from the raw h264 track of a mkv file.

Some times ago, I used to extract the h264 raw stream, and analyze it by itself.

now, I would like to limit the disk usage, avoiding the extract process, so there are 2 choices:

  • use ffmpeg to pipe h264 to mediainfo

  • use a sort of ramdisk

I tried

ffmpeg -i original.mkv -map 0:v:0 -c copy -bsf:v h264_mp4toannexb -f h264 - | mediainfo -

but it returns none

where am I wrong?

1 Answers1

2

mediainfo does not (yet) support pipes (-). You may want to add a feature request on MediaInfo tracker.

but... I don't see which kind of better metadata report you get with that, compared to 'mediainfo original.mkv', as MediaInfo supports parsing of H264 in MKV.

slhck
  • 36,575
  • 28
  • 148
  • 201
Jérôme Martinez
  • 1,118
  • 5
  • 10
  • the point is that mkv container can have discrectional framerate, dar, start_time (example, to mach sync with video) indipentently from the values of the raw stream; if framerate is set in the mkv container, mediainfo would return constant framerate even if the raw 264 stream has variable framerate – Macheneso R. Oct 15 '17 at 13:29
  • MediaInfo analyzes the H264 stream in the MKV, and reports both pieces of information (e.g. "FrameRate" and "FrameRate_Original") If there is a mismatch between container and stream. – Jérôme Martinez Oct 16 '17 at 09:54
  • A way to limit the disk usage, having your needs in mind, is to check well the report from MediaInfo from a classic "mediainfo original.mkv". Frame rate, frame rate mode and DAR (and others) are crosschecked (2 values if mismatch, else it is a bug), start_time available only in container. – Jérôme Martinez Oct 16 '17 at 09:58
  • I really appreciate your help, however, if the raw stream framerate is variable, FrameRate_Mode_Original returns 'VFR', but no FrameRate_Original with mean numerical values is returnes. However actually I am trying to crosscheck raw stream data with the classic mediainfo output. I will try to use memoryfs() as tempdir for the extracted stream. Thank you. – Macheneso R. Oct 16 '17 at 11:02