Hello I'm trying to compile ffmpeg with "--enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb" in ./configure. I've downloaded additional sources, but i can't do this so here is my question could someone add USE flag amr for example to ffmpeg? greeting Tomek. Reproducible: Always Steps to Reproduce: 1. 2. 3.
I believe the issue with the amr codecs is their licensing: Read more here: http://www.voiceage.com/amrsite/tech_nb_faqs.php
I too would like to see AMR support (amr_nb codec) in the ebuild. Licensing is not an issue for the ebuild as we don't actually distribute anything, otherwise we would have had to remove all mp3 apps and libs from Gentoo. RESTRICT=nomirror stops any problems if we have no license to redistribute, which is a different matter that may be at play here.
I have several customized video ebuilds, including full amr_nb and amr_wb support for both mplayer and ffmpeg, using local USE flags amr_nb and amr_wb, which you would put in /etc/portage/package.use. I'll post them as the long as the devs promise not to scold me on the licensing issue.
Created attachment 70233 [details] ffmpeg-0.4.9_p20050906.ebuild with AMR support The ebuild introduces two new local USE flags: amr_nb and amr_wb, which you would add to /etc/portage/package.use, next to whatever else you need, e.g. media-video/ffmpeg aac amr_nb amr_wb The needed codec specifications are downloaded automatically based on these USE flags. The libavcodec subdirectories for the codecs are created and populated and the econf is altered to enable amr narrow and/or wide band, as needed. I have a similar one for mplayer too.
unpack ${A} does unpack everything that got fetched, you can just use mv or don't use ${A}
Luca, The codec zips contain zips themselves, so you should unpack everything. trust me, i worked this out. Phil
Created attachment 70241 [details] mplayer-1.0_pre7-r1.ebuild with AMR support Same idea. I added local USE flags amr_nb and amr_wb, to be added to /etc/portage/package.use, e.g. media-video/mplayer amr_nb amr_wb cdparanoia dts -gtk <etc>
Hello, I've tried to compile the patched ebuilds to get the amr feature but the emerge stop with the following messages emerge =ffmpeg-0.4.9_p20050226-r2 brings me: ------------------------------------------------------------------------------ * Cannot find $EPATCH_SOURCE! Value for $EPATCH_SOURCE is: * * /home/bloodofme/.ebuilds/media-video/ffmpeg/files/gentoo-ffmpeg001.patch * ( gentoo-ffmpeg001.patch ) !!! ERROR: media-video/ffmpeg-0.4.9_p20050226-r2 failed. !!! Function epatch, Line 207, Exitcode 0 !!! Cannot find $EPATCH_SOURCE! !!! If you need support, post the topmost build error, NOT this status message. -------------------------------------------------------------------------------- and emerge =mplayer-1.0_pre7-r1 -------------------------------------------------------------------------------- * Cannot find $EPATCH_SOURCE! Value for $EPATCH_SOURCE is: * * /home/bloodofme/.ebuilds/media-video/mplayer/files/mplayer-1.0_pre6-ppc64.p atch * ( mplayer-1.0_pre6-ppc64.patch ) !!! ERROR: media-video/mplayer-1.0_pre7-r1 failed. !!! Function epatch, Line 207, Exitcode 0 !!! Cannot find $EPATCH_SOURCE! !!! If you need support, post the topmost build error, NOT this status message. -------------------------------------------------------------------------------- Is there something wrong with the source-urls in the ebuilds or did i something wrong? would be happy about some help. greetz bloodofme
I needed to extract audio from 3gp files with ffmpeg as part of a process of converting 3gp to mpg (though if there's an amr flag for mplayer coming soon maybe I won't need ffmpeg at all??). In any case, I manually downloaded and applied the patches, and used the same configure line that the ebuild was, plus the amr options, everything works as expected now.
each overlay area (in your case: $HOME/.ebuilds/media-video/<package name>) must have a "files" subdirectory containing the patches that epatch wants to apply. You want to mimic the structure of /usr/portage/media-video/<package name> exactly. You drop in your ebuilds and patches, digest them and emerge. It's unusual to see a private, hidden overlay like the way yours set yours up. I just use /usr/local/portage. As a footnote, the two packages require some time and effort to keep up with. They are both very dynamic.
in fact the ffmpeg I posted here a while back won't work anymore.....upstrem they eliminated bidirectional settings of the ffmpeg configure options. in other words , for any option 'X' it is now no longet the case that both --enable-X and --disable-X work. Only one side will work. You need to determine which direction works for each item and code an option for that in the ebuild. It's a poor way to write a configure.
I made the adjustments to the latest ebuilds by hand and it all worked fine. I really think Gentoo should allow this as an option.
the next snapshot will provide it, sorry for the delay
Created attachment 81360 [details] mplayer-1.0.20060302.ebuild Luca, Here's the same amr implementation, for mplayer, as I did for ffmpeg in bug 124883. This one is even simpler since mplayer detects the amr directories and configures them automatically. New use flag is 'amr'. ebuild and ebuild diff follows Phil
Created attachment 81361 [details, diff] mplayer-1.0.20060302.ebuild.diff
Hello, I have add amr support to mplayer 20060415 ebuild and playing 3gp sound fails (is mute) with message "[amr_nb @ 0x878bf2c]amr frame too short (18, should be 32)" repeating all the playing time. 20060302 works without any problems. Regards, Radek
Can this be included in portage tree?
I'd rather wait for a native implementation that is due the next season
Is there a native implementation? The mplayer amr patch from April http://lists.mplayerhq.hu/pipermail/mplayer-docs/2006-April/007515.html seems to tell people to do exactly what this ebuild does... that is, download the reference implementation.
Luca, You already added this amr stuff into ffmpeg. The mplayer ebuild changes are essentially the same, in fact even simpler, since mplayer auto-detects and configures for amr when the codec directories are created, so there's nothing to do after src_unpack(), i.e. --enable-amr is automatic. Interesting that the mplayer patch mentioned in comment 19 uses links that are dead. They should mention the archive/26_series links, as in the ebuilds. Phil
there is a ffmpeg amr native implementation getting developed right now, if there is that need for amr I'll add an -r1
I took some time to put a -r1 with some new features, please tell me if it is working for you
Luca, Looks good here. Phil $ mplayer -novideo sample.3gp MPlayer 1.0pre8-3.4.6 (C) 2000-2006 MPlayer Team CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 93 audio & 211 video codecs Playing sample.3gp. ISO: File Type Major Brand: 3GPP Profile 5 Quicktime/MOV file format detected. ========================================================================== Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000) Selected audio codec: [ffamrnb] afm: ffmpeg (AMR Narrowband) ========================================================================== alsa-init: using device default alsa: 8000 Hz/1 channels/2 bpf/32768 bytes buffer/Signed 16 bit Little Endian AO: [alsa] 8000Hz 1ch s16le (2 bytes per sample) Video: no video Starting playback... A: 3.1 (03.0) of 5.0 (05.0) 0.3% alsa-uninit: pcm closed
Luca, I've tested both amrnb and amrwb and both work. Thanks, Stephane mplayer mp4-amrnb_c01_176x144_064kbps_08khz_005kbps_mono.3gp MPlayer 1.0pre8-3.4.6 (C) 2000-2006 MPlayer Team CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 12, Stepping: 0) MMX supported but disabled MMX2 supported but disabled SSE supported but disabled SSE2 supported but disabled 3DNow supported but disabled 3DNowExt supported but disabled CPUflags: MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0 Compiled for x86 CPU with extensions: 93 audio & 211 video codecs Playing mp4-amrnb_c01_176x144_064kbps_08khz_005kbps_mono.3gp. ISO: File Type Major Brand: 3GPP Profile 4 Quicktime/MOV file format detected. VIDEO: [mp4v] 176x144 24bpp 15.000 fps 0.0 kbps ( 0.0 kbyte/s) ========================================================================== Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000) Selected audio codec: [ffamrnb] afm: ffmpeg (AMR Narrowband) ========================================================================== ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4) ========================================================================== AO: [oss] 8000Hz 1ch s16le (2 bytes per sample) Starting playback... VDec: vo config request - 176 x 144 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.33:1 - prescaling to correct movie aspect. VO: [xv] 176x144 => 192x144 Planar YV12 No bind found for key 'c'. % 2% 0.2% 0 0 A: 5.5 V: 5.5 A-V: 0.001 ct: 0.002 84/ 84 1% 1% 0.2% 0 0 Exiting... (Quit) mplayer mp4-amrwb_d01_174x120_052kbps_16khz_012kbps_mono.3gp MPlayer 1.0pre8-3.4.6 (C) 2000-2006 MPlayer Team CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 12, Stepping: 0) MMX supported but disabled MMX2 supported but disabled SSE supported but disabled SSE2 supported but disabled 3DNow supported but disabled 3DNowExt supported but disabled CPUflags: MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0 Compiled for x86 CPU with extensions: 93 audio & 211 video codecs Playing mp4-amrwb_d01_174x120_052kbps_16khz_012kbps_mono.3gp. ISO: File Type Major Brand: 3GPP Profile 4 Quicktime/MOV file format detected. VIDEO: [mp4v] 174x120 4bpp 15.152 fps 0.0 kbps ( 0.0 kbyte/s) ========================================================================== Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders AUDIO: 16000 Hz, 1 ch, s16le, 256.0 kbit/100.00% (ratio: 32000->32000) Selected audio codec: [ffamrwb] afm: ffmpeg (AMR Wideband) ========================================================================== ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4) ========================================================================== AO: [oss] 16000Hz 1ch s16le (2 bytes per sample) Starting playback... VDec: vo config request - 174 x 120 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.33:1 - prescaling to correct movie aspect. VO: [xv] 174x120 => 174x130 Planar YV12 A: 6.0 V: 5.9 A-V: 0.018 ct: -0.010 30/ 30 2% 1% 1.1% 0 0 Exiting... (Quit)