OpenWrt Forum Archive

Topic: ffmpeg: Adding h264 encoding

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Task: From a bunch of jpgs, create a h264 video

Problem: 'ffmpeg -codecs' shows  D V D  h264 -> no h264 encoder present

Question: How can I add h264 encoder support to ffmpeg?
Can I simply modify the ffmpeg Makefile and add h264 to the below section?

FFMPEG_CUSTOM_ENCODERS:= \
        ac3 \
        jpegls \
        mpeg1video \
        mpeg2video \
        mpeg4 \
        pcm_s16be \
        pcm_s16le \
        png \
        vorbis \
        zlib \

Currently installed:
ffmpeg - 0.11.5-1
libffmpeg-full - 0.11.5-1

(Last edited by tmo26 on 13 Jun 2014, 06:29)

add h264, might need x264/libx264 but I found no info about openwrt.

tmo26,

Have you finally succeeded with this task? I'm facing the same problem.
Seems Libx264 can be compiled without yasm - there is a specific option for that.

No, I gave up after my last posting.

Found on the net:
"If you really want to compile without asm, configure with --disable-asm."
"Also, you don't want to build without ASM, because it would be sloooow."

Sounds doable, but with the downside of being (very) slow.

Since creating a new package like h264 is way out of my scope, I won't do any more research on this topic.

However, if someone manages to get it working, I'd be interesting in testing it smile

i tried ffmpeg on a wd mbl, ppc 800 Mhz, with --disable-asm, and transcoding of a 1080 to 720 was less than 1fp/s, basically useless. the cpu doesn't have NEON, which would speed things up. unfortunately, majority of router/nas cpu's doesn't have NEON, that's why the --disable-asm is required.

hi guys smile
it's possible or not include the encoder x264??
I have encode 100jpg with ffmpeg but the result it's an mp41 and html5 video or jwplayer not play because incompatible.
For encode an mp42, compatible with jwplayer or tag video html5, it is necessary x264 encoder.
Anyone can test this feature?
many thanks

lag wrote:

it's possible or not include the encoder x264??

If you read this thread, you will see that it is indeed possible (for some routers), but you do not want it, since with "--disable-asm" it will be painfully slow.

That's the reason why there's no x264 package available for openwrt.

If you really want it: Compile it yourself, package it and provide it to the community.

The discussion might have continued from here.