Skip to content

Commit

Permalink
mux in audio from file
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlFK committed Jan 8, 2019
1 parent ee50058 commit 174b1c9
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def mk_video_src(args, videocaps):
queue max-size-time=4000000000 !
dvdec !
{monitor}
deinterlace mode=1 !
deinterlace mode=interlaced !
videoconvert !
videorate !
videoscale !
Expand All @@ -78,7 +78,7 @@ def mk_video_src(args, videocaps):
queue max-size-time=4000000000 !
decodebin !
{monitor}
deinterlace mode=1 !
deinterlace mode=interlaced !
videorate !
videoscale !
videoconvert !
Expand All @@ -99,6 +99,7 @@ def mk_video_src(args, videocaps):
"""

elif args.video_source == 'ximage':
# startx=0 starty=0 endx=1919 endy=1079 !
video_src = """
ximagesrc {attribs} name=videosrc
use-damage=false !
Expand All @@ -107,7 +108,6 @@ def mk_video_src(args, videocaps):
videorate !
videoscale !
"""
# startx=0 starty=0 endx=1919 endy=1079 !

elif args.video_source == 'blackmagic':
video_src = """
Expand All @@ -133,10 +133,14 @@ def mk_video_src(args, videocaps):
elif args.video_source == 'file':
video_src = """
multifilesrc {attribs} !
decodebin !
videoscale !
decodebin name=src
src. !
{monitor}
queue !
deinterlace mode=interlaced !
videoconvert !
videoscale !
videorate !
"""

elif args.video_source == 'test':
Expand Down Expand Up @@ -189,6 +193,18 @@ def mk_audio_src(args, audiocaps):
audioconvert !
"""

elif args.audio_source == 'file':
# this only works if video is from DV also.
# or some gst source that gets demux ed
audio_src = """
src. !
queue !
audioconvert !
audioresample !
audiorate !
"""


elif args.audio_source == 'pulse':
audio_src = """
pulsesrc {attribs} {base_audio_attribs} name=audiosrc !
Expand Down Expand Up @@ -396,7 +412,7 @@ def get_args():
'--video-source', action='store',
choices=[
'dv', 'hdv', 'udp_h264', 'hdmi2usb', 'blackmagic',
'ximage', 'png', 'test', 'spacescope'],
'ximage', 'png', 'file', 'test', 'spacescope'],
default='test',
help="Where to get video from")

Expand All @@ -412,7 +428,7 @@ def get_args():

parser.add_argument(
'--audio-source', action='store',
choices=['dv', 'hdv', 'udp_mp2',
choices=['dv', 'hdv', 'file',
'alsa', 'pulse', 'blackmagic', 'test', ],
default='test',
help="Where to get audio from")
Expand Down

0 comments on commit 174b1c9

Please sign in to comment.