ExifTool Forum

General => Metadata => Topic started by: renexbmc on March 28, 2016, 05:59:30 AM

Title: video metadata read out in live modus
Post by: renexbmc on March 28, 2016, 05:59:30 AM
Hello!
It is possible video metadata like the fps in live mode to read out? With PowerDVD I play Blu rays. PowerDVD does not change the frame rate for different video files. Most often the main film in 24 fps and the bonus in 25 or 30 fps. I'm looking for a way with ExifTool in live mode to read the metadata and then write in an XML file or another File. Then I want with 12noon Display Changer switch the right refresh rate of the graphics card. For example, 25 fps video then graphics card 50 Hz.  Sorry my english is not the best. Thank you very much
Title: Re: video metadata read out in live modus
Post by: Phil Harvey on March 28, 2016, 08:57:15 PM
What format video files are you talking about?  Many formats do contain fps metadata.  If it exists as metadata, then ExifTool should be able to extract it.  But if it is part of the video stream itself, ExifTool won't find it.

- Phil
Title: Re: video metadata read out in live modus
Post by: renexbmc on March 29, 2016, 04:40:48 PM
Hello Phil,
Thanks for your answer. I'm talking about M2TS files. The M2TS  files are in the Blu Ray folder. The M2TS files can contain various video formats like as MPEG 2, MPEG 4 or VC1. But in an M2TS file is also just a Videofomat for Example MPEG2. But a Blu Ray has several M2TS files. If you have a Blu-ray, then you can the Blu ray put in the drive of the PC and look in the Windows Explorer file. When you want see the Video formats then play the Blu ray with a Stand alone Player or with PowerDVD. I play Blu ray Isos.
I hope you can help me.
Title: Re: video metadata read out in live modus
Post by: Phil Harvey on March 30, 2016, 07:35:00 AM
Ah.  M2TS is a problem since this format doesn't support metadata.  M2TS was never designed to be a file format -- it is a transmission specification and never should have been used for files.  ExifTool can't extract fps information from this format.

- Phil
Title: Re: video metadata read out in live modus
Post by: renexbmc on March 30, 2016, 04:24:09 PM
 :'( but XBMC mediacenter can read the metadata from M2TS files. I play my My Movie trailer with XBMC mediacenter. The trailer are M2TS files orginal copied from Blue ray. XBMC looks the fps rate und switch the right refresh rate of the graphic card.
Title: Re: video metadata read out in live modus
Post by: Phil Harvey on March 30, 2016, 08:53:58 PM
Yes, the frame rate information must be embedded somewhere in the video data.  I don't call this metadata because it is really part of the video data itself.  But we can debate about this.

A program that decodes the video data must obtain this information somehow, but ExifTool doesn't concern itself with image/video/audio data.

The bottom line is that ExifTool can't extract what you want from M2TS files.

- Phil
Title: Re: video metadata read out in live modus
Post by: renexbmc on March 31, 2016, 03:03:35 AM
thank you for your super answer. i have understand your mail.
Can you me recommend a program witch can i readout video metadata like the fps in live mode.
Title: Re: video metadata read out in live modus
Post by: Phil Harvey on March 31, 2016, 07:11:45 AM
You could try this (https://ffmpeg.org/ffprobe.html).  It gives the following output for a Panasonic M2T file:

> ffprobe PanasonicDMC-FZ100.mts
ffprobe version N-60902-gbc249bd Copyright (c) 2007-2014 the FFmpeg developers
  built on Feb 25 2014 10:33:22 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
  configuration: --disable-yasm
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  1.103 /  4.  1.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
[h264 @ 0x7f9901801800] out of range intra chroma pred mode at 78 22
[h264 @ 0x7f9901801800] error while decoding MB 78 22
[mpegts @ 0x7f9901801200] decoding for stream 0 failed
[NULL @ 0x7f9901815400] start time is not set in estimate_timings_from_pts
[NULL @ 0x7f9901833000] start time is not set in estimate_timings_from_pts
[mpegts @ 0x7f9901801200] Could not find codec parameters for stream 1 (Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x7f9901801200] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from '../pics/PanasonicDMC-FZ100.mts':
  Duration: N/A, start: 0.719344, bitrate: N/A
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)


- Phil
Title: Re: video metadata read out in live modus
Post by: renexbmc on April 05, 2016, 09:27:54 AM
can you send me the ffmpeg code witch you have read out the metadata.
thank you
Title: Re: video metadata read out in live modus
Post by: Phil Harvey on April 05, 2016, 09:34:39 AM
You can get the source code from the link in my last post.

- Phil
Title: Re: video metadata read out in live modus
Post by: renexbmc on April 05, 2016, 03:30:09 PM
Is the code for a single video file, or if generally when a video is played?
Title: Re: video metadata read out in live modus
Post by: Phil Harvey on April 06, 2016, 07:20:55 AM
I don't understand the question, but you ffmpeg doesn't play videos.

- Phil
Title: Re: video metadata read out in live modus
Post by: renexbmc on April 06, 2016, 11:41:03 AM
yes i know that FFmpeg doesn't play videos. My Question is, the code the you have yoused for read out the metadata with ffmpeg is it for for a single video file, or if generally when a video is played?
Title: Re: video metadata read out in live modus
Post by: Phil Harvey on April 06, 2016, 11:54:42 AM
I guess I still don't understand.  The ffprobe utility takes a video file as input, as in the command from my previous post.

- Phil