Question: I'm using the following to get the data for a user to be printed on a label.

```
$db = JFactory::getDBO();
$user =& JFactory::getUser();
$uid = $user->id;

$query = $db->getQuery(true);

$query
    ->select(array('user_id', 'profile_key', 'profile_value', 'ordering'))
    ->from('#__user_profiles')
    ->where('user_id LIKE $uid')
    ->order('ordering ASC');

$db->setQuery($query);

$result = $db->loadObjectList();

foreach ( $result as $row ) {
   if ($row->profile_key == 'profile.firstname') $fname = $row->profile_value;
   if ($row->profile_key == 'profile.middlename') $mname = $row->profile_value;
   if ($row->profile_key == 'profile.lastname') $lname = $row->profile_value;
   if ($row->profile_key == 'profile.address1') $aline1 = $row->profile_value;
   if ($row->profile_key == 'profile.address2') $aline2 = $row->profile_value;
   if ($row->profile_key == 'profile.city') $city = $row->profile_value;
   if ($row->profile_key == 'profile.state') $state = $row->profile_value;
   if ($row->profile_key == 'profile.postalcode') $zipcode = $row->profile_value;
}

```

Is there a simpler way of writing this code?

I'm using Joomla 2.5.11

Answer: 
The option

> 
> -metadata:s:1 language=eng
> 
> 
> 

sets metadata language to `eng` on the stream id 1 (which is, in typical cases, the first audio stream). Whereas the option

> 
> -metadata:s:s:0 language=eng
> 
> 
> 

sets the metadata language to `eng` on the first subtitle stream.

From ffmpeg manpage:

> 
> -metadata[:metadata\_specifier] key=value (output,per-metadata)  
> 
>  Set a metadata key/value pair.
> 
> 
> An optional `metadata_specifier` may be given to set metadata on streams or chapters. See "-map\_metadata" documentation for details.
> 
> 
> s[:stream\_spec]  
> 
>  per-stream metadata. `stream_spec` is a stream specifier as described in the Stream specifiers chapter. In an input metadata specifier, the first matching stream is copied from. In an output metadata specifier, all matching streams are copied to.
> 
> 
> 

And finally from the chapter of stream specifiers, we see

> 
> Possible forms of stream specifiers are:  
> 
> `stream_index`  
> 
>  Matches the stream with this index. E.g. "-threads:1 4" would set the thread count for the second stream to 4.
> 
> 
> `stream_type[:stream_index]`  
> 
> `stream_type` is one of: 'v' for video, 'a' for audio, 's' for subtitle, 'd' for data and 't' for attachments. If `stream_index` is given, then matches stream number `stream_index` of this type. Otherwise matches all streams of this type.
> 
> 
>
After some research, found the reason why -slang didn't work. In fact you use a recent version of ffmpeg and it's a good thing but if [the documentation](http://www.ffmpeg.org/ffmpeg.html#Subtitle-options_003a) still describe the option, you can find in the [ChangeLog](https://raw.github.com/FFmpeg/FFmpeg/master/Changelog):

```
version 0.9:
...
 * -metadata can now be used to set metadata on streams and chapters, e.g.
      -metadata:s:1 language=eng sets the language of the first stream to 'eng'.
      This made -vlang/-alang/-slang options redundant, so they were removed.

```

When you find a command line example, check if the option used are in Your version of ffmpeg.

```
 ffmpeg --help >> ffmpeg-doc.txt

```

The `-slang` option isn't in.

But it also proof that the on-line documentation about ffmpeg is sometime incorrect regarding the code change.