OpenWrt Forum Archive

Topic: Need compile ffmpeg with --enable-libx264

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

Package ffmpeg_2.6.2-1 compiled without --enable-libx264.
There is problem to record video (without h264 encode!) from ip-camera with h.264 codec.:
"ffmpeg -i rtsp://192.168.2.20:554/Streaming/Channels/2 -s 320x240 -r 10 -an -vcodec copy -y /overlay/video1.avi"
I got error on my tp-link wdr 3600 with Openwrt Chaos Calmer 15.05:
#####################################################
[h264 @ 0x899a10] RTP: missed 1 packets
Last message repeated 1 times
[h264 @ 0x899a10] illegal short term buffer state detected
[h264 @ 0x899a10] RTP: missed 1 packets
[h264 @ 0x899a10] illegal short term buffer state detected
[h264 @ 0x899a10] mmco: unref short failure
[h264 @ 0x899a10] RTP: missed 1 packets
Last message repeated 4 times
[rtsp @ 0x897180] decoding for stream 0 failed
Input #0, rtsp, from 'rtsp://192.168.2.20:554/Streaming/Channels/2':
Metadata:
title : Media Presentation
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264, yuv420p(tv, bt709), 320x240, 10 fps, 10 tbr, 90k tbn, 20 tbc
Output #0, avi, to '/overlay/video1.avi':
Metadata:
INAM : Media Presentation
ISFT : Lavf56.25.101
Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 320x240, q=2-31, 10 fps, 10 tbr, 10 tbn, 10 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x899a10] RTP: missed 1 packets
frame= 0 fps=0.0 q=-1.0 Lsize= 6kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
###################################################

I have no problem to record video with the same option on intel x86 platform (ffmpeg compiled with --enable-libx264) .
I know that problem is miss libx264. Please include in package or help me update Makefile for compiling with it.

I need compile libx264 not for encoding h264! Only for enable to record h.264 video stream WITHOUT encode! Ffmpeg can not correctly parse h264 video stream, libx264 is needed  for parse headers of h.264. So option --disable-asm is no problem. CPU is not loaded while ffmpeg copy stream with option "-v copy".
Please help me, who has good staff of cross-compiling to make Makefile for compile libx264.a and x264.so

You can try to edit your feeds/packages/multimedia/ffmpeg/Makefile (preferably using quilt) to add --enable-libx264 switch under FFMPEG_CONFIGURE section and recompile it to build the package for you.

The discussion might have continued from here.