#16 2015-03-31 22:19:54

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

Thanks, the git version fixed the ability to display metadata.

For the GPS coords issue, the xyz tag IS included from the iphone .mov file.

However, upon re-encoding to x264 (.mp4) with ffmpeg using:

Code:

ffmpeg -i iphone.mov -threads 4 -c:v libx264 -preset slow -profile:v high -c:a libfdk_aac -vf scale=-1:720 newmovie.mp4

exiftool −overwrite_original_in_place -r -tagsFromFile iphone.mov "-gps:*" newmovie.mp4

mp4file --optimize newmovie.mp4

There are no tags from mediainfo that relate to GPS at all, however, with exiftool, there is:

Code:

GPS Altitude Ref                : Above Sea Level
GPS Latitude                    : 44 deg 54' 36.00" N
GPS Longitude                   : 110 deg 19' 59.88" W
GPS Altitude                    : 1882 m Above Sea Level
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Position                    : 44 deg 54' 36.00" N, 110 deg 19' 59.88" W

Last edited by jnashpiwigo (2015-03-31 22:35:42)

Offline

 

#17 2015-03-31 22:24:23

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

Using exiftool would also result in better data coming out of the video, such as make and model of camera, etc. that mediainfo doesn't display.

Last edited by jnashpiwigo (2015-03-31 22:24:42)

Offline

 

#18 2015-03-31 23:01:06

xbgmsharp
Member
1970-01-01
215

Re: VideoJs metadata testing

Code:

# mediainfo IMG_2669.mp4
General
Complete name                            : IMG_2669.mp4
Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt  
File size                                : 4.15 MiB
Duration                                 : 46s 83ms
Overall bit rate                         : 756 Kbps
Recorded date                            : 2014-06-24T11:23:05+0200
Encoded date                             : UTC 2014-07-19 17:12:33
Tagged date                              : UTC 2014-07-19 17:12:42
Writing application                      : 7.1.1
Writing library                          : Apple QuickTime
©xyz                                     : +41.5302+002.0886+179.223/
Model                                    : iPhone 5s
Make                                     : Apple
com.apple.quicktime.creationdate         : 2014-06-24T11:23:05+0200
com.apple.quicktime.model                : iPhone 5s
com.apple.quicktime.software             : 7.1.1
com.apple.quicktime.location.ISO6709     : +41.5302+002.0886+179.223/
com.apple.quicktime.make                 : Apple

Mediainfo does include the details such as make and model of camera, etc.
I am surprise MediaInfo does not show any GPS details for you re-encode video.

I will look into using the exiftool. It will be a big change.
I moved from GETID3 to MediaInfo to get the rotation and xyz metadata.

Offline

 

#19 2015-04-01 00:17:10

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

Interesting... I can't seem to get the metadata from the mov in to the mp4 then...

I'm going to try with ffmpeg and map_metadata to see if that helps

Appreciate your help on this...

I'm thinking since you have it in that mp4 file, then I should be able to extract from the apple .mov and input into the re-encoded .mp4 somehow.

Offline

 

#20 2015-04-01 00:32:56

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

Looks like it might also be a bug in ffmpeg...

https://trac.ffmpeg.org/ticket/4209

Offline

 

#21 2015-04-01 09:03:16

Jérôme
Guest

Re: VideoJs metadata testing

jnashpiwigo wrote:

There are no tags from mediainfo that relate to GPS at all, however, with exiftool, there is

Please provide a file.
Adding such metadata in MediaInfo should not be complex.

jnashpiwigo wrote:

Using exiftool would also result in better data coming out of the video, such as make and model of camera, etc. that mediainfo doesn't display.

It should already be available, please provide a file.

Jérôme, developer of MediaInfo.

 

#22 2015-04-01 12:45:08

xbgmsharp
Member
1970-01-01
215

Re: VideoJs metadata testing

Looks like it might also be a bug in ffmpeg...
https://trac.ffmpeg.org/ticket/4209

Have you try with avconv?
I personally use handbrake to transcode video but it does not seen to copy over the metadata. I might have an old version.
My Exiftool version does not allow metadata writing on MP4 file, more likely an old version.

I'm thinking since you have it in that mp4 file, then I should be able to extract from the apple .mov and input into the re-encoded .mp4 somehow.

Well not really, i just change the extension. It is not perfect but does work. The MOV file from the iPhone are encode in x264.


As Jerome mention, a sample file would be useful to add more metadata support in MediaInfo.

Offline

 

#23 2015-04-01 15:12:27

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

I like to be able to re-encode to get file size down.  The iPhone videos as-is are too large for streaming to lower bandwidth family. 

