Giter Site home page Giter Site logo

mutschler / mt Goto Github PK

View Code? Open in Web Editor NEW
147.0 9.0 22.0 7.66 MB

yet another media thumber. Generate Video Contat Sheets easily. http://mutschler.github.io/mt

License: GNU General Public License v3.0

Makefile 0.73% Go 99.27%
video contactsheet thumbnails ffmpeg multimedia golang

mt's People

Contributors

coolspring8 avatar krisseck avatar magicdawn avatar mutschler avatar ploober avatar wlbr avatar zjuchenyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mt's Issues

Using as a library

Hi,

I'd like to use this as a library. Would you be open to restructuing the code a little to support this?

Thanks!

Add info about audio-track

All tools like this have this opportunity. Because it's important enough to see if video has an audio or not

Rotated videos do not produce rotated thumbs

Hi mutschler. I am using your program and really like its feature set. I find that my rotated videos do not produce rotated thumbnails. My video is in portrait mode where the height is greater than the length. Using ffprobe, my video shows this:

[SIDE_DATA]
side_data_type=Display Matrix
displaymatrix=
00000000:            0       65536           0
00000001:       -65536           0           0
00000002:     70778880           0  1073741824

rotation=-90
[/SIDE_DATA]

Would you be able to add support for rotated videos? It would be incredibly helpful. Thanks for all your great work!

setting from and to ignored when numcaps is 1

I don't know if this is a bug or if I'm just misusing mt but when I do this
mt -n 1 -s RMGy2cMiDxoUGwmu9VfMG6.mp4 --to="00:00:00" --from "00:00:00"
I expect to get the first frame of the video, but instead I get

INFO[0000] useing font: DroidSans.ttf
INFO[0000] generating contact sheet for RMGy2cMiDxoUGwmu9VfMG6.mp4
INFO[0000] First screenshot will be at 00:00:00
INFO[0000] Last screenshot will be at 00:00:00
INFO[0000] generating screenshot 01/01 at 00:01:04

The video is 00:01:04 long, so I get a black image

Start at 00:00:00 is ignored

Thanks for this @mutschler it's just what I needed.

I have 10 minute video clips that I'm using --interval=30 but the first image is from (according to the timestamp) 00:00:30

I'd like it to start at 00:00:00 but adding --from=00:00:00 does not seem to change anything.

Using --numcaps=20 instead of interval doesn't seem to change it either.

Any suggestions? I'm using mt-1.0.11-arm-linux-gnueabihf.tar.gz

Version 1.10 reports 1.09

mt-1.0.10-x86_64-w64-mingw32.exe using version option reports version 1.09 on windows

>mt --version
mt Version 1.0.9

Multiple issues with single images

Command:
mt.exe input.mp4
Result:
input.jpg

Command:
mt.exe --skip-existing input.mp4
Result:
input.jpg is not generated again.

Command:
mt.exe -s input.mp4
Result:

input-01.jpg
input-02.jpg
input-03.jpg
input-04.jpg

Command:
mt.exe --skip-existing -s input.mp4
Result:

input-01.jpg (overwritten)
input-02.jpg (overwritten)
input-03.jpg (overwritten)
input-04.jpg (overwritten)

Command:
mt.exe -s input.mp4
Result:

input-01.jpg
input-02.jpg
input-03.jpg
input-04.jpg
input-05.jpg (new, but same timestamp as 01)
input-06.jpg (new, but same timestamp as 02)
input-07.jpg (new, but same timestamp as 03)
input-08.jpg (new, but same timestamp as 04)

Three issues:

  1. So --skip-existing is ignored or does not apply to single images, which would be extremely handy if it did :-). Is there a way to have it also obey the --skip-existing flag?

  2. If --skip-existing is not specified mt will just generate new files at the same timestamps but with consecutive numbers. If you run it again and again, it will make new files. When in addition you specify -s (single images) it will always generate (and overwrite) existing single images.

  3. No vtt file is created when using in combination with single images (neither with --vtt nor --webvtt).

How to use this without installing go?

Is it possible to build it to a single executable and attach it to a GitHub release? I don't have go or would likely use it in the future therefore I'm not interested in installing it on my System (macOS), but would really like to use this tool!

Padding between images

Is there a particular reason for mt.exe to generate the JPG image with padding between the images?
Sometimes it happens, sometimes not. Not sure if this depends on the windows version.
I am running the 1.0.8 mt version.

building fails currently

Hi,

it seems like one of the dependencies got incompatible, as I cannot build the project anymore:

go install github.com/mutschler/mt@latest
go: downloading github.com/mutschler/mt v0.0.0-20221109123024-20108dd9fd86
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/disintegration/gift v0.0.0-20150417200635-5b044b74c0b1
go: downloading github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298
go: downloading github.com/disintegration/imaging v0.0.0-20151003014424-546cb3c5137b
go: downloading github.com/koyachi/go-nude v0.0.2-0.20150410134931-699a88f33605
go: downloading github.com/mitchellh/mapstructure v0.0.0-20150717051158-281073eb9eb0
go: downloading github.com/sirupsen/logrus v0.8.8-0.20151204141443-446d1c146faa
go: downloading github.com/spf13/pflag v0.0.0-20151013200643-08b1a584251b
go: downloading github.com/spf13/viper v0.0.0-20151110042204-e37b56e207dd
go: downloading gitlab.com/opennota/screengen v0.0.0-20210313035852-1f554a814ee7
go: downloading golang.org/x/image v0.0.0-20150916112557-baddd3465a05
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading github.com/kr/pretty v0.2.1
go: downloading github.com/magiconair/properties v1.5.5-0.20151021204130-6ac0b95f4492
go: downloading github.com/spf13/cast v0.0.0-20150803163715-ee815aaf958c
go: downloading github.com/spf13/jwalterweatherman v0.0.0-20151106170057-c2aa07df5938
go: downloading gopkg.in/fsnotify.v1 v1.4.7
go: downloading gopkg.in/yaml.v2 v2.0.0-20151201162745-f7716cbe52ba
go: downloading github.com/kr/text v0.1.0
go: downloading golang.org/x/sys v0.0.0-20151211033651-833a04a10549
# gitlab.com/opennota/screengen
root/go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:125:17: streams[i].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
root/go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:127:24: streams[i].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
root/go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:134:34: streams[vStreamIndex].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
root/go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:152:35: streams[aStreamIndex].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)

Could you please have a look? Thank you & BR :)

Unable to build, screengen issue?

Environment:
Ubuntu 20.04.2
go 1.16.4
ffmpeg 4.4 (built from source)

$ go get github.com/mutschler/mt
# gitlab.com/opennota/screengen
go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:125:16: streams[i].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:127:23: streams[i].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:134:33: streams[vStreamIndex].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)
go/pkg/mod/gitlab.com/opennota/[email protected]/screengen.go:152:34: streams[aStreamIndex].codec undefined (type *_Ctype_struct_AVStream has no field or method codec)

How do I create a static binary?

I noticed that the 1.0.8 release was statically compiled, right?

Anyway, I'm trying to compile mt into a static binary as well, but I'm having issues and I don't know much about Go to even attempt to fix it:

$ env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go get github.com/mutschler/mt
# github.com/mutschler/mt
go/src/github.com/mutschler/mt/mt.go:76:14: undefined: screengen.NewGenerator
go/src/github.com/mutschler/mt/mt.go:488:14: undefined: screengen.NewGenerator

This is the guide I followed.

Any help is appreciated.
Thanks.

Not accurate screenshots when using --interval

Hi,

When generating thumbnails for long videos (15 minutes and more) using --interval option time position where each thumbnail is generated is floating away from the place it should be. For example, I try to generate thumbnails every 10 seconds for a big video:

mt --font-size=8 --width=200 --webvtt=true --interval=10 sred21.mp4
...
INFO[0000] generating screenshot 01/216 at 00:00:10
INFO[0000] generating screenshot 02/216 at 00:00:20
INFO[0000] generating screenshot 03/216 at 00:00:30
...
INFO[0022] generating screenshot 76/216 at 00:12:40
INFO[0022] generating screenshot 77/216 at 00:12:51
INFO[0023] generating screenshot 78/216 at 00:13:01
...
INFO[0051] generating screenshot 153/216 at 00:25:31
INFO[0051] generating screenshot 154/216 at 00:25:42
INFO[0052] generating screenshot 155/216 at 00:25:52

You see that positions are corresponding to 10 second interval at first, but after 00:12:40 next screenshot is generated at 00:12:51, and after 00:25:31 another second is added making next screenshot at 00:25:42.

This behavior makes precise positioning of educational videos in html5 player impossible. Is there any way to fix this or to make a workaround?

change order of config file lookups

