Reputation: 1135
Wondering if it is possible to encode using AAC into mp4 container
I have tried using the following
gst-launch-1.0 alsasrc device="hw:0,0" ! "audio/x-raw,rate=48000,channels=2,depth=16" ! queue ! audioconvert ! avenc_aac ! qtmux ! filesink location=audio.mp4
The program runs without a fault but when I inspect the file content, it gives me a null content
However when i run with avimux, the file content gives the encoding and details like lenght of audio
gst-launch-1.0 alsasrc device="hw:0,0" ! "audio/x-raw,rate=48000,channels=2,depth=16" ! queue ! audioconvert ! avenc_aac ! avimux ! filesink location=audio.mp4
Wander what is wrong as I would need AAC encoding (for later rtsp streaming) and need to use mp4 as container and qtmux
thanks
Upvotes: 0
Views: 949
Reputation: 7393
You don't really say what you are doing exactly. But most likely you are missing the -e
option for gst-launch-1.0
. With that an EOS signal is propagated through the pipleine to correctly finalize the mp4 file. Other file formats are not that picky, but mp4 needs to write a proper index when all samples have been written.
Upvotes: 1