Segfault when recording with ffmpeg

Bug #1624576 reported by ronso0
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Critical
Unassigned

Bug Description

I'm not sure if this is a real bug because it happens only on a version I compiled from source with "ffmpeg=1" flag. (I need ffmpeg to play AAC files on which FAAD sometimes fails)

1. In "Recording" tab, set format to mp3 or ogg
2. Start recording
3. Stop recording
... (no matter how much time passes)
4. Start recording again
5. Stop recording
Segfault

Created mp3s are useless (noisy or 'empty').

In normal log appear these lines after starting the recording:
Debug [Main]: Split size is: 750000000
Debug [Main]: Recordings folder set to "/tmp"
Debug [EngineSideChain 1]: ffmpegencodercore: UpdateMetadata: ! RonsoFX - -
Debug [EngineSideChain 1]: EncoderFfmpegCore::initEncoder: Old Style initialization
Debug [EngineSideChain 1]: EncoderFfmpegCore::initEncoder: Codec MP3
Debug [EngineSideChain 1]: EncoderFfmpegResample::openMixxx: open MIXXX FFmpeg Resampler version
Debug [EngineSideChain 1]: Created sample rate converter for conversion of 44100 Hz format: flt with: 2 (layout: 0 ) channels (BPS 4 )
Debug [EngineSideChain 1]: To 44100 HZ format: s32p with 2 (layout: 0 ) channels (BPS 4 )
Debug [EngineSideChain 1]: openCodec!
[libmp3lame @ 0x7fffc0020a60] channel_layout not specified
Debug [EngineSideChain 1]: Setting record flag to: ON

And this repeatingly until reccording is stopped/mixxx crashes:
Debug [EngineSideChain 1]: Unsupported sample format: s32p
Debug [EngineSideChain 1]: Unsupported sample format: s32p
Debug [EngineSideChain 1]: Unsupported sample format: s32p
...

mixxx rev5919
Linux 3.14.23-rt20 #1 SMP PREEMPT RT Thu Nov 20 17:03:31 CET 2014 x86_64 x86_64 GNU/Linux

Tags: recording
Revision history for this message
ronso0 (ronso0) wrote :
description: updated
Revision history for this message
Daniel Schürmann (daschuer) wrote :

It is a real bug, thank you for reporting.

Could you file a second bug with the file attached that fails on a faad build?

Changed in mixxx:
importance: Undecided → High
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This is the significant path:

#0 EncoderFfmpegCore::~EncoderFfmpegCore (this=0x7fffc01c9b90, __in_chrg=<optimized out>) at src/encoder/encoderffmpegcore.cpp:83
#1 0x0000000000689310 in ~EncoderFfmpegMp3 (this=0x7fffc01c9b90, __in_chrg=<optimized out>) at src/encoder/encoderffmpegmp3.h:26
#2 EncoderFfmpegMp3::~EncoderFfmpegMp3 (this=0x7fffc01c9b90, __in_chrg=<optimized out>) at src/encoder/encoderffmpegmp3.h:26
#3 0x0000000000847907 in EngineRecord::closeFile (this=0x1f1cb40) at src/engine/sidechain/enginerecord.cpp:389

@Uwe @illusio: is there a benefit from using ffmpeg for mp3 recording over lame?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It looks like ffmpeg uses liblame anyway. So the benefit it that ffmpeg is a nice wrapper for any encoder library.

However, currently liblame works, ffmpeg crashes.

I can confirm the crash, with https://github.com/mixxxdj/mixxx/pull/1003, but only if I record wave before.

Changed in mixxx:
status: New → Confirmed
Revision history for this message
ronso0 (ronso0) wrote :

@Daniel about that failing m4a with the faad-only build:
I'm compiling 5936 without ffmpeg and will try to find that file(s), right now I can't recall what it was, probably some mp4 > m4a extraction with avconv.
The conversation with tapir is here:
http://www.mixxx.org/forums/viewtopic.php?f=3&t=8231

Revision history for this message
ronso0 (ronso0) wrote :

@Daniel
Okay, I found that file. When reporting a new bug on this it point to this bug:
https://bugs.launchpad.net/mixxx/+bug/1519472

Log output is the same, fails on non-fixed sample durations.

summary: - Segfault when recording
+ Segfault when recording with ffmpeg
RJ Skerry-Ryan (rryan)
Changed in mixxx:
importance: High → Critical
Revision history for this message
Tuukka Pasanen (pasanen-tuukka) wrote :

Not having time for Mixxx for a while I'm slowly trying to get into business again. This is mostly Janitor job. There is more reason to use FFMpeg than separated libraries for encoding because when you have understand API you can render anything but as it seems it's always like this and doesn't work with new version of FFMpeg. It try to get on with patch on this.

Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8649

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.