0

I want to record a video in order to put it to youtube.

What would be the pipeline that I can strap to my stream to get the best quality for youtube (minimize number of reencodings, etc)?

I think it should contain some filters as well as audio and video codec that works best with Youtube.

I am planning to use gst-launch and ximagesrc.

1
  • I came up with videoconvert ! x264enc ! mp4mux ! filesink location=video-h264-1280x720.mp4 but it does not produce a file that is playable by mplayer or vlc :(
    – alamar
    Commented May 26, 2019 at 21:46

2 Answers 2

0

I am using the following pipeline currently:

gst-launch-1.0 -e ximagesrc xid=$ID ! video/x-raw,framerate=24/1 ! queue ! videoconvert ! \
    videorate ! queue ! x264enc key-int-max=12 cabac=1 bframes=2 ! 'video/x-h264,profile=high' ! \
    queue ! mp4mux name=mux reserved-bytes-per-sec=100 reserved-max-duration=20184000000000 reserved-moov-update-period=100000000 ! \
    queue ! filesink location=video.mp4 pulsesrc device=$DEV ! queue ! audioconvert ! \
    audioresample ! 'audio/x-raw, rate=48000' ! queue ! lamemp3enc bitrate=320 ! queue ! mux.

Then I record audio based on the audio track and mux them together with mencoder :-/

mencoder -ovc copy -oac mp3lame video.mp4 -audiofile audio.wav -o cut.mp4 -endpos 27:13

I haven't figured out how to encode AAC (which is preferred by Youtube) and it's no longer a priority for me.

0

Actually, I ended up using "simple screen recorder" app. Its downside is that it can't lock down to X11 window (only coordinates) but its upside is that it produces pretty good videos with audio-video sync, which was a problem with gst.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .