Maniphest T47699

VSE - FLAC stips play continuously instead of seeking from cursor
Closed, Archived

Assigned To
Bastien Montagne (mont29)
Authored By
Maycne Sonahoz (MaycneSonahoz)
Mar 6 2016, 2:57 PM
Tags
  • BF Blender
  • Video Sequencer
Subscribers
Bastien Montagne (mont29)
Joerg Mueller (nexyon)
Maycne Sonahoz (MaycneSonahoz)

Description

System Information
Manjaro 2016-03-05
MSI GTX 660Ti - video-nvidia driver

Blender Version
Issue since 17:2.76.b-3 (hash f337fea) with libsndfile 1.0.26-1
Worked with 17:2.76.b-3 (hash f337fea) with libsndfile 1.0.25-3

Short description of error
In Video Sequence Editor, when an audio strip from a FLAC file is played, it plays continuously from the beginning, even when moving the cursor (either towards the beginning or the end).

Exact steps for others to reproduce the error

  • Create a new Blender VSE project
  • Add an audio strip from a FLAC file
  • Play the sequence

> the strip is played, OK

  • Move the sequence cursor towards the end

> the strip keeps playing continuously instead of playing from the new cursor position, NOK

  • Move the sequence cursor towards the beginning

> the strip keeps playing continuously instead of playing from the new cursor position, NOK

  • The sequence cursor reaches out of the strip

> the strip is not played, OK

A consequence of this is, if playing a strip cut from a FLAC file (meaning the strip is shorter than the file), i can play the whole file as long as i move the cursor backwards so it stays on the strip.

The issue is not reproduced using an audio strip for a MP3 file.

NB: Considering the issue rose with an update from libsndfile dependency, i'd understand if you want me to fill an issue to the libsndfile project, though i'd appreciate if you can help me provide a more significant report.

Related Objects

Mentioned In
T48280: .wav file in VSE does not seek
Mentioned Here
rBf337feaf5a1d: BLender 2.76: We go 'b' series now

Event Timeline

Maycne Sonahoz (MaycneSonahoz) created this task.Mar 6 2016, 2:57 PM
Maycne Sonahoz (MaycneSonahoz) raised the priority of this task from to 90.
Maycne Sonahoz (MaycneSonahoz) updated the task description.
Maycne Sonahoz (MaycneSonahoz) added projects: BF Blender, Video Sequencer.
Maycne Sonahoz (MaycneSonahoz) edited a custom field.
Maycne Sonahoz (MaycneSonahoz) added a subscriber: Maycne Sonahoz (MaycneSonahoz).
Bastien Montagne (mont29) lowered the priority of this task from 90 to 30.Mar 12 2016, 10:22 AM
Bastien Montagne (mont29) added a subscriber: Bastien Montagne (mont29).

Please always attach needed files to reproduce the issue (small ones if possible).

Maycne Sonahoz (MaycneSonahoz) added a comment.Mar 12 2016, 12:02 PM

Sorry, here's a small test project with a MP3 file and a FLAC file.

Bastien Montagne (mont29) raised the priority of this task from 30 to Normal.Mar 22 2016, 10:51 AM
Bastien Montagne (mont29) added a subscriber: Joerg Mueller (nexyon).

OK, so, cannot reproduce the issue with latest master here, nor with 2.77 official release. Would assume it is fixed then. Tried with 2.76, where indeed mp3 and flac have not the same behavior - but afaict, root of the issue remains the same: seems like audio backend does not like when we seek in negative frames area.

@Joerg Mueller (nexyon) is it known and expected that audio-seeking (BKE_sound_seek_scene) when (scene) frame <0 is not working well?

Joerg Mueller (nexyon) added a comment.Mar 22 2016, 11:08 AM

Yep, it is known. Also audio animation does not work at all for negative frame numbers as the cache doesn't support negative positions. If you use audio, do not use negative frame positions.

Bastien Montagne (mont29) changed the task status from Unknown Status to Unknown Status.Mar 22 2016, 11:33 AM
Bastien Montagne (mont29) claimed this task.

Thanks Joerg, think we can close this as known limitation then.

Maycne Sonahoz (MaycneSonahoz) added a comment.Mar 22 2016, 7:32 PM

Sorry to tell you that even after updating to 17:2.77-1 (hash 7f03e7c), i still have the issue.

Rewording your comments so i understand: there is a known issue that audio seeking does not work well when the scene starts before frame 0. Did i get that right?
If so, i don't think the problem comes from here. I might have misled you by starting the clips before the frame 0 in the test project, but that was to show you that the FLAC clip starts from the beginning rather than from the cursor position.
I made another project with the clips starting after frame 0. They are also short enough to fit in the project length. If i put the cursor in the middle and start playing, the FLAC and OGG clips (i just found out OGG files have the same issue) play from the beginning rather than from the cursor position, and keep playing normally even when moving the cursor while playing.