viper.AddConfigPath("./")
viper.AddConfigPath("/etc/mt/")
viper.AddConfigPath("$HOME/.mt")
  1. check current dir
  2. check /etc/mt/
  3. check ~/.mt/

that would allow a user simply overwriting the global config with the one in the current dir without the need to provide a path

Go panic - cgo pointer error

Just want to give your tool a try, but it panics on execution with the following error:

INFO[0000] useing font: DroidSans.ttf
INFO[0000] generating contact sheet for test.mp4
WARN[0000] very small timestamps in use... consider decreasing numcaps 
panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
panic(0x7ca0a0, 0xc820013580)
    /usr/lib/go/src/runtime/panic.go:464 +0x3e6
github.com/mutschler/mt/Godeps/_workspace/src/github.com/opennota/screengen.(*Generator).ImageWxH(0xc8200f20c0, 0x2ad8, 0x780, 0x330, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/mutschler/mt/Godeps/_workspace/src/github.com/opennota/screengen/screengen.go:212 +0x137b
github.com/mutschler/mt/Godeps/_workspace/src/github.com/opennota/screengen.(*Generator).Image(0xc8200f20c0, 0x2ad8, 0x0, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/mutschler/mt/Godeps/_workspace/src/github.com/opennota/screengen/screengen.go:140 +0x55
main.GenerateScreenshots(0x7fff246ca43c, 0x8, 0x0, 0x0, 0x0)
    /opt/go/src/github.com/mutschler/mt/mt.go:133 +0x70d
main.main()
    /opt/go/src/github.com/mutschler/mt/mt.go:716 +0x360b

go version is: go version go1.6.1 linux/amd64

can't seek to timestamp...

[root@amazon Downloads]# mt 'Полночное небо.2020.WEB-DL.1080p.HDR.mkv'
INFO[0000] using font: DroidSans.ttf
INFO[0000] generating contact sheet for Полночное небо.2020.WEB-DL.1080p.HDR.mkv
FATA[0067] Can't generate screenshot: can't seek to timestamp

General
Unique ID                                : 20194433409476671515352530703013062806 (0xF314E7051343D84246A350B050F2896)
Complete name                            : Полночное небо.2020.WEB-DL.1080p.HDR.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 6.58 GiB
Duration                                 : 1 h 58 min
Overall bit rate                         : 7 944 kb/s
Encoded date                             : UTC 2021-05-05 13:34:38
Writing application                      : mkvmerge v56.1.0 ('My Friend') 64-bit
Writing library                          : libebml v1.4.2 + libmatroska v1.6.4
Attachments                              : poster.jpg

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L4@Main
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 56 min
Bit rate                                 : 5 323 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.107
Stream size                              : 4.35 GiB (66%)
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 756 cd/m2
Maximum Frame-Average Light Level        : 298 cd/m2

Audio #1
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 1 h 58 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 543 MiB (8%)
Title                                    : Dub, Пифагор
Language                                 : Russian
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 58 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 543 MiB (8%)
Title                                    : MVO, Jaskier
Language                                 : Russian
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Audio #3
ID                                       : 4
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 58 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 543 MiB (8%)
Title                                    : MVO, NewStudio
Language                                 : Russian
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Audio #4
ID                                       : 5
Format                                   : E-AC-3 JOC
Format/Info                              : Enhanced AC-3 with Joint Object Coding
Commercial name                          : Dolby Digital Plus with Dolby Atmos
Codec ID                                 : A_EAC3
Duration                                 : 1 h 58 min
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 651 MiB (10%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Complexity index                         : 16
Number of dynamic objects                : 15
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Text #1
ID                                       : 6
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 1 h 56 min
Bit rate                                 : 0 b/s
Count of elements                        : 20
Stream size                              : 795 Bytes (0%)
Title                                    : forced
Language                                 : Russian
Default                                  : Yes
Forced                                   : No

Text #2
ID                                       : 7
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 1 h 56 min
Bit rate                                 : 42 b/s
Count of elements                        : 796
Stream size                              : 36.4 KiB (0%)
Title                                    : full
Language                                 : Russian
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 8
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 1 h 56 min
Bit rate                                 : 48 b/s
Count of elements                        : 1016
Stream size                              : 41.3 KiB (0%)
Title                                    : SDH
Language                                 : English
Default                                  : No
Forced                                   : No

WebVTT: The Web Video Text Tracks Format

@mutschler I've tested the 1.0.6-dev version, there are some warnings during the compile process:

$ GOPATH=/opt/go GODEBUG=cgocheck=0 go get
$ GOPATH=/opt/go GODEBUG=cgocheck=0 go build
# github.com/mutschler/mt/Godeps/_workspace/src/github.com/opennota/screengen
/opt/go/src/github.com/mutschler/mt/Godeps/_workspace/src/github.com/opennota/screengen/screengen.go: In Funktion »av_read_frame_wrapper«:
/opt/go/src/github.com/mutschler/mt/Godeps/_workspace/src/github.com/opennota/screengen/screengen.go:42:3: Warnung: »priv« is deprecated (declared at /usr/include/libavcodec/avcodec.h:1446) [-Wdeprecated-declarations]
 //  pkt->priv = NULL; // zero uninitialized memory (see https://github.com/golang/go/issues/14426)
   ^

My ffmpeg version:

$ ffmpeg -version
ffmpeg version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4)

When mt is compiled without the GODEBUG flag the cgo pointer issue (#1) persists. Otherwise it's working like expected. The vtt file generation works like charm.
(tested with JWPlayer and nginx + lua - automatically generated before streaming if not exists)

[edit]
The informations about the WebVTT format can be found here: https://w3c.github.io/webvtt/

Great work so far, you made my day! ;)

unknown flag: --filename

Hello @mutschler, I am using latest release version 1.0.11 and used --filename flag as mentioned in the docs. I got unknown flag --filename error. I also had a look at options via --help and found that --filename flag is not there. Please, help me avoid this issue. Thank you in advance.

Build fails since the latest release

Since latest release 1.0.9 the build instructions fail and I cannot find a precompiled package. Here the terminal output of the failed build attempt:

[majamee@gh0st mt]$ go get github.com/mutschler/mt
# github.com/mutschler/mt/vendor/gitlab.com/opennota/screengen cgo-gcc-prolog: In Funktion »_cgo_eca694cc866a_Cfunc_av_register_all«: cgo-gcc-prolog:131:2: Warnung: »av_register_all« ist veraltet [-Wdeprecated-declarations] In file included from ../../go/src/github.com/mutschler/mt/vendor/gitlab.com/opennota/screengen/screengen.go:20: /usr/include/libavformat/avformat.h:2043:6: Anmerkung: hier deklariert void av_register_all(void); ^~~~~~~~~~~~~~~
[majamee@gh0st mt]$ go install github.com/mutschler/mt
# github.com/mutschler/mt/vendor/gitlab.com/opennota/screengen cgo-gcc-prolog: In Funktion »_cgo_eca694cc866a_Cfunc_av_register_all«: cgo-gcc-prolog:131:2: Warnung: »av_register_all« ist veraltet [-Wdeprecated-declarations] In file included from ../../go/src/github.com/mutschler/mt/vendor/gitlab.com/opennota/screengen/screengen.go:20: /usr/include/libavformat/avformat.h:2043:6: Anmerkung: hier deklariert void av_register_all(void); ^~~~~~~~~~~~~~~

Not able to build a windows binary

I'm not able to build a windows binary. I tried to build it with different versions of go an ffmpeg. I also tried all version written on this site https://github.com/mutschler/mt/issues/32.

At the moment a tried it with Ubuntu 20.04, go version 1.1.6.4 and ffmpeg 4.2.4
Unfortunately I get this error message:
_# github.com/mutschler/mt
./mt.go:80:14: undefined: screengen.NewGenerator
./mt.go:517:14: undefined: screengen.NewGenerator

I'n not able to solve the problem. Building a binary for Linux works fine.

font argument not correctly used

I find that no matter what value I set to -f or --font, mt always pring useing font: DroidSans.ttf.

I'm not familiar with golang, could you please check whether this piece of code is correct?

mt/mt.go

Lines 575 to 576 in fb1803d

flag.StringP("font", "f", viper.GetString("font_all"), "font to use for timestamps and header information")
viper.BindPFlag("font_all", flag.Lookup("font_all"))

Should we change it to flag.Lookup("font") ? Thanks

panic: runtime error: integer divide by zero (mt.go:129)

I was getting this error. By debugging and stepping through I found that it was a result of the file and configuration, I think some input validation could be used to provide a better error message or warning to the user.

This error happens when the interval is set to longer than the length of the video. The logic on mt.go:124 sets numcaps to 0. For example, when you have an interval of 60 and a video that is 41 seconds.

Add a license

Would it be possible to add a license for this project? I am interested in using this but only if it's free.

If it was LGPL like FFmpeg, or another free license like MIT/BSD/Apache, that would be cool.

Thanks

Skip on FatalErros

When i use your program with multiple arguments/files, after a fatal error it breaks.
Would be better if it continue and report the fatal error at the end or in an logfile.

Integer Seconds

Hi, I love the simplicity of 'mt' but have a couple of issues:-

  1. The numcaps setting only results in snapshots rounded-down to Integer Seconds. But this causes a problem with shorter format videos, or when larger numbers of thumbnails are desired. For instance, we make lots of videos around 2 minutes in length. If we create 30 thumbnails, mt chooses 4 second snapshots even if the video duration is 2 mins 15 seconds. This means the last snapshot is at 2 minutes, and the last 15 seconds of the video when viewed has no thumbnails. This could be resolved allowing non-integer snapshots. 4.5 second snapshots would be perfect.

  2. Alternatively, could you add an option to take a snapshot every x seconds, so if we specify 4 seconds in the example above, we'd get 33 snapshots.

Or BOTH options would be perfect. Is this possible please?

Can't process MXF file / interval (-2305843009213s) is way to small / New Windows binaries

mt version: 1.0.11
OS: Windows 10 Pro

I have some MXF files which can't be processed with mt (version 1.0.11 on Windows).

cmd:
mt.exe sample_short.mxf

output:

time="2023-10-19T10:18:48+02:00" level=info msg="using font: DroidSans.ttf"
time="2023-10-19T10:18:48+02:00" level=info msg="generating contact sheet for sample_short.mxf"
time="2023-10-19T10:18:49+02:00" level=warning msg="very small timestamps in use... consider decreasing numcaps"
time="2023-10-19T10:18:49+02:00" level=error msg="interval (-2305843009213s) is way to small (less then 9s), please decrease numcaps"
time="2023-10-19T10:18:49+02:00" level=fatal msg="Can't generate screenshot: can't seek to timestamp"

It doesn't matter if I specify interval, apparently the libav/ffmpeg version used has a problem dealing with the mxf file. If I remux with ffmpeg to mxf, mt works fine with.
ffmpeg -i sample_short.mxf -c copy -map 0 sample_short_remuxed.mxf

cmd:
mt.exe sample_short_remuxed.mxf
output:

time="2023-10-19T10:19:15+02:00" level=info msg="using font: DroidSans.ttf"
time="2023-10-19T10:19:15+02:00" level=info msg="generating contact sheet for sample_short_remuxed.mxf"
time="2023-10-19T10:19:15+02:00" level=warning msg="very small timestamps in use... consider decreasing numcaps"
time="2023-10-19T10:19:15+02:00" level=error msg="interval (4s) is way to small (less then 9s), please decrease numcaps"
time="2023-10-19T10:19:15+02:00" level=info msg="generating screenshot 01/04 at 00:00:04"
time="2023-10-19T10:19:15+02:00" level=info msg="generating screenshot 02/04 at 00:00:08"
time="2023-10-19T10:19:15+02:00" level=info msg="generating screenshot 03/04 at 00:00:12"
time="2023-10-19T10:19:15+02:00" level=info msg="generating screenshot 04/04 at 00:00:16"
time="2023-10-19T10:19:15+02:00" level=info msg="Composing Contact Sheet"
time="2023-10-19T10:19:15+02:00" level=info msg="appending header informations"
time="2023-10-19T10:19:15+02:00" level=info msg="Saved image to sample_short_remuxed.jpg"

For practical reasons I can't remux the files (usually around 100-200 GB). I've tested the same files on a temporary Linux system with the latest version of mt (1.0.13) and they work just fine, no remuxing needed. Would it be possible to Windows binaries of the latest version? Or is there some (detailed) guide on how to generate binaries for Windows?

generate contactSheets recursive

Missing an option to generate contactSheets recursive.

At the moment i use your program in the following way:

  1. generate list of videofiles;

find /path/to/videos -type f -exec file -i {} + | sed -n '/video/s/:[^:]+$//p' > videolist.txt

  1. generate an array to pass them as argument to mt;

mapfile -t < videolist.txt

  1. generate contactSheets

./mt-1.0.8-arm-linux-gnueabihf --config-file=settings-test.json "${MAPFILE[@]}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.