Comment 6 for bug 1912876

Revision history for this message
moma (osmoma) wrote : Re: [Bug 1912876] Re: Solution: cannot export to M4A / AAC because Gstream has changed their plugin API

Hi,
Yes, the gst_element_send_event(...) was earlier commented out in
the rec_stop_recording(...) function.

I have to find a better solution.

Osmo Antero

Osmo Antero <email address hidden> escreveu no dia domingo, 24/01/2021 à(s)
13:44:

> Hello again,
> I can now see why the m4a pipeline records well on the command line, but
> fails in the GUI (when run by audio-recorder).
>
> This pipeline is ok.
> gst-launch-1.0 -e pulsesrc ! queue ! audioresample ! audioconvert !
> audio/x-raw,rate=44100,channels=2 ! avenc_aac ! mp4mux ! filesink
> location=test.m4a
>
> This fails.
> gst-launch-1.0 pulsesrc ! queue ! audioresample ! audioconvert !
> audio/x-raw,rate=44100,channels=2 ! avenc_aac ! mp4mux ! filesink
> location=test.m4a
>
> The difference is the -e (--eos-on-shutdown) option.
> See:
> $ gst-launch-1.0 --help
> ...
> -e, --eos-on-shutdown Force EOS on sources before shutting the pipeline
> down
> ...
> ----------
> The GUI does not issue the --eos-on-shutdown option, therefore the
> test.m4a file is not valid.
> I think the -e option caused some problems or freezing earlier and was
> removed.
> Let us see if it is/was in the code.
>
> $ cd trunk
> $ grep "eos" src/*.c
>
> src/gst-pipeline.c: // Add -e (--eos-on-shutdow) option.
> src/gst-recorder.c: // gst_element_send_event(g_pipeline,
> gst_event_new_eos());
> src/gst-recorder.c:static void rec_eos_msg_cb(GstBus *bus, GstMessage
> *msg, void *userdata) {
> src/gst-recorder.c: g_signal_connect(bus, "message::eos",
> G_CALLBACK(rec_eos_msg_cb), NULL);
>
> Most pipelines work fine without the -e (EOS) message.
> Obviously mp4mux is not happy without it.
>
> I will see into this issue later on.
>
> Cumprimentos
> Osmo Antero
> Portugal
>
> moma <email address hidden> escreveu no dia domingo, 24/01/2021
> à(s) 11:51:
>
>> Re-hello,
>>
>> I have some problems recording (to .m4a) from the audio-recorder GUI,
>> even the command line in a terminal window works fine.
>>
>>
>> $ gst-launch-1.0 -e pulsesrc ! queue ! audioresample ! audioconvert !
>> audio/x-raw,rate=44100,channels=2 ! avenc_aac ! mp4mux ! filesink
>> location=test.m4a
>>
>> I have to test it better later on.
>>
>> Please test the new version 3.2.2 and tell your findings. Is it ok?
>>
>> Cumprimentos
>> Osmo Antero
>> Portugal
>>
>> --
>> You received this bug notification because you are subscribed to Audio
>> Recorder.
>> https://bugs.launchpad.net/bugs/1912876
>>
>> Title:
>> Solution: cannot export to M4A / AAC because Gstream has changed their
>> plugin API
>>
>> Status in Audio Recorder:
>> New
>>
>> Bug description:
>> When saving recorded audio in M4A / AAC format, it gives the following
>> error:
>> gst_object_unref: assertion 'object != NULL' failed
>> Error:To support m4a format you should install Gstreamer-plugins for .
>> Error:Installation of Gstreamer-plugins failed
>> (GST_INSTALL_PLUGINS_HELPER_MISSING).
>>
>>
>> I have checked that I have installed Gstreamer-plugins, and running
>> Gstream command line can convert any audio into .m4a format:
>> gst-launch-1.0 filesrc location=/tmp/test.mp3 ! mpegaudioparse !
>> mpg123audiodec ! audioconvert ! avenc_aac ! mp4mux ! filesink
>> location=/home/xuancong/Desktop/test.m4a
>>
>>
>> Solution:
>> In media-profiles.c, the default profile for M4A is out-of-date as
>> Gstreamer has changed their plugin API, changing the following line will
>> solve the problem:
>>
>> Existing wrong:
>> {"CD Quality, AAC 44KHz", "m4a", "",
>> "audio/x-raw,rate=44100,channels=2 ! avenc_aac compliance=-2 ! avmux_mp4"}
>>
>> New correct:
>> {"CD Quality, AAC 44KHz", "m4a", "",
>> "audio/x-raw,rate=44100,channels=2 ! avenc_aac ! mp4mux"}
>>
>> Thanks!
>> Xuancong
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/audio-recorder/+bug/1912876/+subscriptions
>>
>
>
> --
> Sent from my PC, laptop or phone with Ubuntu-Linux.
>

--
Sent from my PC, laptop or phone with Ubuntu-Linux.