-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Monday, 2017-06-05 at 16:49 -0400, Felix Miata wrote:

Anyone know if there's good reason it isn't there? Is there something better for
commercials removal that is there? I've yet to figure out the UIs and/or prevent
crashing or hangs using anything I've tried to remove commercials from the h264
.ts files saved by my FTA satellite receivers.

As you may know, I asked on the ffmpeg mail list if someone knows a tool to find the cut points and generate a list or script for ffmpeg, so that I can edit the script and add the correct options.

Well, there appears to be none. :-(

The best solution so far is to quickly generate from the input file another video file with the timestamps overlayed!

http://tomhorsley.com/game/ffmpeg.html#generatetimestamps

+++----
#!/bin/sh
#
# Given a base.mpg file, generate a time-base.avi file scaled down to a
# small size with video timestamp added to the bottom right of the image.
# While doing this conversion, also convert the audio to mp3 so
# we can extract it later.
#
# The video timestamp helps when manually fixing a .keep file and the audio
# is sometimes helpful to catch commercials as well as the video.
#
mydir=`dirname $0`
PATH=`$mydir/echo-path`
export PATH
#
dt="fontsize=18"
dt="$dt:fontfile=/usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf"
dt="$dt:box=1"
dt="$dt:text="'%{pts}'
dt="$dt:x=(w-text_w-5)"
dt="$dt:y=(h-text_h-5)"
#
sc="320:-1"
#
vid="-c:v libx264 -preset ultrafast -threads 8 -crf 28"
#
aud="-acodec libmp3lame -ab 128k -ac 2"
#
infile="$1"
if [ -f "$infile" ]
then
   basefile=`basename $infile .mpg`
   ffmpeg -i "$infile" -nostats -vf "scale=$sc,drawtext=$dt" \
      $vid $aud "time-$basefile.avi" < /dev/null
else
   echo "Input file $infile does not exist." 1>&2
   exit 2
fi
- ----++-

My reccomendation is to modify that script and use the same options as you would for the final video, but set to "ultrafast" and perhaps at a smaller pixel count (in my source videos, the timestamp is bad). I haven't got that far yet.

Then you view that video with whatever you prefer and manually write the timestamps, which will be absolutely correct but relative to the output file with your options.

The result will be several files with the video between two commercial sections. Then you join them:

https://trac.ffmpeg.org/wiki/Concatenate

- -- Cheers,
       Carlos E. R.
       (from 42.2 x86_64 "Malachite" at Telcontar)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAllKfNYACgkQtTMYHG2NR9UnyACfeAk64wIsKBvFmdkBBl4/oETQ
N/kAoIP2EUbZWa6csKbvqzLJFRPBTTL7
=NCC8
-----END PGP SIGNATURE-----

_______________________________________________
Packman mailing list
[email protected]
http://lists.links2linux.de/cgi-bin/mailman/listinfo/packman

Antwort per Email an