Anpassung an aktuelles ffpmeg
This commit is contained in:
parent
79b836e72e
commit
f829eafc5e
1 changed files with 7 additions and 6 deletions
|
@ -7,8 +7,8 @@ import sys
|
||||||
|
|
||||||
|
|
||||||
def transcode(src, tgt, fmt):
|
def transcode(src, tgt, fmt):
|
||||||
#transcode_opts = [ "ffmpeg1" ];
|
transcode_opts = [ "ffmpeg" ];
|
||||||
transcode_opts = [ "ffmpeg-devel" ];
|
#transcode_opts = [ "ffmpeg-devel" ];
|
||||||
#transcode_opts.extend(["-t", "240"]) # testing only
|
#transcode_opts.extend(["-t", "240"]) # testing only
|
||||||
#transcode_opts.extend(["-loglevel", "debug"])
|
#transcode_opts.extend(["-loglevel", "debug"])
|
||||||
transcode_opts.extend(["-i", src])
|
transcode_opts.extend(["-i", src])
|
||||||
|
@ -16,19 +16,20 @@ def transcode(src, tgt, fmt):
|
||||||
transcode_opts.extend(["-threads", "0"])
|
transcode_opts.extend(["-threads", "0"])
|
||||||
transcode_opts.extend(["-y", "-deinterlace"])
|
transcode_opts.extend(["-y", "-deinterlace"])
|
||||||
#transcode_opts.extend(["-ac", "2", "-ab", "128k"])
|
#transcode_opts.extend(["-ac", "2", "-ab", "128k"])
|
||||||
|
transcode_opts.extend(["-c:a", "libfdk_aac", "-ab", "192k"])
|
||||||
transcode_opts.extend(["-vcodec", "libx264"])
|
transcode_opts.extend(["-vcodec", "libx264"])
|
||||||
#transcode_opts.extend(["-tune", "film", "-profile", "main"])
|
#transcode_opts.extend(["-tune", "film", "-profile", "main"])
|
||||||
if fmt == "hd":
|
if fmt == "hd":
|
||||||
transcode_opts.extend(["-s", "1280x720"])
|
transcode_opts.extend(["-s", "1280x720"])
|
||||||
transcode_opts.extend(["-b", "4000k"])
|
transcode_opts.extend(["-b:v", "3000k"])
|
||||||
transcode_opts.append(tgt)
|
transcode_opts.append(tgt)
|
||||||
elif fmt == "hdsmall":
|
elif fmt == "hdsmall":
|
||||||
transcode_opts.extend(["-s", "640x360"])
|
transcode_opts.extend(["-s", "640x360"])
|
||||||
transcode_opts.extend(["-b", "1000k"])
|
transcode_opts.extend(["-b:v", "1000k"])
|
||||||
transcode_opts.extend(["-vsync", "1"])
|
transcode_opts.extend(["-vsync", "1"])
|
||||||
transcode_opts.append(tgt)
|
transcode_opts.append(tgt)
|
||||||
else:
|
else:
|
||||||
transcode_opts.extend(["-b", "900k", "-bt", "900k"])
|
transcode_opts.extend(["-b:v", "900k", "-bt", "900k"])
|
||||||
if str(fmt) == "169":
|
if str(fmt) == "169":
|
||||||
transcode_opts.extend(["-vf", "crop=640:360"])
|
transcode_opts.extend(["-vf", "crop=640:360"])
|
||||||
transcode_opts.extend(["-aspect", "16:9"])
|
transcode_opts.extend(["-aspect", "16:9"])
|
||||||
|
@ -41,7 +42,7 @@ def transcode(src, tgt, fmt):
|
||||||
#transcode_opts.extend(["-map", "0.1:0.0", "-map", "0.0:0.0"])
|
#transcode_opts.extend(["-map", "0.1:0.0", "-map", "0.0:0.0"])
|
||||||
#transcode_opts.extend(["-map", "0.1:0.1", "-map", "0.0:0.1"])
|
#transcode_opts.extend(["-map", "0.1:0.1", "-map", "0.0:0.1"])
|
||||||
|
|
||||||
print " %s" % " ".join(transcode_opts)
|
print " \"%s\"" % "\" \"".join(transcode_opts)
|
||||||
subprocess.check_call(transcode_opts)
|
subprocess.check_call(transcode_opts)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue