melt encoding sniplets

  • XML code for manually editing the mlt file <code> <consumer pix_fmt=“yuv420p” rescale=“bilinear” width=“1920” aspect=“1,77778” top_field_first=“2” preset=“medium” f=“mp4” flags2=“-dct8x8” g=“13” maxrate=“5000k” bufsize=“8192k” threads=“0” vcodec=“libx264” progressive=“1” real_time=“-3” bf=“2” ab=“192k” target=“/mnt/usb/lnp256_fade2b.mp4” vpre=“medium” r=“50” height=“1080” minrate=“100k ” acodec=“aac” deinterlace_method=“yadif” crf=“21” ar=“48000” vprofile=“main” movflags=“+faststart” mlt_service=“avformat”/> </code>
  • if you want to endoder with Shotcut, add a new profile and paste the following options: <code> pix_fmt=yuv420p rescale=bilinear width=1920 aspect=1,77778 top_field_first=2 preset=medium f=mp4 flags2=-dct8x8 g=13 maxrate=5000k bufsize=8192k threads=0 vcodec=libx264 progressive=1 real_time=-3 bf=2 ab=192k vpre=medium r=50 height=1080 minrate=100k acodec=aac deinterlace_method=yadif crf=21 ar=48000 vprofile=main movflags=+faststart </code>

<code> melt -consumer xml babylon-2018-05-26_21-08-38-22834.ts babylon-2018-05-26_21-11-38-22834.ts > uncut.mlt </code>

Direkter encode aus den fuse-ts files <code> /home/voc/Shotcut.app/melt -progress -track
/video/datengarten/intros/50.ts
/opt/crs/fuse/datengarten/hd-capture-2/50/uncut.ts in=1857 out=$1)
/opt/crs/fuse/datengarten/hd-capture-2/50/uncut.ts in=$2) out=162370
/video/datengarten/intros/outro.ts
-attach-track frei0r.hqdn3d
-consumer avformat:/video/datengarten/tmp/dg50-out3.mp4 f=mp4 acodec=aac ab=192k
vcodec=libx264 crf=20 vminrate=100k vmaxrate=5000k vpreset=“medium”
movflags=+faststart bufsize=8192k pix_fmt=yuv420p threads=8 </code>

Reencode des fertigen hd.mp4 um die pause herauszuschneiden (pause 1:04:00 -> 1:18:11) <code> melt -progress
/video/datengarten/tmp/50-hd-camonly.mp4 in=0 out=96000
/video/datengarten/tmp/50-hd-camonly.mp4 in=117275
-consumer avformat:/home/voc/dg50-out.mp4 f=mp4 acodec=aac ab=192k vcodec=libx264 crf=20
bufsize=8192k minrate=100k maxrate=5000k vprofile=main vlevel=4.0 movflags=+faststart pix_fmt=yuv420p </code>

<code>xvfb-run -a melt /encode-final/lca2014-intro.dv
-filter watermark:“/encode-tmp/gentilli/101/101-title.png”
in=300 out=500 composite.progressive=1 producer.align=centre composite.valign=c composite.halign=c
/encode-tmp/gentilli/101/start-101.dv
/encode-tmp/gentilli/101/2014-01-09_15-42-23.dv
/encode-tmp/gentilli/101/2014-01-09_16-18-04.dv
/encode-tmp/getilli/101/2014-01-09_16-21-59.dv
/encode-fin1al/lca2014-exit.dv -consumer avformat </code>

melt ./${file[$i]} $INOUT -profile pal -filter channelcopy to=1 from=0
-consumer avformat:./${output[$i]}.webm progress=1 vb=1000k quality=good deadline=good
deinterlace=1 deinterlace_method=yadif

mono mp4 z.B. Repair mit Backup Recording aus Kamera rendern:

melt -progress -track –project 1005.mlt -consumer avformat:./1005-cut.mp4 f=mp4 acodec=aac ab=192k channels=1 vcodec=libx264 crf=20 bufsize=8192k minrate=100k maxrate=5000k vprofile=main vlevel=4.0 movflags=+faststart pix_fmt=yuv420p

<code bash>

  1. !/bin/bash #
  2. (c) 2013-2015 Holger Levsen holger@layer-acht.org
  3. GPL2 licenced

title[0]=“Stretching out for trustworthy reproducible builds” speaker[0]=“Holger and Lunar” file[0]=“k1105_la_fontaine_a_31_142433.mp4” begin_offset[0]=“9385” end_offset[0]=“17913”

videos=1

for i in $(seq 0 $videos) ; do if [ -z “${file[$i]}” ] ; then continue fi if [ -z “${speaker[$i]}” ] ; then echo “${title[$i]} using ${file[$i]}” output[$i]=$(echo ${title[$i]} | sed -s “s# #_#g” ) else echo “${title[$i]} by ${speaker[$i]} using ${file[$i]}” output[$i]=$(echo ${title[$i]} by ${speaker[$i]} | sed -s “s# #_#g” ) fi echo “ -> ${output[$i]}” IN=“” OUT=“”

  1. 25 frames per second if [ ! -z ${begin_offset[$i]} ] ; then IN=“in=$(echo ${begin_offset[$i]}*25|bc)” fi if [ ! -z ${end_offset[$i]} ] ; then OUT=“out=$(echo ${end_offset[$i]}*25|bc)” fi INOUT=“$IN $OUT” echo $INOUT if [ ! -f ./${output[$i]}.webm ] ; then melt ./${file[$i]} $INOUT -profile pal -filter channelcopy to=1 from=0
    -consumer avformat:./${output[$i]}.webm progress=1 vb=1000k quality=good
    deadline=good deinterlace=1 deinterlace_method=yadif fi done </code>

1)
1*60*60*25+3*60*25+52*25
2)
1*60*60*25+18*60*25+2*25
  • melt.txt
  • Last modified: 2026/07/26 21:08
  • by 127.0.0.1