Can't find preset files
Asked Answered
D

1

7

this is a ffmpeg issue. I've got this error saying it could not find the hq preset file, then I read in the documentation that it looks for the preset files at 'PREFIX/share/ffmpeg' and also at '$HOME/.ffmpeg'. The thing is I'm calling ffmpeg from whithin a php file that calls a python script that finally executes the command something like 'commands.getstatusoutput(command)' so I was not sure who the user was.

The solution? I just used -fpre and my call now looks like this:

/usr/local/bin/ffmpeg -i ../files/tmpvideos/myStream.flv -y -acodec libfaac -ab 96k -b 800k -maxrate 800k -minrate 600k -bufsize 800k -s 720x640 -vcodec libx264 -g 300 -r 20 -fpre /home/admin/.ffmpeg/libx264-hq.ffpreset -threads 0 ../files/tmpvideos/4647-60.mp4

I created that directory under /home/admin and am 100% sure that there the file is there now, but still ffmpeg says:

File for preset '/home/admin/.ffmpeg/libx264-hq.ffpreset' not found

So I'm not sure why is it not working since I'm specifying the complete path now. Any ideas?

One reason that I'm thinking of, is that it maybe was not compiled correctly, like with all the flags and stuff. What I mean is that while some outputs out there looked like this:

FFmpeg version SVN-r22976, Copyright (c) 2000-2010 the FFmpeg developers
  built on Apr 30 2010 12:03:12 with gcc 4.2.1-sjlj (mingw32-2)
  configuration: --enable-shared --enable-static --enable-memalign-hack
--enable
-libmp3lame --enable-libx264 --enable-gpl
  libavutil     50.14. 0 / 50.14. 0
  libavcodec    52.66. 0 / 52.66. 0
  libavformat   52.61. 0 / 52.61. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0

mine looks more like this:

Output: FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Nov 12 2010 16:32:38 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration:
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0

No configuration stuff. What do u think? could be that this ffmpeg was not compiled correctly so it will never find the presets? I didn't compile it, so can't be sure.

Thanks and sorry for the verbosity of the question.

Nelson

Dogeared answered 22/11, 2010 at 15:20 Comment(0)
D
8

Well.. it turned out the ffmpeg I was used was not compiled to work with the h.264 codec, that's why it was not looking for presets.

To fix it, I more or less followed the steps described in this link: http://www.pawprint.net/news/?action=view&nid=105

Some thing were already installed, so I didn't do everything that is described there, but the guide sure helped me a lot. Hope it helps others having the same issue too.

Nelson

Dogeared answered 1/12, 2010 at 22:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.