I'll see if I can find a sample to provide, although, as stated, there is no additional tags that mediainfo finds related to GPS data in the newly encoded files.  Exiftool does find them.

mediainfo output:  (--Full)

Code:

General
Count                                    : 284
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Count of audio streams                   : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : AAC
Audio_Format_WithHint_List               : AAC
Audio codecs                             : AAC LC
Complete name                            : /data1/apache/htdocs/p/galleries/Videos/buf1.mp4
Folder name                              : /data1/apache/htdocs/p/galleries/Videos
File name                                : buf1
File extension                           : mp4
Format                                   : MPEG-4
Format                                   : MPEG-4
Format/Extensions usually used           : mp4 m4v m4a m4b m4p 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma f4v
Commercial name                          : MPEG-4
Format profile                           : Base Media
Internet media type                      : video/mp4
Codec ID                                 : isom
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
Codec                                    : MPEG-4
Codec                                    : MPEG-4
Codec/Extensions usually used            : mp4 m4v m4a m4b m4p 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma f4v
File size                                : 60012934
File size                                : 57.2 MiB
File size                                : 57 MiB
File size                                : 57 MiB
File size                                : 57.2 MiB
File size                                : 57.23 MiB
Duration                                 : 38964
Duration                                 : 38s 964ms
Duration                                 : 38s 964ms
Duration                                 : 38s 964ms
Duration                                 : 00:00:38.964
Overall bit rate                         : 12321719
Overall bit rate                         : 12.3 Mbps
Stream size                              : 90713
Stream size                              : 88.6 KiB (0%)
Stream size                              : 89 KiB
Stream size                              : 89 KiB
Stream size                              : 88.6 KiB
Stream size                              : 88.59 KiB
Stream size                              : 88.6 KiB (0%)
Proportion of this stream                : 0.00151
HeaderSize                               : 43469
DataSize                                 : 59922229
FooterSize                               : 47236
IsStreamable                             : No
Encoded date                             : UTC 2014-08-06 20:34:42
Tagged date                              : UTC 2014-08-06 20:34:54
File last modification date              : UTC 2015-03-31 23:30:06
File last modification date (local)      : 2015-03-31 19:30:06

Video
Count                                    : 277
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L3.1
Format settings                          : CABAC / 5 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5
Format settings, ReFrames                : 5 frames
Internet media type                      : video/H264
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
Codec                                    : AVC
Codec                                    : AVC
Codec/Family                             : AVC
Codec/Info                               : Advanced Video Codec
Codec/Url                                : http://developers.videolan.org/x264.html
Codec/CC                                 : avc1
Codec profile                            : High@L3.1
Codec settings                           : CABAC / 5 Ref Frames
Codec settings, CABAC                    : Yes
Codec_Settings_RefFrames                 : 5
Duration                                 : 38906
Duration                                 : 38s 906ms
Duration                                 : 38s 906ms
Duration                                 : 38s 906ms
Duration                                 : 00:00:38.906
Bit rate                                 : 12225190
Bit rate                                 : 12.2 Mbps
Width                                    : 1280
Width                                    : 1 280 pixels
Height                                   : 720
Height                                   : 720 pixels
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Rotation                                 : 0.000
Frame rate mode                          : CFR
Frame rate mode                          : Constant
FrameRate_Mode_Original                  : VFR
Frame rate                               : 29.970
Frame rate                               : 29.970 fps
Frame count                              : 1166
Resolution                               : 8
Resolution                               : 8 bits
Colorimetry                              : 4:2:0
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Interlacement                            : PPF
Interlacement                            : Progressive
Bits/(Pixel*Frame)                       : 0.443
Stream size                              : 59453500
Stream size                              : 56.7 MiB (99%)
Stream size                              : 57 MiB
Stream size                              : 57 MiB
Stream size                              : 56.7 MiB
Stream size                              : 56.70 MiB
Stream size                              : 56.7 MiB (99%)
Proportion of this stream                : 0.99068
Writing library                          : x264 - core 142 r2479M dd79a61
Writing library                          : x264 core 142 r2479M dd79a61
Writing library/Name                     : x264
Writing library/Version                  : core 142 r2479M dd79a61
Encoding settings                        : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 2014-08-06 20:34:42
Tagged date                              : UTC 2014-08-06 20:34:54

Audio
Count                                    : 222
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Commercial name                          : AAC
Format profile                           : LC
Codec ID                                 : 40
Codec                                    : AAC LC
Codec                                    : AAC LC
Codec/Family                             : AAC
Codec/CC                                 : 40
Duration                                 : 38964
Duration                                 : 38s 964ms
Duration                                 : 38s 964ms
Duration                                 : 38s 964ms
Duration                                 : 00:00:38.964
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 96000
Bit rate                                 : 96.0 Kbps
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel(s)_Original                      : 1
Channel(s)_Original                      : 1 channel
Channel positions                        : Front: C
Channel positions                        : 1/0/0
ChannelLayout                            : C
Sampling rate                            : 44100
Sampling rate                            : 44.1 KHz
Samples count                            : 1718312
Frame count                              : 1678
Compression mode                         : Lossy
Compression mode                         : Lossy
Stream size                              : 468721
Stream size                              : 458 KiB (1%)
Stream size                              : 458 KiB
Stream size                              : 458 KiB
Stream size                              : 458 KiB
Stream size                              : 457.7 KiB
Stream size                              : 458 KiB (1%)
Proportion of this stream                : 0.00781
Encoded date                             : UTC 2014-08-06 20:34:42
Tagged date                              : UTC 2014-08-06 20:34:54

exiftool output:

Code:

ExifTool Version Number         : 9.69
File Name                       : buf1.mp4
Directory                       : /data1/apache/htdocs/p/galleries/Videos
File Size                       : 57 MB
File Modification Date/Time     : 2015:03:31 19:30:06-04:00
File Access Date/Time           : 2015:03:31 19:30:08-04:00
File Inode Change Date/Time     : 2015:03:31 19:30:06-04:00
File Permissions                : rw-r--r--
File Type                       : MP4
MIME Type                       : video/mp4
Major Brand                     : MP4  Base Media v1 [IS0 14496-12:2003]
Minor Version                   : 0.2.0
Compatible Brands               : isom, iso2, avc1, mp41
Movie Data Size                 : 59922221
Movie Data Offset               : 43477
Movie Header Version            : 0
Create Date                     : 2014:08:06 20:34:42
Modify Date                     : 2014:08:06 20:34:54
Time Scale                      : 1000
Duration                        : 0:00:38
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2014:08:06 20:34:42
Track Modify Date               : 2014:08:06 20:34:54
Track ID                        : 1
Track Duration                  : 0:00:38
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 1280
Image Height                    : 720
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 1280
Source Image Height             : 720
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2014:08:06 20:34:42
Media Modify Date               : 2014:08:06 20:34:54
Media Time Scale                : 44100
Media Duration                  : 0:00:38
Media Language Code             : und
Handler Type                    : Audio Track
Handler Description             : SoundHandler
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
XMP Toolkit                     : Image::ExifTool 9.69
GPS Altitude Ref                : Above Sea Level
GPS Latitude                    : 44 deg 54' 36.00" N
GPS Longitude                   : 110 deg 19' 59.88" W
Creation Date                   : 2014:08:06 14:34:42-06:00
Make                            : Apple
Camera Model Name               : iPhone 5s
Software                        : 7.1.2
Audio Sample Rate               : 44100
Video Frame Rate                : 29.982
Avg Bitrate                     : 12.3 Mbps
GPS Altitude                    : 1882 m Above Sea Level
GPS Latitude Ref                : North
GPS Longitude Ref               : West
Image Size                      : 1280x720
Rotation                        : 0
GPS Position                    : 44 deg 54' 36.00" N, 110 deg 19' 59.88" W

Last edited by jnashpiwigo (2015-04-01 15:13:56)

Offline

 

#24 2015-04-01 15:49:21

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

One other issue ( :-) )

When viewing a video on the gallery, the globe icon to display the map doesn't work (rv_gmaps plugin).  It does work on jpg pages, but not via videojs player page.

Offline

 

#25 2015-04-01 16:21:20

xbgmsharp
Member
1970-01-01
215

Re: VideoJs metadata testing

When viewing a video on the gallery, the globe icon to display the map doesn't work (rv_gmaps plugin).  It does work on jpg pages, but not via videojs player page.

It is a different topic and it is not an issue. VideoJS plugin populate in the database and OpenStreetMap plugin display the GPS cords from the database.
rv_gmaps plugin or OpenStreetMap plugin use the data populate in the database.
If your video does not have the xyz metadata then the database is not populated.
Using OpenStreetMap plugin, you can set the GPS cords in the database, http://piwigo.org/ext/extension_view.php?eid=701 
The GPS cords are not write back to the file therefor the origin file is never modified.

To be able to support the specific metadata in your video, we will need a sample.
You can record a 5 sec video and send it to me. It is will allow to test with Exiftool and maybe Jerome could add support for this metadata too.
The output Exiftool and MediaInfo is not enough to test and be able to parse the video correctly.

Offline

 

#26 2015-04-01 16:45:35

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

Jérôme wrote:

jnashpiwigo wrote:

There are no tags from mediainfo that relate to GPS at all, however, with exiftool, there is

Please provide a file.
Adding such metadata in MediaInfo should not be complex.

jnashpiwigo wrote:

Using exiftool would also result in better data coming out of the video, such as make and model of camera, etc. that mediainfo doesn't display.

It should already be available, please provide a file.

Jérôme, developer of MediaInfo.

Awesome, I'll send you a link to one of the recoded files...

Offline

 

#27 2015-04-01 16:54:33

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

xbgmsharp wrote:

When viewing a video on the gallery, the globe icon to display the map doesn't work (rv_gmaps plugin).  It does work on jpg pages, but not via videojs player page.

It is a different topic and it is not an issue. VideoJS plugin populate in the database and OpenStreetMap plugin display the GPS cords from the database.
rv_gmaps plugin or OpenStreetMap plugin use the data populate in the database.
If your video does not have the xyz metadata then the database is not populated.
Using OpenStreetMap plugin, you can set the GPS cords in the database, http://piwigo.org/ext/extension_view.php?eid=701 
The GPS cords are not write back to the file therefor the origin file is never modified.

To be able to support the specific metadata in your video, we will need a sample.
You can record a 5 sec video and send it to me. It is will allow to test with Exiftool and maybe Jerome could add support for this metadata too.
The output Exiftool and MediaInfo is not enough to test and be able to parse the video correctly.

Here is a link to a sample of the re-encoded mp4...
(after using exiftool -tagsfromfile ORIG.MOV sample.mp4)

https://www.dropbox.com/s/6g1lwmqqat9fe … e.mp4?dl=0



(for the off-topic issue)

I did populate the database with coords for the video in question manually.  It does show on the rv_gmaps from the 'home' page (globe icon)  - but, when on the video page itself, the clicking the globe doesn't bring up the map.  It does for a jpeg page, but not on the videojs page.

Offline

 

#28 2015-04-01 18:51:34

xbgmsharp
Member
1970-01-01
215

Re: VideoJs metadata testing

jnashpiwigo wrote:

Here is a link to a sample of the re-encoded mp4...
(after using exiftool -tagsfromfile ORIG.MOV sample.mp4)

https://www.dropbox.com/s/6g1lwmqqat9fe … e.mp4?dl=0

Thanks. First MediaInfo integration and them I will follow.

jnashpiwigo wrote:

(for the off-topic issue)
I did populate the database with coords for the video in question manually.  It does show on the rv_gmaps from the 'home' page (globe icon)  - but, when on the video page itself, the clicking the globe doesn't bring up the map.  It does for a jpeg page, but not on the videojs page.

I don't develop neither use rv_gmaps, try with OpenStreetMap plugin. If you still have the issue, we can discuss in a new thread.

Offline

 

#29 2015-04-01 19:26:22

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

xbgmsharp wrote:

jnashpiwigo wrote:

Here is a link to a sample of the re-encoded mp4...
(after using exiftool -tagsfromfile ORIG.MOV sample.mp4)

https://www.dropbox.com/s/6g1lwmqqat9fe … e.mp4?dl=0

Thanks. First MediaInfo integration and them I will follow.

jnashpiwigo wrote:

(for the off-topic issue)
I did populate the database with coords for the video in question manually.  It does show on the rv_gmaps from the 'home' page (globe icon)  - but, when on the video page itself, the clicking the globe doesn't bring up the map.  It does for a jpeg page, but not on the videojs page.

I don't develop neither use rv_gmaps, try with OpenStreetMap plugin. If you still have the issue, we can discuss in a new thread.

Awesome.  I'll await to see what happens with mediainfo then.

For the second, both plugins work... I'll drop a message in the rv_gmaps thread to see whats up.  I'm guessing it's the way the template for videojs is used.. the rv_gmaps can't insert cause the right template details aren't there in the video page...

Offline

 

#30 2015-04-17 18:57:39

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: VideoJs metadata testing

Any movement on mediainfo changes to support the coords in .mp4 container?

From what I've been able to gather, it appears that supporting XMP embedded tags is what's required.  exiftool supports these tags. 

I'm still looking for a way to 'translate' the tags and embed them back in to the .mp4, but not having luck. 

I require re-encoding to drop the quality and resolution down so that streaming is more effective for lower bandwidth users.  The raw iphone .mov file is just too big and too quality for web streaming effectively.

I'd really like to be able to support the GPS coords in an mp4 file though.

Also, I don't know if this has been discussed before, but I'm looking for something opposite of everything I've been able to dig up here.  I'd like to be able to take the GPS coords, look them up, and translate them to location (for US: city, state, etc.) and then update the tags in the file (be it video or jpeg)  The iphone only embeds the coords, not the location names.  Any one working around this somehow?

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact