6
$\begingroup$

I know it is possible to output a render as a video in mp4/h264 (as well as mkv, etc) however, it does not appear as an option for me.

enter image description here

This is blender 2.64.2, on linux (FC17), ffmpeg version 0.10.7:

$ ffmpeg -codecs|grep 264
D V D  h264            H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
D V D  h264_vdpau      H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)
 EV    libx264         libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
 EV    libx264rgb      libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB


$ ffmpeg -formats|grep mp4
 D  mov,mp4,m4a,3gp,3g2,mj2 QuickTime/MPEG-4/Motion JPEG 2000 format
  E mp4             MP4 format

The file /usr/share/blender/2.64/scripts/startup/bl_ui/properties_render.py has the following lines (snipped for brevity):

class RENDER_PT_encoding(RenderButtonsPanel, Panel):

    return rd.image_settings.file_format in {'FFMPEG', 'XVID', 'H264', 'THEORA'}

    layout.menu("RENDER_MT_ffmpeg_presets", text="Presets")

    if ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG'}:
    elif rd.ffmpeg.format == 'H264':

which leads me to believe that it should give me at least those options. How do I enable them? I've looked all over the place and cannot find the solution online.


edit:

This is the official fedora build, blender-2.64a-3.fc17.i686.rpm installed from the fedora updates repo.

$\endgroup$
  • $\begingroup$ I would also like to know, but to get an answer you should probably say whether you're using Blender installed from a repository or just the extracted compressed version. $\endgroup$ – InverseTelecine Feb 18 '16 at 2:24
  • $\begingroup$ Done. Thanks for the tip. Hopefully we can get an answer to this. $\endgroup$ – insaner Feb 18 '16 at 3:38
  • $\begingroup$ Related: blender.stackexchange.com/q/28839/2843 $\endgroup$ – Samoth Feb 18 '16 at 14:48
  • $\begingroup$ Related (duplicate): blender.stackexchange.com/q/28681/2843 $\endgroup$ – Samoth Feb 19 '16 at 8:59
  • $\begingroup$ @Samoth, thanks for the heads up, I've added an answer there to reflect the new findings in this question. $\endgroup$ – insaner Feb 23 '16 at 8:48
4
$\begingroup$

You can try resetting to factory defaults, but I don't think that will do it. Blender simply didn't have those presets back then.

You will need to update to the latest version of Blender (you could really go back quite a ways and still have it, but I would go for the newest version.)

Try installing this ppa, then sudo apt-get update then sudo apt-get install blender.

You could also get the package from Blender.org, or the newest one from the buildbot.

Considering you have v2.64 and we are now on 2.76, there are bound to be a few changes.

note: with the buildbot, you can download the package and keep it in a folder, running it straight from there, while leaving your old Blender on you devise.

$\endgroup$
  • 1
    $\begingroup$ Hi, thanks for the answer, unfortunately, Fedora uses yum (now dnf) not apt, so that part of your answer won't be feasible. I might try running from an untarred release, but I doubt that I will have all the prereqs for that in my FC17 install. I will post any updates. $\endgroup$ – insaner Feb 19 '16 at 6:18
  • $\begingroup$ Okay. Can you run Program (application/x-executable) files? If you can, just download the latest from the buildbot for linux, and go into the folder (unzip it) and just run the "Blender" program. $\endgroup$ – Uncle Snail Feb 19 '16 at 14:12
  • $\begingroup$ But I'm using 2.76a (unzipped precompiled version under Ubuntu 14.04) and I too don't have those video container options. I'll try the repository, but I'm not optimistic. I honestly thought it just wasn't implemented; Insaner's evidence that the options should be there was a surprise to me. And I've used Blender for 3+ years! $\endgroup$ – InverseTelecine Feb 19 '16 at 18:43
  • $\begingroup$ Hmmm... That's very odd... I have the buildbot package and the options are there. Maybe you need more dependencies. You could try manually building it, and you can change all the options that way as well. I would try getting some of the dependencies. You should be able to find a list of them all. Here is a link to the offical Blender method. wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/… Besides dependencies and install settings, I don't know what else to try. Maybe there's something in the user preferences. $\endgroup$ – Uncle Snail Feb 19 '16 at 19:44
  • $\begingroup$ Also try this. blender.stackexchange.com/a/36107/20428 $\endgroup$ – Uncle Snail Feb 19 '16 at 19:45
5
$\begingroup$

For those of you landing here from google, it seems that the fedora packaged blender does not have ffmpeg support compiled in. As a workaround, you can always do as @UncleSnail suggested and use the buildbot precompile and run it on its own. If you know of an rpm offering of blender that has ffmpeg support, please feel free to edit this answer, or post as a comment and I will edit it.


EDIT:

I went at this a bit and created a simple RPM .spec file for those interested in packaging the 2.76 precompiled blender tarballs from blender builder.

Modify as needed. Standard disclaimers, ie, use at your own risk.

And please let me know if you find this useful.

# INSTRUCTIONS:
# extract your tarball, then:
# ln -s /path/to/blender-2.76-1e58af0-linux-glibc211-i686 ~/rpmbuild/BUILD/
#  (or just extract to ~/rpmbuild/BUILD/)
# rpmbuild -bb /path/to/blender.spec

# RESULTS:
# -the rpm installs your new blender installation in /opt/blender_2.76/
# -and drops a symlink pointing to the blender executable in /usr/bin/blender_2.76
#   so you can just run $ blender_2.76
# -this installs a package called "blender_full", I'm not sure how to get it to install
#   without conflict if there's another blender installed

Name:          blender_full
# make sure there are no spaces in the version, as this will be used to create the path
Version:       2.76
Release:       buildbot
Summary:       A fully functional 3D modeling/rendering/animation package
License:       GPLv2+
Group:         Graphics/3D
Distribution:  Fedora Project
URL:           http://www.blender.org/

%define _blender_tarball    blender-2.76-a529ad9-linux-glibc211-i686.tar.bz2
Source0:       https://builder.blender.org/download/%{_blender_tarball}
# Source0:  http://download.blender.org/source/%{name}-%{version}.tar.gz

Vendor:        Blender
Packager:      Blender builder
BuildArch:     i686


# otherwise, it will decide it is providing libGL.so.1  libGLU.so.1, which it technically isn't:
AutoReqProv: no

#Provides:      blender_%{version}
Requires:      libc.so.6(GLIBC_2.11)

# otherwise, it will try to strip our binaries:
%global __os_install_post %{nil}

%define _blender_install_dir    opt
%define _blender_install_path   /%{_blender_install_dir}/blender_%{version}


%description
Blender is the in-house software of a high quality animation studio.
It has proven to be an extremely fast and versatile design instrument.
The software has a personal touch, offering a unique approach to the
world of three dimensions. Blender can be used to create TV
commercials, to make technical visualizations or business graphics, to
do some morphing, or to design user interfaces. Developers can easily
build and manage complex environments. The renderer is versatile and
extremely fast. All basic animation principles (curves and keys) are
implemented.

This is the self-contained buildbot release. This means it only 
(basically) depends on GLIBC 2.11, and that it will install in /opt
by default.


%files

%changelog
* Wed Feb 20 2016 insaner (insaner.com)
- first version of simple spec file


%install

rm -rf  %{_blender_install_dir}
mkdir -p  %{buildroot}%{_blender_install_path}
mkdir -p  %{buildroot}%{_bindir}
ln -s %{_blender_install_path}/blender %{buildroot}%{_bindir}/blender_%{version}
cp -a */* %{buildroot}%{_blender_install_path}

%files 
/*
$\endgroup$
3
$\begingroup$

Fedora ships blender with ffmpeg disabled for stupid legal reasons.

You can rebuild blender from the fedora source rpm with -DWITH_CODEC_FFMPEG:BOOL=ON as root as follows:

# cd /var/tmp
# dnf download blender --source
# rpmbuild --rebuild blender-*.src.rpm

The latter will most likely fail which is fine because that would be the one you already have. Install the BuildRequires:

# awk '/BuildRequires:/{print$2}' ~/rpmbuild/SPECS/blender.spec \
    | xargs -r dnf -y install

Enable ffmpeg, rebuild and install:

# perl -pi~ -e 's/WITH_CODEC_FFMPEG:BOOL=OFF/WITH_CODEC_FFMPEG:BOOL=ON/' \
    ~/rpmbuild/SPECS/blender.spec
# rpmbuild -bb ~/rpmbuild/SPECS/blender.spec
# dnf reinstall ~/rpmbuild/RPMS/x86_64/blender-[0-9]*.x86_64.rpm

Now you have blender with matroska, h264 etc :)

Optionally versionlock your version:

# dnf install python-dnf-plugins-extras-versionlock
# dnf versionlock blender

Pål

$\endgroup$
2
$\begingroup$

By default, Blender is not compiled with support for the FFMPEG video library. You'll need to recreate the Blender RPM from source with, the appropriate build flag, and install it. The easiest way to do that is:

dnf install ffmpeg-devel
dnf download blender --source --enablerepo=fedora-source
rpmbuild --rebuild blender-*.src.rpm
dnf reinstall ~/rpmbuild/RPMS/blender-*.rpm

The build may fail for lack of a -devel package, just install the listed packages and try again.

$\endgroup$
0
$\begingroup$

For blender 2.79, Instead of -DWITH_CODEC_FFMPEG:BOOL=ON, there is %global _with_ffmpeg 1 on Line 16 of blender.spec which has to be uncommented before building rpm

$\endgroup$
0
$\begingroup$

Due to code changes in upstream ffmpeg, we need one more step in fedora 28:

After "rpmbuild -bb ~/rpmbuild/SPECS/blender.spec" started running,

replace FF_INPUT_BUFFER_PADDING_SIZE, CODEC_FLAG_GLOBAL_HEADER and FF_MIN_BUFFER_SIZE with AV_INPUT_BUFFER_PADDING_SIZE, AV_CODEC_FLAG_GLOBAL_HEADER and AV_INPUT_BUFFER_MIN_SIZE

in ~/rpmbuild/BUILD/blender-2.79b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp and AUD_FFMPEGWriter.cpp

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.