Page MenuHome

VSE:Sound Clip with some .flac sound file show as length=0
Closed, ResolvedPublic


System Information
GPU:AMD Radeon HD 7750

Blender Version
2.69.8 8094ac9

Short description of error
VSE:Sound Cilp with .flac sound file ( generated by Blender ) show as clip length = 0.

Exact steps for others to reproduce the error

  1. Put some sound clip on VSE and mixdown it. ( or download this file >

2.Open the generated sound file with VSE.



Event Timeline

mato T (mato_sus304) set Type to Bug.
mato T (mato_sus304) created this task.
mato T (mato_sus304) raised the priority of this task from to Needs Triage by Developer.
Sergey Sharybin (sergey) triaged this task as Confirmed, Medium priority.Feb 19 2014, 1:59 PM

It's an issue of mixdown by the looks of it. The file doesn't contain proper duration or timebase.

Re-assigning to our audio guru.

Joerg Mueller (nexyon) closed this task as Invalid.Feb 21 2014, 9:27 AM

This flac file is damaged! You can fix what is there for example with

ffmpeg -i testfile.flac testfile2.flac

but I fear that part of the end is missing.


Thanks for the answer. I understand it's an issue of flac file.
But this flac file is just generated from blender. And this bug happens every time when I mixdown the audio file on blender.
So...Am I have to fix the audio file every time I mixdown the flac file on blender?

Sergey Sharybin (sergey) reopened this task as Open.

@Joerg Mueller (nexyon), blender shall not produce files it couldn't read. This is to be investigated.

Is this fixed with the recent changes to the AVCODEC_ENCODE_AUDIO_2 changes?

I tried Blender git f03df4f and ffmpeg version N-61155-g61ff043. But it looks like same trouble happens.

I still cannot reproduce the issue, can you try the official RC build for 2.70?

I also don't know how you get that ffmpeg version you wrote, I have:

% ffmpeg -version
ffmpeg version 2.1.4

If it still happens can you upload a minimalistic .blend file with a packed sound that produces this error on audio mixdown to flac?


I noticed that this issue depends on platform. I tried Blender 2.70 RC2 on Windows7 64bit and it works fine.
But on Linux ( I tried Blender 2.70RC2 64bit on Fedora20 and Ubuntu12.04 LTS) this error caused.

This error caused by this .blend file.


Can you still add which ffmpeg version you're using on the linux distributions? It still works fine here on arch linux...


$ ffmpeg -version
ffmpeg version 2.1.4
built on Feb 25 2014 08:24:47 with gcc 4.8.2 (GCC) 20131212 (Red Hat 4.8.2-7)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil      52. 48.101 / 52. 48.101
libavcodec     55. 39.101 / 55. 39.101
libavformat    55. 19.104 / 55. 19.104
libavdevice    55.  5.100 / 55.  5.100
libavfilter     3. 90.100 /  3. 90.100
libavresample   1.  1.  0 /  1.  1.  0
libswscale      2.  5.101 /  2.  5.101
libswresample   0. 17.104 /  0. 17.104
libpostproc    52.  3.100 / 52.  3.100


$ ffmpeg -version
ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:08:00 with gcc 4.6.3
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
ffmpeg 0.8.9-4:0.8.9-0ubuntu0.12.04.1
libavutil    51. 22. 1 / 51. 22. 1
libavcodec   53. 35. 0 / 53. 35. 0
libavformat  53. 21. 1 / 53. 21. 1
libavdevice  53.  2. 0 / 53.  2. 0
libavfilter   2. 15. 0 /  2. 15. 0
libswscale    2.  1. 0 /  2.  1. 0
libpostproc  52.  0. 0 / 52.  0. 0 

We did some fixes in blender. Does the issue happens with official builds from still?

I tried Blender 2.70a and 2.71testbuild2 (both x86_64, download from ) on Fedora20 ,the issue still happens.
I also tried change cmake flags to build blender, but it doesn't work well.

@mato T (mato_sus304), the thing is, the original file was corrupted. Opening it in newer blender wouldn't help. You need to re-create the file from blender. Is it something you did?

I see. At last post, I tried the blend file made by older blender. So I re-create the file by newer blender.(

create by Blender2.71testbuild2)
But it seems like same thing, The issue still happens.

I can confirm that this issue is still present in Blender 2.71.

And I still couldn't confirm this problem with my own blender builds and the one from my distro, but I just downloaded the official release from the website and indeed this bug is still present. Maybe it's a problem of the ffmpeg libraries used for the official build @Sergey Sharybin (sergey)?

We can see this issue while exporting a sequence from VSE in h264 format with FLAC as audio codec. The result is a file that does not contain "regular" flac audio stream and is mute even in VLC. What I need to do in this case is convert the file like this:

avconv -i final_file.avi -c:v copy -c:a flac converted_file.mkv

This bug is still present on Blender 2.73

I've just conducted an experiment with ffmpeg, outside of blender running the following commands:

ffmpeg -i input.mp3 -c:a flac test.avi
ffmpeg -i test.avi test.wav
ffmpeg -i test.avi test.mkv
ffmpeg -i test.avi -c:a flac test.mkv
ffmpeg -i test.avi -c:a flac test.flac

I tried to play each output file with vlc and only the .flac and .wav file play. Using mplayer however all output files were played, but then again they use ffmpeg in the background.

Converting from the input file directly:

ffmpeg -i input.mp3 test.wav
ffmpeg -i input.mp3 test.mkv
ffmpeg -i input.mp3 -c:a flac test.mkv
ffmpeg -i input.mp3 -c:a flac test.flac

All resulting files can be played back properly.

At fault here is the avi container, which, besides outdated, doesn't support flac really. I don't know why this is the default container selected in blender, maybe because it's age results in a widespread compatibility (for the codecs supported...). I recommend you to use matroska directly as output container if you want flac as audio codec!

So, how can we generate a "lossless" h264 output with flac audio codec inside a mkv? The only way to get the h264 codec with the "lossless" option is generating an AVI.

You can check the lossless checkbox and then switch to matroska. Even though the checkbox disappears it is still set. If you want this user interface problem to be fixed, I'd recommend opening a separate bug/feature report for that!

Has there been any progress on this? @Joerg Mueller (nexyon), do you have it on track?

The user interface needs to be changed for this and as this affects the whole video encoding/exporting settings we might better ask the developer in charge for this area. Maybe @Campbell Barton (campbellbarton) can help with a decision on what to do?

@Joerg Mueller (nexyon), If AVI doesn't support flac - can't we just disable this combination? Its not _only_ a UI issue. Python can setup these values too.

I've opened a separate report for the UI issue (T44468) regarding invalid format/codec combinations as this report is getting too big.

To enable the problem of @Jonata Bolzan (jonata) to enable lossless H.264 output for MKV, I append the patch

which @Campbell Barton (campbellbarton) can review please before one of us commits it!