Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created July 28, 2015 15:38
Show Gist options
  • Save anonymous/59a48f495a99015f2515 to your computer and use it in GitHub Desktop.
Save anonymous/59a48f495a99015f2515 to your computer and use it in GitHub Desktop.
command = [
'ffmpeg',
'-y',
'-f', 'mpegts',
'-i', "concat:#{@input.join('|')}",
'-c', 'copy',
'-bsf:a', 'aac_adtstoasc',
'-bsf:v', 'h264_mp4toannexb',
output_dest
]
stdout_str, stderr_str, status = Open3.capture3(*command)
# generates this command:
# ffmpeg -y -f mpegts -i concat:chunks\\1.ts|chunks\\2.ts|chunks\\3.ts -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb W:/Workspace/MediaPublisherNG/videos/output.mp4
# but ffmpeg needs quotes arround concat
# ffmpeg -y -f mpegts -i "concat:chunks\\1.ts|chunks\\2.ts|chunks\\3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb W:/Workspace/MediaPublisherNG/videos/output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment