MicrostockGroup

Microstock Photography Forum - General => General Stock Discussion => Topic started by: stockload on May 27, 2018, 15:47

Title: Video rejection due to lack of metadata
Post by: stockload on May 27, 2018, 15:47
Howdy gang,

I sent in a video clip for the first time on Shutterstock and it was rejected.  The following was stated:
 
There was a problem with some of your content. Click here for details.
 
Upload errors
1 error
 

.mp4

The clip's metadata could not be read, or the clip was only partially uploaded. Width: (unknown) Height: (unknown) Aspect: (unknown) Codec: (unknown)

 

I'm not sure how to include all that metadata.  When I open the video up in video editor I can see all that information but I don't know how to let Shutterstock see it.  I sent video to another agency (Pond5) and they had no problem with it, although I don't know if they were looking for the same metadata.  I've sent still photos before with no problem but I'm totally new to video.  Thanks for any help.
Title: Re: Video rejection due to lack of metadata
Post by: unnonimus on May 27, 2018, 16:21
I have a program that I wrote which takes all the frames and writes them as photos and then takes the photos and turns them back into a video. this solves problems whereby a video has the content but the structure of the file is bad.

this is perl. you  need the avconv program to use this.

use constant REBUILD_FORMAT             => "png";
use constant REBUILD_TMP_DIR            => "/tmp/rebuild/";

sub rebuild
{
# my $outfile = Avconv::rebuild($infile);

  my ($infile) = @_;

  mkdir REBUILD_TMP_DIR, 0777;

  my $file_type = $infile;
  $file_type =~ s/^.*\.(\w{2,5})$/$1/;
  $file_type =~ tr/A-Z/a-z/;

  my $prefix = "test-$$";
  my $outfile_tmp = REBUILD_TMP_DIR . $prefix . "-%05d." . REBUILD_FORMAT;
  my $outfile = REBUILD_TMP_DIR . "outfile-$$.$file_type";

  warn "  - building temp files for '$infile'\n";
  system "avconv -y -loglevel quiet -i '$infile'  -frames 100000 -qscale:v 1 '$outfile_tmp'";

  warn "  - rebuilding video for '$infile'\n";
  system "avconv -y -loglevel quiet -framerate 30 -f image2 -i ${\REBUILD_TMP_DIR}$prefix-%05d.${\REBUILD_FORMAT} -c mjpeg -b 65536k '$outfile'";

  delete_cache($prefix);
  warn join("\t", $outfile, -s $outfile, (-s $outfile / -s $infile), "\n");
  return $outfile;
  }