Also, since Bastien doesn't have the issue, i'm wondering if it might come from another dependency. Would you like me to post the complete list of dependencies and their versions i have installed?

Bastien Montagne (mont29) added a comment.Mar 22 2016, 7:39 PM

Eeeeh… ok, but are you using official (released by Blender foundation) builds? Please do not use thrid party builds (like distro ones) for bug reports…

Maycne Sonahoz (MaycneSonahoz) added a comment.Mar 22 2016, 8:00 PM

Indeed, i'm using the one provided from my distro. I just downloaded the latest official build and i confirm there is no issue with it.
Thanks a lot and sorry for the bother.

Bastien Montagne (mont29) added a comment.Mar 22 2016, 8:35 PM

would still be interesting to have the lib listing though, if issue comes from updated lib we'll likely face it too at some point.

Maycne Sonahoz (MaycneSonahoz) added a comment.Mar 23 2016, 7:52 PM

I'll make the list whenever i have some time.
In the meantime, i opened an issue on Arch: https://bugs.archlinux.org/task/48679

Because of file size restrictions, i pointed to the second test project i posted here in order to help them reproduce the issue. I hope you don't mind.

Joerg Mueller (nexyon) changed the task status from Unknown Status to Archived.Mar 26 2016, 2:32 PM

Hi,

I'm running Arch linux and can confirm the issue. It's with libsndfile actually which reports flac files as not seekable when opening the file [1]. Interestingly the seeking works nevertheless, but Blender does not do it when libsndfile reported that seeking doesn't work (for obvious reasons).

The bug therefore is either in libsndfile directly or in the package provided by Arch linux and has to be reported there!

Cheers

[1] http://www.mega-nerd.com/libsndfile/api.html#open

Joerg Mueller (nexyon) added a comment.Mar 26 2016, 2:35 PM

I just found another check:

% sndfile-info test.flac 
========================================
File : test.flac
Length : 22749021
FLAC Stream Metadata
  Channels    : 2
  Sample rate : 44100
  Frames      : 10616046
  Bit width   : 16
Vorbis Comment Metadata
  title      : Move to Intercept (feat. Bit Shifter)
  artist     : Gaijin Games
  album      : Bit.Trip Beat Official Soundtrack
  tracknumber : 01
  genre      : Soundtrack
Padding Metadata
End

----------------------------------------
Sample Rate : 44100
Frames      : 10616046
Channels    : 2
Format      : 0x00170002
Sections    : 0
Seekable    : FALSE
Duration    : 00:04:00.727
Signal Max  : 16620 (-5.90 dB)

As we can see, the file is reported FALSE for being seekable...

Joerg Mueller (nexyon) added a comment.Mar 26 2016, 2:41 PM

And finally, I just found the bug report that has been submitted to libsndfile already and is fixed, so it will work again after the next release: https://github.com/erikd/libsndfile/issues/124

Maycne Sonahoz (MaycneSonahoz) added a comment.Mar 26 2016, 6:10 PM

@Bastien Montagne (mont29) Here's the list of versions of the package i currently have, with the direct dependencies:

blender 17:2.77-1
boost-libs 1.60.0-2
desktop-file-utils 0.22-1
ffmpeg 1:3.0-1
fftw 3.3.4-1
freetype2 2.6.3-1
glew 1.13.0-1
hicolor-icon-theme 0.15-1
jack 0.124.1-6
jemalloc 4.1.0-1
libpng 1.6.21-1
libsndfile 1.0.25-3 (OK) / 1.0.26-1 (KO)
libspnav 0.2.3-1
libtiff 4.0.6-2
openal 1.17.2-2
opencollada 20150702-3
opencolorio 1.0.9-4
openexr 2.2.0-3
openimageio 1.6.10-1
openjpeg 1.5.2-1
openshadinglanguage 1.7.1-1
opensubdiv 3.0.2-3
ptex 2.0.62-2
python 3.5.1-2
python-requests 2.9.1-1
shared-mime-info 1.5-1
xdg-utils 1.1.1-1

I also made another list with all dependencies:

For the note, here's a command if you need a dependency list with version on Arch:

pactree -u blender | sort | pacman -Q -

@Joerg Mueller (nexyon) Thanks, i report this to Arch's issue right away: https://bugs.archlinux.org/task/48679

Joerg Mueller (nexyon) mentioned this in T48280: .wav file in VSE does not seek.May 1 2016, 3:49 PM