Newest 'libx264' Questions - Stack Overflow
Les articles publiés sur le site
-
ffserver — live streaming to iOS, Android, Flash
12 juillet 2013, par Stanislav SaranchinI'm creating live streaming transcoding from IPTV to Web into several formats like WebM, Flash, HLS using FFServer and FFMpeg at once.
ffserver.conf located at http://pastebin.com/hUky5Jsh
Translating of source-stream to FFServer:
ffmpeg -i udp://239.192.192.1:1234 -s 560x320 http://localhost:8090/feed.ffm
FFServer's logs showing next:
Fri Jul 12 11:39:50 2013 127.0.0.1 - - New connection: GET /feed.ffm Fri Jul 12 11:39:50 2013 127.0.0.1 - - [GET] "/feed.ffm HTTP/1.1" 200 4175 Fri Jul 12 11:39:50 2013 127.0.0.1 - - New connection: POST /feed.ffm Fri Jul 12 11:39:50 2013 Feed '/tmp/feed.ffm' stream number does not match registered feed Fri Jul 12 11:39:50 2013 127.0.0.1 - - [POST] "/feed.ffm HTTP/1.1" 200 4096
My brain is very hot after googling solution on the Internet.
FFServer:
ffserver version N-37738-g15cee5e Copyright (c) 2000-2013 the FFmpeg developers built on Jul 11 2013 17:01:41 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1) configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
FFMpeg:
ffmpeg version N-37738-g15cee5e Copyright (c) 2000-2013 the FFmpeg developers built on Jul 11 2013 17:01:41 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1) configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
Source-stream is:
Input #0, mpegts, from 'udp://239.192.192.1:1234': Duration: N/A, start: 80091.027433, bitrate: 192 kb/s Program 702 Stream #0:0[0x322]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 544x576 [SAR 32:17 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x386](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
-
FFmpeg settings to convert MTS into MPG for YouTube
17 juin 2013, par JJDI would like to discuss the optimal parameters for FFmpeg to convert an MTS video file with the following profile for the upload onto YouTube. YouTube published their suggested resolutions and bitrates settings.
// Input video profile Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 256 kb/s
Since YouTube has length restrictions to the videos I also want to cut the original file into pieces.
Here is my current configuration to convert a video. I am running Ubuntu 10.10. with FFmpeg version git-2011-12-31-81980bf.
ffmpeg -ss 00:15:00 -i input.mts -t 00:30:00 -vcodec libx264 -deinterlace -s hd720 -ab 128k -threads 0 output.mp4
I also want to reencode the video since I do not want to upload the large files of the original recording.
-
ffmpeg error message : MB Rate > level limit [closed]
10 juin 2013, par pleasehelpmeRunning the
.bat
script for rotating a video's orientation generates this error message:[libx264 @ 0162fb80] MB rate (108000000) > level limit (2073600)
It appears on some videos, and the outputs of these videos are corrupted. How to fix this error?
set ffm="C:\ffmpeg\bin\ffmpeg.exe" set frmt=*.mp4 cd "D:\..." for %%f in (%frmt%) do %ffm% -i "%%f" -vf "transpose=2" -vsync 2 -sameq %%f.mp4" mkdir old move %frmt% old\ @echo ********************************** @echo **** Press any key to finish ***** @echo ********************************** pause
-
FFMPEG : MB Rate > Level Limit Error Message
10 juin 2013, par pleasehelpmeRunning a .bat file for rotating a video's orientation generates this error message.
[libx264 @ 0162fb80] MB rate (108000000) > level limit (2073600)
It appears on some videos, and the outputs of these videos are corrupted. How to fix this error?
.bat for rotating video orientation
set ffm="C:\ffmpeg\bin\ffmpeg.exe" set frmt=*.mp4 cd "D:\..." for %%f in (%frmt%) do %ffm% -i "%%f" -vf "transpose=2" -vsync 2 -sameq %%f.mp4" mkdir old move %frmt% old\ @echo ********************************** @echo **** Press any key to finish ***** @echo ********************************** pause
-
Encode h264 to match existing stream
6 juin 2013, par Diego SánchezIn short: I have to encode a tiny amount of video frames and stitch them in front of a much bigger h.264 stream without reencoding said stream.
The details: I receive a multi GB transport stream containing a h.264 es and an audio es. Currently the h.264 streams are always generated using x264, and I can assume this will be the case in the future. Now I have to prepend some video frames to this stream, but am not allowed to decode/encode the whole stream; which leaves me with the only option to find out the exact parameters I need to pass x264_encoder_open so both streams match.
Currently what I'm doing is :
- Demux the original ts and extract h.264 NAL packets.
- When I find the first "user data unregistered" SEI packet, I parse it and find a bunch of x264 parameters.
- Use libavcodec to start decoding the video. That gives me the dimensions of the picture and the h264 profile and level in the AVCodecContext structure.
- Match all of that as best as I can in the x264_param_t structure.
I can do some encoding with that, and the encoded video plays correctly up to the join point. When VLC is reaching the stitch point it starts throwing out the following sequence of messages and soon after stops playing:
[h264 @ 0x7fe36cd75be0] decode_slice_header error [h264 @ 0x7fe36cd75be0] no frame! [h264 @ 0x7fe36ccc9080] Width/height changing with threads is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
which clearly shows that my encoded frames do not match the original ones. I've been browsing the source code and can't seem to find a way of doing this. What I have currently (besides not working), involves a lot of guesswork, so even if I could make it work with the handful of example files I have, I would be scared to deploy this in production servers.
So the obvious question is: Is there a safe, formal way of doing this?
Thanks in Advance