EzDevInfo.com

metadata interview questions

Top metadata frequently asked interview questions

When spliting MP4s with ffmpeg how do I include metadata?

I have a few MP4s that i want to upload to my flickr account but they have a maximum size of 500mb as mine is only about 550 i was planing to simply split them in half then upload them, but i want to make sure all the meta data is included but it does not seem to be. I have tried each of the following with no luck, (at the end of this post i have the original and the new ffprobe outputs):

ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -map_metadata 0:0 SANY0069A.MP4

ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -map_meta_data SANY0069.MP4:SANY0069A.MP4 SANY0069A.MP4

with the this one I manually produced the individual meta tags that i took from this command

ffmpeg -i SANY0069A.MP4 -f ffmetadata meta.txt
ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -metadata major_brand="mp42" -metadata minor_version="1" -metadata compatible_brands="mp42avc1" -metadata creation_time="2012-09-29 09:05:50" -metadata comment="SANYO DIGITAL CAMERA CA9" -metadata comment-eng="SANYO DIGITAL CAMERA CA9" SANY0069A.MP4

using the output of the former command i also tried this:

ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -f ffmetadata -i meta.txt SANY0069A.MP4 

Output: sample output from my first command:

ffmpeg -ss 00:00:00.00 -t 00:04:19.35 -i SANY0069.MP4 -acodec copy -vcodec copy -map_metadata 0:0 SANY0069A.MP4
ffmpeg version 0.8.12, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SANY0069.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    creation_time   : 2012-09-29 09:05:50
    comment         : SANYO DIGITAL CAMERA CA9
    comment-eng     : SANYO DIGITAL CAMERA CA9
  Duration: 00:08:38.71, start: 0.000000, bitrate: 9142 kb/s
    Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 9007 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
    Metadata:
      creation_time   : 2012-09-29 09:05:50
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s
    Metadata:
      creation_time   : 2012-09-29 09:05:50
File 'SANY0069A.MP4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'SANY0069A.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    creation_time   : 2012-09-29 09:05:50
    comment         : SANYO DIGITAL CAMERA CA9
    comment-eng     : SANYO DIGITAL CAMERA CA9
    encoder         : Lavf53.5.0
    Stream #0.0(eng): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 9007 kb/s, 30k tbn, 29.97 tbc
    Metadata:
      creation_time   : 2012-09-29 09:05:50
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, 127 kb/s
    Metadata:
      creation_time   : 2012-09-29 09:05:50
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame= 7773 fps=4644 q=-1.0 Lsize=  289607kB time=00:04:19.35 bitrate=9147.4kbits/s    
video:285416kB audio:4033kB global headers:0kB muxing overhead 0.054571%

and finaly, when i compare the ffprobe of the original and the first split part i get the 2 following outputs: original

ffprobe version 0.8.12, Copyright (c) 2007-2011 the FFmpeg developers
  built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SANY0069.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    creation_time   : 2012-09-29 09:05:50
    comment         : SANYO DIGITAL CAMERA CA9
    comment-eng     : SANYO DIGITAL CAMERA CA9
  Duration: 00:08:38.71, start: 0.000000, bitrate: 9142 kb/s
    Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 9007 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
    Metadata:
      creation_time   : 2012-09-29 09:05:50
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s
    Metadata:
      creation_time   : 2012-09-29 09:05:50

Split

ffprobe version 0.8.12, Copyright (c) 2007-2011 the FFmpeg developers
  built on Jun 13 2012 09:57:38 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SANY0069A.MP4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.5.0
    comment         : SANYO DIGITAL CAMERA CA9
  Duration: 00:04:19.37, start: 0.000000, bitrate: 9146 kb/s
    Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 9015 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00

I know this is incredibly long but its actually a quite simple question. I thought it would be best to provide as much detail as possible.

any advice here would be great,

Thanks


Source: (StackOverflow)

Is the origin of a file traceable? If it is how can I sanitise it?

If I copied a file from my PC to a newly formatted USB flash drive, took the file to a public PC and public Internet connection, created from there a new email, created a new account on an uploading server, uploaded the file, shared a downloading link for this file on the web and an anonymous person or organization after that downloaded the file, would this file be traceable by this person or organization?

Also what about if this file is a not-mine PDF file that I took from some one else, how can I make this file untraceable?


Source: (StackOverflow)

Advertisements

Changing the date of a image file

I'm going through the thankless task of scanning old photos and archiving the digital copies.

Is there a way to modify the date of scanned image files (typically .jpeg) to more closely match when the photo was taken rather than when the photo was scanned?


Edit: I'm using Windows (Vista for now).

