Howto compile ffplay.c in seperate directory with my own svn-version of ffmpeg
Dear All I have compiled svn-version of ffmpeg. I only do configure and make. I do not do make install because I don't want this svn-version of ffmpeg to overwrite the 'official' Ubuntu version of ffpeg that is also on the host. Now I want to compile my own version of ffplay.c so I create a directory ffplay at the same level as the svn ffmpeg-directory. I copy ffplay.c from ffmpeg to ffplay. Now what gcc options should I use to compile ffplay.c? I tried with this but got tons of errors: gcc -o ffplay ffplay.c -I../ffmpeg -L../ffmpeg/libavcodec -L../ffmpeg/libavformt -L../ffmpeg/libswscale -L../ffmpeg/libavutil -lavcodec -lavformat -lswscale -lavutil -lmp3lame -lx264 `sdl-config --cflags --libs` I note that when I do the make in the svn ffmpeg-directory there are a lot of options on the gcc command. I hardly know any of the options. Thanks in advance
tps wrote:
Dear All
I have compiled svn-version of ffmpeg. I only do configure and make. I do not do make install because I don't want this svn-version of ffmpeg to overwrite the 'official' Ubuntu version of ffpeg that is also on the host.
What path is the Ubuntu-installed version at? ('which ffmpeg' should tell you.) Most likely, the Ubuntu-installed version will be at /usr/bin/ffmpeg or similar. By default, the SVN version should install to /usr/local/bin/ffmpeg; it should therefore not overwrite the official version.
Now I want to compile my own version of ffplay.c so I create a directory ffplay at the same level as the svn ffmpeg-directory.
I copy ffplay.c from ffmpeg to ffplay.
Now what gcc options should I use to compile ffplay.c?
As you've seen by looking at the output of make, it can get quite complicated. The most straightforward way to do it would be to just copy the entire FFmpeg source tree, make whatever changes you want to the source, and compile the result with 'make'. -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
tps wrote:
Dear All
I have compiled svn-version of ffmpeg. I only do configure and make. I do not do make install because I don't want this svn-version of ffmpeg to overwrite the 'official' Ubuntu version of ffpeg that is also on the host.
What path is the Ubuntu-installed version at? ('which ffmpeg' should tell you.)
Most likely, the Ubuntu-installed version will be at /usr/bin/ffmpeg or similar. By default, the SVN version should install to /usr/local/bin/ffmpeg; it should therefore not overwrite the official version.
Now I want to compile my own version of ffplay.c so I create a directory ffplay at the same level as the svn ffmpeg-directory.
I copy ffplay.c from ffmpeg to ffplay.
Now what gcc options should I use to compile ffplay.c?
As you've seen by looking at the output of make, it can get quite complicated. The most straightforward way to do it would be to just copy the entire FFmpeg source tree, make whatever changes you want to the source, and compile the result with 'make'.
-- The Wanderer
This Ubuntu specific compilation guide may be useful and installs to /usr/local/bin/ffmpeg as The Wanderer has already mentioned: http://ubuntuforums.org/showthread.php?t=786095 Note that you will need libsdl1.2-dev as described under "Optional Dependencies". You will also need to alter the checkinstall line, changing the pkgname for example, or skip checkinstall, as this guide is configured to "replace" the repository FFmpeg to prevent package management issues.
lou at fakeoutdoorsman.com skrev:
tps wrote:
Dear All
I have compiled svn-version of ffmpeg. I only do configure and make. I do not do make install because I don't want this svn-version of ffmpeg to overwrite the 'official' Ubuntu version of ffpeg that is also on the host.
What path is the Ubuntu-installed version at? ('which ffmpeg' should tell you.)
Most likely, the Ubuntu-installed version will be at /usr/bin/ffmpeg or similar. By default, the SVN version should install to /usr/local/bin/ffmpeg; it should therefore not overwrite the official version.
Your are right on both issues!
Now I want to compile my own version of ffplay.c so I create a directory ffplay at the same level as the svn ffmpeg-directory.
I copy ffplay.c from ffmpeg to ffplay.
Now what gcc options should I use to compile ffplay.c?
As you've seen by looking at the output of make, it can get quite complicated. The most straightforward way to do it would be to just copy the entire FFmpeg source tree, make whatever changes you want to the source, and compile the result with 'make'.
-- The Wanderer
This Ubuntu specific compilation guide may be useful and installs to /usr/local/bin/ffmpeg as The Wanderer has already mentioned:
http://ubuntuforums.org/showthread.php?t=786095
Note that you will need libsdl1.2-dev as described under "Optional Dependencies". You will also need to alter the checkinstall line, changing the pkgname for example, or skip checkinstall, as this guide is configured to "replace" the repository FFmpeg to prevent package management issues. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Thanks - I followed the Ubuntu specific compilation guide including removing the 'official' Ubuntu ffmpeg package. Reading the guide I now believe it is ok only to have the SVN version of ffmpeg on my host. Now I am able to create a new directory and write my 'own' player, tps.c, in that directory. So far it is pretty simple. It only shows video. No timing issus, no audio, no seeking etc. Still I am able to compile with this gcc command: gcc -o tps tps.c -I/usr/local/include -L/usr/local/lib -lavformat -lavcodec -lavutil -lz `sdl-config --cflags --libs` -lmp3lame -ltheora -lxvidcore -lx264 -lfaac -lfaad -lbz2 I still wonder what all the gcc options on the 'official' SVN make do! I fear my simple gcc command line will produce a slow (not optimized) player - any comments? Again Thanks for all the help. Thomas S
hi , try this we can surely compile ffplay independently... gcc -o sample ffplay.c cmdutils.c -I../ffmpeg -L../ffmpeg/libavcodec -L../ffmpeg/libavformt -L../ffmpeg/libswscale -L../ffmpeg/libavutil -L../ffmpeg/libavfilter -L../ffmpeg/libavdevice -L../ffmpeg/libpostproc -lpostproc -lavdevice -lavfilter -lavformat -lswscale -lavutil -lmp3lame -lx264 `sdl-config --cflags --libs` -lz -lbz2 -lavcodec thanks mahesh raja -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Howto-compile-ffplay-c-in-seperate-... Sent from the FFmpeg-users mailing list archive at Nabble.com.
I realize I'm late to the thread, but I had good success by using "make" to tell me what it would do if the file ffplay.c had changed: make --dry-run -W ffplay.c The -W switch pretends ffplay.c has changed and --dry-run prints out the resulting MAKE commands, which are unique to your ./configuration settings and platform. My output looked like the following: printf "CC\t%s\n" ffplay.o; (followed by an over 900 character string commanding the compile) printf "LD\t%s\n" ffplay_g; (followed by almost 800 character string commanding the library use) printf "CP\t%s\n" ffplay; cp -p ffplay_g ffplay printf "STRIP\t%s\n" ffplay; strip ffplay -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Howto-compile-ffplay-c-in-seperate-... Sent from the FFmpeg-users mailing list archive at Nabble.com.
participants (5)
-
inverseparadox@comcast.net -
lou@fakeoutdoorsman.com -
maheshraja -
RichR -
tps@netmaster.dk