how to audio passthrough

kqt4at5v at gmail.com kqt4at5v at gmail.com
Sat May 16 13:19:57 PDT 2015


I just started working with gstreamer 2 days ago so forgive my ignorance
I have a mpegts file that has ac3 audio and h264 video, ffprobe says
Input #0, mpegts, from 'test.ts':
   Duration: 01:05:00.26, start: 59413.761456, bitrate: 2061 kb/s
   Program 3
     Stream #0:0[0x31]: Video: h264 (High) ([27][0][0][0] / 0x001B), 
yuv420p(tv), 960x540 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 
tbc
     Stream #0:1[0x34](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 
fltp, 320 kb/s

I want to transcode the file cropping and resizing the video and passing the 
audio through as is
This is what I have so far, it works but converts the audio

gst-launch-1.0 filesrc location=test.ts \
! decodebin name=demux \
demux. \
! progressreport name=progress \
! queue \
! audioresample \
! audioconvert dithering=0 \
! "audio/x-raw,channels=1" \
! voaacenc bitrate=64000 \
! mux. \
demux. \
! queue \
! videoconvert \
! omxh264enc target-bitrate=1000000 control-rate=variable \
! "video/x-h264,profile=high,preset=ultrafast" \
! h264parse \
! mux. \
matroskamux name=mux \
! filesink location=test.mkv

Suggestion appreciated


More information about the gstreamer-devel mailing list