Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
On Fri, Oct 18, 2019 at 15:49:06 +0530, Anand Veerappan wrote: Could you *please* copy text from the console into your e-mails, and not use screenshots? Thanks. > Thanks for sharing the details. We tried those steps and could able to > generate libx264-mv.so & libx264-mv.so.152 perfectly. [...] > Step 2: Build FFmpeg source after Step 1 we are facing compilation error. Because you also renamed libx264.so to libx264-mv.so, but ffmpeg doesn't know it needs to look for libx264-mv.so. It uses "-lx264" and not "-lx264-mv". Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
On Wed, Oct 16, 2019 at 17:28:25 +0530, Anand Veerappan wrote: > * objdump -p /usr/lib/libx264.so.152 | grep SONAME- Please show us the > output of objdump -p /usr/lib/libx264-mv.so.152 | grep SONAME* > *Ans: Though we renamed libx264-mv.so.152 but it is > referring libx264.so.152 only* > *Refer below mentioned obj dump. * > [image: console.jpg] This shows me that your changes of the libx264 build process did not change the SONAME as intended. The SONAME of libx264-mv.so.152 is still "libx264.so.152", so something went wrong there. libx264 is not part of ffmpeg, so that doesn't really belong here. I tried your change to libx264's configure (editing the definition of SONAME to include "-mv"), and I got the proper shared library: $ objdump -p libx264-mv.so.157 | grep SONAME SONAME libx264-mv.so.157 You should check this immediately after compilation of libx264-mv.so.XYZ, and then check whether you perhaps copied the wrong version of libx264 to your target directory. > Kindly guide us where to make changes to use modified libx264-mv.so.152 in > ffmpeg binary. ffmpeg will do the right thing, once libx264.so points to the correctly compiled libx264-mv.so.XYZ. Cheers, Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
On Tue, Oct 15, 2019 at 10:48:06 +0530, Anand Veerappan wrote: > Step 1: As mentioned in your email we remanded the libx264-mv.so.152 file. You obviously went for the less hacky, but more correct way. > Step 3: While executing FFmpeg binary it requires original libx264.so.152 > instead of modified libx264-mv.so.152. This means that, when ffmpeg was linked, it found a libx264.so with an SONAME of libx264.so.152. So perhaps the libx264.so symlink was pointing at a different libx264.so.XXX (i.e. the original one). - Where is your libx264.so located? Please show the output of ls -l /usr/lib/libx264.so (or to whatever its path is - replace /usr/lib with the actual path please). - Please show us the output of objdump -p /usr/lib/libx264.so.152 | grep SONAME - Please show us the output of objdump -p /usr/lib/libx264-mv.so.152 | grep SONAME > Regards > Anand V BTW, I'm subscribed to the list, that's how I saw your original question. You don't need to Cc: me on your emails. Furthermore, instead of using screenshots of text, just copy and paste text into your email. It's much more efficient and easier to read. Thanks, Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
On Thu, Oct 10, 2019 at 17:45:15 +0200, Carl Eugen Hoyos wrote: > Am Do., 10. Okt. 2019 um 16:45 Uhr schrieb Moritz Barsnick : > > In other words: > > - Rename libx264.so.XYZ > > > - Change the dependency on the depending component of ffmpeg using "patchelf > > -replace-needed" (no copies needed as in my proof of concept) > > As long as FFmpeg is open-source software: > Isn't it much easier to link again? That defeats the quick hack: During build-time linking, the linker takes the referenced dynamic library's "SONAME" and uses that for the resulting binary's "NEEDED". This means you would need to modify libx264.so's SONAME as well[*]. Sure, you can also do that with patchelf. But you're suggesting the actual sources - the proper, "clean" way - so you would need to: - modify libx264's build scripts to use a different target file name - modify libx264's build scripts to use a different target soname - and rebuild libx264 thus - possibly modify libx264's pkgconfig file (assuming ffmpeg uses that) - build ffmpeg against the modified pkgconfig file, or have it refer to the modified library name That may be the proper way, especially if you want to build more than one competing library (like for experiments with various optimizations). But we don't know the intent of the original poster, so that might be going too far. [*] You would also need to provide a modified symlink libx264.so -> libx264_modified.so.15x. Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
Am Do., 10. Okt. 2019 um 16:45 Uhr schrieb Moritz Barsnick : > > Hi Anand, > > On Thu, Oct 10, 2019 at 15:45:14 +0530, Anand wrote: > > I compiled FFmpeg and generated shared library. > > > I want to rename libx264(libx264.so.152) to customized name > > libx264_xxx.so.152 in FFmpeg. To adapt this change please let me know > > the places where I should modify. > > As Harald said: Without context, this doesn't make much sense to us. > > We don't even know what kind of system this is. (Assumption: some kind > of Unix, probably Linux?). Whether you need a hack or a sustainable > solution. > > Here's a hack on systems with ELF binaries (such as Linux). You need > patchelf >= 0.9: > > # check the original ffmpeg and the library which pulls in libx264 > [barsnick@paradise ~]$ ldd -r /usr/bin/ffmpeg | grep libx264 > libx264.so.155 => /lib64/libx264.so.155 (0x7fdec6cf2000) > [barsnick@paradise ~]$ ldd /usr/lib64/libavcodec.so.58 | grep libx264 > libx264.so.155 => /lib64/libx264.so.155 (0x7f11337c5000) > # proof of concept: create a version of libx264 with a new name (step 1 of > your required steps) > [barsnick@paradise ~]$ cp -p /usr/lib64/libx264.so.155 ./libx264_mine.so.155 > # proof of conecpt: create a copy of ffmpeg's dependent lib > [barsnick@paradise ~]$ cp -p /usr/lib64/libavcodec.so.58 ./ > # modify the lib's dependency on libx264 to use the new name (step 2 of your > required steps) > [barsnick@paradise ~]$ patchelf --replace-needed libx264.so.155 > libx264_mine.so.155 ./libavcodec.so.58 > # check the modified copy of the ffmpeg library > [barsnick@paradise ~]$ ldd ./libavcodec.so.58 | grep libx264 > libx264_mine.so.155 => not found > [barsnick@paradise ~]$ LD_LIBRARY_PATH=. ldd -r ./libavcodec.so.58 | grep > libx264 > libx264_mine.so.155 => ./libx264_mine.so.155 (0x7f583d15f000) > # check ffmpeg when using the modified copy of the ffmpeg library > [barsnick@paradise ~]$ LD_LIBRARY_PATH=. ldd -r /usr/bin/ffmpeg | grep libx264 > libx264_mine.so.155 => ./libx264_mine.so.155 (0x7f6ba26a7000) > > In other words: > - Rename libx264.so.XYZ > - Change the dependency on the depending component of ffmpeg using "patchelf > -replace-needed" (no copies needed as in my proof of concept) As long as FFmpeg is open-source software: Isn't it much easier to link again? Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
Hi Anand, On Thu, Oct 10, 2019 at 15:45:14 +0530, Anand wrote: > I compiled FFmpeg and generated shared library. > I want to rename libx264(libx264.so.152) to customized name > libx264_xxx.so.152 in FFmpeg. To adapt this change please let me know > the places where I should modify. As Harald said: Without context, this doesn't make much sense to us. We don't even know what kind of system this is. (Assumption: some kind of Unix, probably Linux?). Whether you need a hack or a sustainable solution. Here's a hack on systems with ELF binaries (such as Linux). You need patchelf >= 0.9: # check the original ffmpeg and the library which pulls in libx264 [barsnick@paradise ~]$ ldd -r /usr/bin/ffmpeg | grep libx264 libx264.so.155 => /lib64/libx264.so.155 (0x7fdec6cf2000) [barsnick@paradise ~]$ ldd /usr/lib64/libavcodec.so.58 | grep libx264 libx264.so.155 => /lib64/libx264.so.155 (0x7f11337c5000) # proof of concept: create a version of libx264 with a new name (step 1 of your required steps) [barsnick@paradise ~]$ cp -p /usr/lib64/libx264.so.155 ./libx264_mine.so.155 # proof of conecpt: create a copy of ffmpeg's dependent lib [barsnick@paradise ~]$ cp -p /usr/lib64/libavcodec.so.58 ./ # modify the lib's dependency on libx264 to use the new name (step 2 of your required steps) [barsnick@paradise ~]$ patchelf --replace-needed libx264.so.155 libx264_mine.so.155 ./libavcodec.so.58 # check the modified copy of the ffmpeg library [barsnick@paradise ~]$ ldd ./libavcodec.so.58 | grep libx264 libx264_mine.so.155 => not found [barsnick@paradise ~]$ LD_LIBRARY_PATH=. ldd -r ./libavcodec.so.58 | grep libx264 libx264_mine.so.155 => ./libx264_mine.so.155 (0x7f583d15f000) # check ffmpeg when using the modified copy of the ffmpeg library [barsnick@paradise ~]$ LD_LIBRARY_PATH=. ldd -r /usr/bin/ffmpeg | grep libx264 libx264_mine.so.155 => ./libx264_mine.so.155 (0x7f6ba26a7000) In other words: - Rename libx264.so.XYZ - Change the dependency on the depending component of ffmpeg using "patchelf -replace-needed" (no copies needed as in my proof of concept) Cheers, Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
Am 10.10.19 um 14:18 schrieb d.shuman: > It is reasonable that one could be experienced building open source software > (I wish i was) and also be using the ffmpeg app for the first time. the question without context and what to gain makes no sense, no matter how much expierience Sent from my T-Mobile 4G LTE Device throw it away - wrap everything in a single line is not cool > Original message From: Reindl Harald > Date: 10/10/19 07:06 (GMT-05:00) To: > ffmpeg-user@ffmpeg.org Subject: Re: [FFmpeg-user] how to rename libx264 shared > library(libx264.so.152) in FFmpeg Am 10.10.19 um 12:15 schrieb Anand:> I am > new to FFmpeg. > > I compiled FFmpeg and generated shared library. > > I want > to rename libx264(libx264.so.152) to customized name libx264_xxx.so.152 in > FFmpeg. To adapt this change please let me know the places where I should > modify.you can't and you don't gain anything by just rane some files, > thefilename is independent from the ABI/API in the binarythis is one of the > many posts asking "how to implement my solutionwithout describe the problem > to solve" and that donÄt make much senseespecially when you state "I am new > to FFmpeg"___ffmpeg-user mailing > listffmpeg-user@ffmpeg.orghttps://ffmpeg.org/mailman/listinfo/ffmpeg-userTo > unsubscribe, visit link above, or emailffmpeg-user-requ...@ffmpeg.org with > subject "unsubscribe" ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
It is reasonable that one could be experienced building open source software (I wish i was) and also be using the ffmpeg app for the first time. I wish I could help.Personally, I may want to build ffmpeg in the future to enable hardware encoding support, if I read the documentation correctly this is requiredSent from my T-Mobile 4G LTE Device Original message From: Reindl Harald Date: 10/10/19 07:06 (GMT-05:00) To: ffmpeg-user@ffmpeg.org Subject: Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg Am 10.10.19 um 12:15 schrieb Anand:> I am new to FFmpeg. > > I compiled FFmpeg and generated shared library. > > I want to rename libx264(libx264.so.152) to customized name libx264_xxx.so.152 in FFmpeg. To adapt this change please let me know the places where I should modify.you can't and you don't gain anything by just rane some files, thefilename is independent from the ABI/API in the binarythis is one of the many posts asking "how to implement my solutionwithout describe the problem to solve" and that donÄt make much senseespecially when you state "I am new to FFmpeg"___ffmpeg-user mailing listffmpeg-user@ffmpeg.orghttps://ffmpeg.org/mailman/listinfo/ffmpeg-userTo unsubscribe, visit link above, or emailffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
Am 10.10.19 um 12:15 schrieb Anand: > I am new to FFmpeg. > > I compiled FFmpeg and generated shared library. > > I want to rename libx264(libx264.so.152) to customized name > libx264_xxx.so.152 in FFmpeg. To adapt this change please let me know the > places where I should modify. you can't and you don't gain anything by just rane some files, the filename is independent from the ABI/API in the binary this is one of the many posts asking "how to implement my solution without describe the problem to solve" and that donÄt make much sense especially when you state "I am new to FFmpeg" ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
Hi I am new to FFmpeg. I compiled FFmpeg and generated shared library. I want to rename libx264(libx264.so.152) to customized name libx264_xxx.so.152 in FFmpeg. To adapt this change please let me know the places where I should modify. Regards Anand V Sent from Mail for Windows 10 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] how to rename libx264 shared library(libx264.so.152) in FFmpeg
Hi I am new to FFmpeg. I compiled FFmpeg and generated shared library. I want to rename libx264(libx264.so.152) to customized name libx264_xxx.so.152 in FFmpeg. To adapt this change please let me know the places where I should modify. Regards Anand ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".