Hi,
I am trying to convert a videofile from mpeg2 to h265 using omxh265enc.
Transcoding the video stream works fine. However the file has an audio and a video stream. I want to keep the audio stream as is, since it is already mp3. I tried the following queue:
gst-launch-1.0 filesrc location=sourcefile.mkv ! matroskademux name=demux matroskamux name=mux ! filesink location=destfile.mkv
demux.audio_0 ! queue ! mux.
demux.video_0 ! mpegvideoparse ! omxmpeg2videodec ! queue ! omxh265enc preset-level=3 bitrate=750000 EnableTwopassCBR=true control-rate=variable ! mux.
However this hangs in prerolling. Doing just one of the two streams work. What am I doing wrong?
I managed to get it working, there was a queue missing before the mux in the video part. I also needed an mpegaudioparse after demux.audio_0.
One oddity: The original file has mp3 as audio format the result mp2. Is there a way to just pass through the mp3?
DaneLLL
December 28, 2020, 1:57am
4
Hi,
For passing through the audio stream, please go to gstreamer forum .
We have a working re-muxing pipeline but aac stream has to be re-decoded and encoded again:
Hi,
For using gstreamer pipeline, please try
$ gst-launch-1.0 qtmux name=mx ! filesink location=test.mp4 filesrc location= test.ts ! tsdemux name=dmx dmx. ! queue ! h264parse ! mx. dmx. ! queue ! aacparse ! faad ! audioresample ! audioconvert ! voaacenc ! mx.
Somehow audio stream has to be decompressed and compressed again. This may take more CPU usage than ffmpeg.
For ffmpeg with hardware acceleration, please check
Jetson Nano FAQ
Q: Is hardware acceleration enabled in ffmpeg?
Uers in gstreamer forum may have more experinece and can share suggestion.