# [FreeNAS] upgrade ffmpeg



## zygoptera (Oct 29, 2011)

I have gotten in a bit over my neck... I want to upgrade the standard ffmpeg 0.5 to the later stable. Tried 

```
freenas:/# pkg_add -v -r [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports[/url] ... ffmpeg.tbz
```
with response

```
pkg_add: package 'ffmpeg-0.5' or its older version already installed
```

Then did
`pkg_delete -x ffmpeg`

and installed again

```
freenas:/# pkg_add -v -r [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports[/url] ... ffmpeg.tbz
```

Works fine, then

`ffmpeg` 
returns

```
/libexec/ld-elf.so.1: /usr/local/lib/libopencv_core.so.2: unsupported file layout
```

I am lost. How do I solve this?

Running FreeBSD 7.3-RELEASE-p3 (revision 199506)
(In reality the stripped version - Freenas 0.7.2_5543) on amd64


----------



## sk8harddiefast (Oct 29, 2011)

The latest from ports works fine.

```
Port:	ffmpeg-0.7.6,1
```
Remove completely ffmpeg from you system and

```
cd /usr/ports/multimedia/ffmpeg
make config
make install clean
```

Also use this symbol "*#*" to include your code.

[cmd=]pkg_delete -x ffmpeg[/cmd] is better than [cmd=]pkg_delete -x ffmpeg[/cmd]


----------



## zygoptera (Oct 29, 2011)

Thanks,
On the stripped version of FreeBSD that I am using (FreeNAS) there are no compilers or developing tools at all...
Thats why I tried a package install.

I dont understand your last comment 





> [cmd=]pkg_delete -x ffmpeg[/cmd] is better than [cmd=]pkg_delete -x ffmpeg[/cmd]


Did you forget to write something in the command?


----------



## sk8harddiefast (Oct 29, 2011)

just using "*#*" you put the commands in a box.
	
	



```
This is the box
```
Yes. You have right. FreeNAS comes without ports and sources. But you have the 
	
	



```
portsnap
```
 command 

```
portsnap fetch extract
```
 will get the ports tree on your /usr/ports


----------



## zygoptera (Oct 30, 2011)

Ok, I am a bit of a newbie, and even more so on FreeBSD, so bare with....

I don't think FreeNAS can use ports at all. There is no /usr/ports directory, and portsnap seem not to be installed.
I think there are two ways:
-Install FreeBSD on a separate system. Compile ffmpeg on that system. Transfer it (somehow) to the FreenAS system
or
-Make a package of ffmeg that can be installed with pkg_add

For now I don't know if this is correct, and not exactly how to do it.
Is there any other way?

Maybe it is easier to install portsnap first and go that way?
Or some other suggestion?

I would appreciate some guidance to which way would be the easiest.

Do you have any idea about the error message I get?
It would be good to understand why I get the message in the first place.


----------



## sk8harddiefast (Oct 30, 2011)

Upgrade FreeNAS to the latest release. On my FreeNAS, portsnap exists. So Download Latest FreeNAS amd64 GUI update, upgrade via webUI and try again portsnap


----------



## zygoptera (Oct 31, 2011)

Good suggestion, however... I am running  Freenas 0.7.2_5543) on amd64. I suspect you refer to FreeNAS 0.8.x? Unfortunatelly I need to use ZFS and my hardware with only 4GB RAM is too low to run 0.8 with my 4*2TB disks.

Or am I wrong, did they add portsnap to the last version of 0.7.x?


----------



## sk8harddiefast (Oct 31, 2011)

The answer on your questions 
http://imageshack.us/f/338/screenshotro.png/
http://imageshack.us/photo/my-images/707/screenshsot.png/
http://imageshack.us/photo/my-images/190/screenshottr.png/
PS: My NAS uses only 2 x 512 MB RAM


----------



## T-Daemon (Oct 31, 2011)

Hi,


			
				zygoptera said:
			
		

> `ffmpeg`
> returns
> 
> ```
> ...





			
				zygoptera said:
			
		

> It would be good to understand why I get the message in the first place.



Corrupted hints file?


----------



## FreeMWP (Oct 31, 2011)

zygoptera said:
			
		

> Unfortunatelly I need to use ZFS and my hardware with only 4GB RAM is to low to run 0.8 with my 4*2TB disks.
> 
> Or am I wrong, did they add portsnap to the last version of 0.7.x ?



I only got 3GB RAM on my ZFS NAS, and that works fine.

FreeNAS 8.x do have portsnap, but installing anything from ports or packages is not that easy, because FreeNAS is a "running image". That means that changes in e.g. /var will be forgotten at reboot. Also the space is very limited. The solution is to make a jail, or build your own custom FreeNAS image.


----------



## zygoptera (Oct 31, 2011)

I appreciate your comments and experience, but i hesitate after reading the documentation. I do understand that these are real values and not optimistic Microsoft understated hardware specs, but anyway...

I have 8TB so according to the below I should need 8GB of memory to avoid a disabled pre-fetch.

Also, the no-return upgrade make me hesitate, If I upgrade there is no way back unless i take the hassle of doing a full backup. This involves getting a spare set of equal sized storage.



> RAM
> 
> The best way to get the most out of your FreeNASâ„¢ system is to install as much RAM as possible. If your RAM is limited, consider using UFS until you can afford better hardware. ZFS typically requires a minimum of 6 GB of RAM in order to provide good performance; in practical terms (what you can actually install), this means that the minimum is really 8 GB. The more RAM, the better the performance, and the Forums provide anecdotal evidence from users on how much performance is gained by adding more RAM. For systems with large disk capacity (greater than 6 TB), a general rule of thumb is 1GB of RAM for every 1TB of storage.
> 
> NOTE: by default, ZFS disables pre-fetching (caching) for systems containing less than 4 GB of usable RAM. Not using pre-fetching can really slow down performance. 4 GB of usable RAM is not the same thing as 4 GB of installed RAM as the operating system resides in RAM. This means that the practical pre-fetching threshold is 6 GB, or 8 GB of installed RAM. You can still use ZFS with less RAM, but performance will be affected.


----------



## mix_room (Nov 1, 2011)

You also need to question what is constituted by 'good performance'. 
Do you need 'good performance', or is 'decent performance' sufficient for you? Will RAM really limit your performance. 

Do you have FreeNAS installed on the ZFS pool? If not, then why not just pop the pool into a new FreeNAS8 installation?


----------



## zygoptera (Nov 1, 2011)

> why not just pop the pool into a new FreeNAS8 installation?



Interesting idea.
Could someone confirm that FreeNAS 8 would not alter my ZFS pool in any way?
I would like to be reasonably sure I can back down to 0.7 if needed.

Regarding performance; I get ~5MB/s or so on a 100Mbps network, so not fantastic. 
I have WesternDigital Green Advanced Format disks, a known performance hog.

I should say that I can live with this, it is mostly used for a media archive, and I can look at a film while recording a TV show at the same time, so its ok. (Have not tried recording HDTV)
I would wish for a bit faster when doing backups from laptops.


----------



## tingo (Nov 4, 2011)

FreeNAS 8 (8.0.2-release) uses these ZFS versions

```
ZFS filesystem version 4
ZFS storage pool version 15
```
If your FreeNAS 0.7.2 has different versions, I would not risk it; perhaps the pool would be upgraded.


----------