I'm fairly ignorant of the exif data that is being mentioned in the answers. Is the exif data linked with the file's date/time attributes somehow? Do any of these tool allow manipulation of the file's date & time as well as the exif date (assuming these are separate).


Source: (StackOverflow)

Editing JPEG EXIF properties

How can I edit EXIF properties of JPEG files on a Windows machine?

Some image editing utilities handle the Rotation property wrong, which leaves me needing to make manual edits after rotating images in those utilities. A utility which can perform rotation based on the Rotation property, and then remove the property and save the image, would be handy.

Alternatively, I could rotate images in an image editor and remove the properties manually with some utility.

Rotation is, however, not my only issue; I would like to edit/add other properties as well. What methods/tools will let me do this?


Source: (StackOverflow)

Is there a command analogous to afinfo for videos on a Mac OS X?

Mac OS X has the command afinfo to fetch audio file info. Is there a similar command to fetch video file info for videos (.mov, .m4v) other than the mdls command?


Source: (StackOverflow)

Can a file appear to be modified before it was created? [duplicate]

This question already has an answer here:

Is it possible to have a file which has a modified date that is before its created date? What actions would cause this event to occur?


Source: (StackOverflow)

saving notes against a file on linux

I want to save notes against a file on linux. I want to save meta data about a file, because the file names are restricted in max length.

so how to save notes or comments about a file on linux so that it gets saved along with the file itself...

i used the notes tab in the file properties dialogbox.. but that way the notes stick to the file only on that OS only.. if i open that file in another linux os.. those comments/notes are gone...

please suggest me a way to embedd these notes into the file so that i dont lose them ever..

at lease a solution that makes this possible on switching linux distros. if its not portable enough that these notes stick b/w windows and linux its ok for me.. but atleast if i format my linux os.. atleast i shouldnt lose those important notes..and be able to access on newer linux..

and i also have no idea if this notes tab was implemented to be linked with the OS only.. i dont see much use of it.. and a normal user also has noway to know this.. i also came to know on superuser chat from a buddy.. @Sathya .. this thing is more useless especially if u use ubuntu which has 6 months timeline..and crazy people like me who are always eager to upgrade their os as soon a new one is available..

and any way i can search these notes from the terminal?? that would be awsome too..

kindly help.. Thanks.


Source: (StackOverflow)

How to make Handbrake preserve capture time / creation time?

Handbrake is an awesome video compression tool, but it doesn't seem to preserve the original capture time after a video is compressed. Any idea how to fix this?


Source: (StackOverflow)

Is there a Windows command-line tool to set ID3 tags on an MP3 file? [closed]

I am looking for a command-line tool for Windows that will allow me to set the ID3 tags on an MP3 file.

For example, something like this would be ideal:

C:\> setID3.exe myfile.mp3 -artist "The Smashing Pumpkins" -album "Siamese Dream" -title Mayonaise -track 9 -year 1993

(The reason for this is that my MP3 files are named in a few specific nomenclatures. I have already written a Perl script that can intelligently determine what nomenclature the file name is in, and parse out the correct values. I'd like to then fire off a command-line utility to update that MP3 file.)


Source: (StackOverflow)

Free metadata file information tool for Mac? [closed]

Does anyone know any free alternatives to Informator?

alt text

As a sidenote, this doesn't deal with EXIF metadata only. I'm hoping for video, music, and who knows what else beside images metadata. Being able to view and edit as well.


Source: (StackOverflow)

Can't edit MP3 tags like artist or title

I try to edit the tags of MP3 files and I found that some of the file cannot be edited.

Here's the procedure when I edit the information of the MP3 file:

  1. Right click the MP3 file in Windows Explorer and click Properties.
  2. Switch to "Details" tab and then edit the MP3 information, such as Title, Artist and Composer.

This is the message that I get if I try to save it:

"An unexpected error is keeping you from applying properties to the file. If you continue to receive this error, you can use the error code to search for help with this problem.

Error 0x8007000D: The data is invalid.

May I know why this happens and whether there is any solution for the same?


Source: (StackOverflow)

What is the "sep=" metadata you can add to CSVs?

While trying to find out how to get CSVs to open correctly in Excel on a Spanish PC (belonging to a customer) I found many answers recommending using sep=, at the top of the file:

On the face of it, this approach works but none of those answers give any further information on where this metadata option comes from. I have tried to search for what it means (and hence found all of those answers) but have been unable to get any further information especially given that punctuation is notoriously hard to search for.

My primary concern is whether or not this is an Excel-specific feature. I suspect it is but have found nothing definitive to confirm it.

Some related questions are:

  • What characters can be used in this setting?
  • What other settings are available (eg. line termination character, quote character, etc).
  • Are there any other tools that officially support this feature?

I'm hoping there is a piece of documentation somewhere that someone can point me to that will answer all these questions and more; I just haven't been able to find it.

Some clarification:

The sep= is not a parameter to a parser. It is meant to be placed inside the CSV. Example:

sep=|
"LETTER"|"ANIMAL"
"a"|"aardvark"
"b"|"bear"
"c"|"cow"

Source: (StackOverflow)

How to remove the meta data of all files within a folder and it's sub folders?

When a right click a file and hit details, it shows me Date created, date modified, owner, and computer.

I have a folder that I want to send to someone.

Basically I want to remove the Date created, date modified, owner, and computer info (and other meta info) for all the files within that folder and its subfolders (and their subfolders etc etc)

My priority is simply to remove Date created, date modified (if I can also remove the other meta data I'll treat it as a bonus).

Does anyone know of a way to do this? I'm using 32-bit Windows Vista SP2 Home Premium.


Source: (StackOverflow)

How to use ffmpeg to add metadata to an AAC file without reencoding?

I'm using ffmpeg to extract just the audio stream from a video file:

ffmpeg -i video.mp4 -vn -acodec copy audio.aac

This produces a clean audio file but without any metadata.

To add metadata, ffmpeg has a command line option:

ffmpeg -i video.mp4 -vn -acodec copy -metadata title="My Title" audio.aac

This runs without error, but when the output file is checked with ffprobe, it has no metadata tags at all.

If the output container is changed to mp4, the metadata can be set and appears in the output file:

ffmpeg -i video.mp4 -vn -acodec copy -metadata title="My Title" audio.mp4

Here's the interesting bit; if I use Banshee to edit the metadata of an existing .aac file, then use ffmpeg to process the file the same way, the original metadata is copied successfully to the new .aac file.

ffmpeg -i metadata.aac -vn -acodec copy audio.aac

but, attempts to change the metadata have no effect:

ffmpeg -i metadata.aac -vn -acodec copy -metadata title="My Title" audio.aac

So it seems the .aac container can hold metadata and ffmpeg can copy it from input to output, but can't alter it when the copy codec is used.

Does anyone know of a way to get ffmpeg to alter the metadata in an aac container without reencoding?

Alternately, is there another generic tool I could be using to set the metadata after the file has been processed?

Much thanks. Chris.


Source: (StackOverflow)

How to reuse/extend etckeeper's metadata engine for git control of non-/etc filesystems, or extend git natively with said capability?

Overview + question

I want etckeeper-like filesystem metadata control for non-/etc, git-controlled directories. Home and web-app directories, among others, are classically sensitive to metadata (file ownership, ACL, permissions). This can be extremely useful/important to employ git for automated server deployment (along with tools like Fabric), among other things. I would like to re-use etckeeper-like capability on said dirs, either with etckeeper itself or something else.

Can anyone suggest any tips/tricks/working solutions to provide either or both of the following:

  1. apply the etckeeper engine (only care about the git-specific capability of etckeeper) to non-/etc, git-controlled directories. (Can assume at least Debian/Ubuntu Linux; would like MacOSX/homebrew support if possible.)
  2. extend git with metadata support (beyond over-simplified things like git-cache-meta) to support an etckeeper-like capability or better?

More details, background

There's a growing interest in extending git with filesystem-metadata-control capabilities. etckeeper's metadata "engine" seems quite powerful and reliable in my experience, and etckeeper seems popular with others as well. metastore less so at least in part due to metastore's non-text-based/merge-unfriendly challenges. Further, etckeeper appears to have started with a metastore-based core, but then switched to its own (speculative?).

Obviously, this has OS/filesystem-specific dependencies. (eg, not trying to auto-deploy on Windows.) Suggest an optional extension (if it's a "native extension") of git, enabled on-demand by the user with understood consequences of cross-platform breakage, such that native behavior doesn't break git's "by default" cross-platform friendliness. Further, don't need to save extravagant unix/darwin/etc metadata (like ACLs); basic user/group/other perms and user/group ownership would be fine. (These are the only things that are currently breaking things in my "security/vulnerability control/policies.") Specific OSes I'm targeting up front: Debian, Ubuntu, MacOS 10.6+. Later: Redhat's (CentOS, Fedora, RHEL), SUSE, maybe other Linuxes, and *BSD (FreeBSD, NetBSD, OpenBSD). Don't see a need/application for Windows/VMS (even though VMS can be posix-friendly) or other non-unix-like OSes at any foreseeable point.

See also: background on pre-existing git, file-metadata/file-type tracking capabilities at this stackoverflow question I posted.

Develop requirements for a new project?

Additionally: if anyone cares to develop requirements for such capability, I am sure that could prove useful, particularly for a new/uncompleted project to address above.


Source: (StackOverflow)