Reuben Martin
Forum Replies Created
-
Reuben Martin
February 5, 2012 at 8:02 pm in reply to: Streaming with ffserver & ffmpeg. Possible audio encoding issueffserver is a crusty old relic of the past that is not well maintained. You probably need to encode the video/audio before sending it to ffserver rather than depending on ffserver to transcode it. Not really sure though, I never use it. There are much better alternatives available. https://www.rtmpd.com/
-
With ffmpeg 0.10.0 I get 4.4MB and 4.3MB
This is with -acodec copy added. You have not specified anything for -acodec, so it will just use whatever is the default audio codec for your version of ffmpeg.
Without providing the terminal output, I can only guess that they problem might be with the audio codec, or a broken build of ffmpeg.
Also, be aware that if you update to a more recent version, the “-vpre” option for libx264 is no longer used and has been replaced by “-preset” which grabs the preset from libx264 directly, rather than using an ffpreset file.
With a more recent version of ffmpeg you might want to use something like this:
for compatibility with older devices:
ffmpeg -i [source.ext] -s [width]x[height] -vcodec libx264 -preset slow -vprofile baseline -crf 20 -pix_fmt yuv420p -acodec libaacplus -ar 44.1k -ab 32k -ac 1 -f mp4 -y [target].mp4for newer devices that can support main/high profile:
ffmpeg -i [source.ext] -s [width]x[height] -vcodec libx264 -preset slow -vprofile high -trellis 2 -crf 20 -pix_fmt yuv420p -acodec libaacplus -ar 44.1k -ab 32k -ac 1 -f mp4 -y [target].mp4for stereo rather than mono change “-ab” to 64 and “-ac” to 2.
The settings above assume ffmpeg is built with libaacplus support turned on which allows high quality audio at very low bitrates. (HE-AAC)
-
Be aware the with CRF mode, 1 is highest quality, 51 is lowest. (That can be a little counter-intuitive)
A crf level of 20 is generally considered the sweet spot for quality vs size.
-
First off, most video codecs do not designed for hard-edged graphics. Second, you haven’t specified what codecs to use, so it will just use the default. (which has changed over time, so that depends on the verion you are using) So it may default to a crappy compression format. You need to give direction as to what codec and codec options to use. Just upping the bitrate doesn’t mean much if you don’t know what codec you are using. Bitrates vary quite a bit between different codecs.
-
You can dump raw streams (“essence formats”) using a libMXF based tool called mxf2raw. You can then transmux the raw streams into something else with various tools depending on what the desired destination format is.
https://sourceforge.net/p/bmxlib/home/Home/
-
The builds you are using are pulled directly from the git repo. Most likely they are coming from the tip of the development branch, which could have any number of undocumented changes. Furthermore, you don’t really know if that is pulled from the mainline git repo, or somebody’s private clone which could potentually also have changes in it that differ from the main development.
Trying finding builds of release versions. I am using 0.9.1, which is the most recently tagged release. Unless you need some feature that has been added since the 0.9.x branch was created, you will probably have the benefit of better stability as well.
-
Looks like their documentation is out of date. Try something more like this:
ffmpeg.exe -f dshow -s 352x288 -i video="Video WebCam":audio="Micr¢fono (Realtek High Definit" -vcodec ffv1 -acodec pcm_s16le -map 0 -r 10 -f segment -segment_time 10 -container_format avi -segment_pattern %03d -segment_basename output dummy_out.avichange vcodec/acodec to whatever codec types you are aiming for.
**This is for ver. 0.9.x
-
-
Yes, that patched version of ffmpeg is based off of an older version of ffmpeg, which uses different syntax for stream mapping.
Try adding “-newaudio” onto the end of the command you are using. This is how the older versions added additional audio streams. The newer 0.9 doesn’t need that, but the modified version you are using is probably based of 0.7 or 0.8.
(Basically, you are running into problems because online documentation, especially stuff found in community forums don’t tend to relay the version of ffmpeg being used. As new features get added, the syntax changes to accommodate new features.)
-
x264 != libx264
You may have built a static x264 binary that didn’t result in libx264 being installed. Check the library that ffmpeg is trying to link to and make sure that it is the correct version.
It’s also possible to have multiple versions of the library installed and the linker may be grabbing the earlier version. The file libx264.so is generally a softlink to the version of the library. It may still point to an older library. Make sure it points to libx264.so.120
Make sure the older libraries and include files are removed, and that any softlinks resolve to the current versions.