Newest 'libx264' Questions - Stack Overflow
Les articles publiés sur le site
-
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
-
libvlc android build with mpeg 4 encoder and h264
6 juin 2013, par jacobI am building libvlc for Android and I enabled sout (
--enable-sout
) but when I try to add sout transcode option, I get this error:cannot find encoder MPEG-4 Video *** Your Libav/FFmpeg installation is crippled. *** *** Please check with your Libav/FFmpeg packager. *** *** This is NOT a VLC media player issue. *** Streaming / Transcoding failed It seems your Libav/FFmpeg (libavcodec) installation lacks the following encoder: MPEG-4 Video.
How can I add mpeg4 encoder support ?
Another option is to add a h264 encoder but I don't know how to add that either.