Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install from scratch on Pi instructions? #17

Open
kevinlieb opened this issue Dec 7, 2016 · 7 comments
Open

Install from scratch on Pi instructions? #17

kevinlieb opened this issue Dec 7, 2016 · 7 comments

Comments

@kevinlieb
Copy link

Can we get instructions how to install on the Pi from scratch?
I get errors in make about:
/usr/bin/ld: cannot find -lavformat
/usr/bin/ld: cannot find -lavcodec
/usr/bin/ld: cannot find -lavutil

I downloaded ffmpeg from dickontoo's area but not sure what to do with it.

modified CFLAGS to include:
-I/home/pi/ffmpeg

Thanks!

@Frodox
Copy link

Frodox commented Dec 21, 2016

How to you deal with headers? I get

$ make
gcc -Wall -Wno-format -g -I/opt/vc/include/IL -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -L/usr/local/lib -I/usr/local/include -c omxtx.c
omxtx.c:43:32: fatal error: libavcodec/avcodec.h: No such file or directory
 #include "libavcodec/avcodec.h"
                                ^
compilation terminated.
Makefile:14: recipe for target 'omxtx.o' failed
make: *** [omxtx.o] Error 1

I can write instruction if I can build it..

@Frodox
Copy link

Frodox commented Dec 21, 2016

@kevinlieb Where did you get "libavcodec/avcodec.h" from?
What do you mean

I downloaded ffmpeg from dickontoo's area
..?

@tim-devel
Copy link

libavcodec-dev or something like that I would assume

@Frodox
Copy link

Frodox commented Dec 23, 2016

@timstanley1985 oh, thank you! I use dpkg -S to find package, which was wrong..
After installing libavformat-dev libavcodec-dev I can compiles it fine.
Now the problem - how to use omxtx..? I want to encode video with x264 codec, but looks like it allows only to change bitrait..

@dickontoo
Copy link
Owner

It will transcode from MPEG 2 and VC-1 if you have the correct licence keys, which you can buy (cheaply) from the Foundation. Otherwise you're limited to whatever the Pi's hardware will do without the licences (which I think is just H.264 and related codecs).

@Frodox
Copy link

Frodox commented Dec 23, 2016

@dickontoo hmmm, well, I just want to have analog of command:

Rpi $ raspivid -fps 25 -t 10000 -o 10-fhd.h264
Rpi $ scp 10-fhd.h264 ...
Linux-pc $ avconv -r 25 -i 10-fhd.h264 -vcodec h264 -acodec copy 10-fhd.mkv

running of

Rpi $ ./omxtx -b 10000000 10-fhd.h264 10-fhd.mkv

works strange, because I get very short video (80ms) with 2 575.000 fps, instead of 10s and 25 fps..

is it possible? Or, it is not use-case for omxtx?

@dickontoo
Copy link
Owner

I'm not sure what you're trying to do there -- raspivid records to H.264 already. omxtx is really for converting pre-recorded data in a suitable container into H.264 from some other codec. You could try repacking the raw file with something like:

ffmpeg -i 10-fhd.h264 -r 25 -codec copy 10-fhd.mkv

before transcoding it, but I'm not sure what that will buy you. Better to set the bitrate in raspivid first (I assume that's possible; I haven't looked at it in years).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants