Log in

View Full Version : FFMS2 fourcc tagging


440
18th February 2016, 23:37
I am new to Vapoursynth and I am liking it so far.

In a script, I have been trying to use AVI containers that lack the appropriate fourcc header "MJPG". However, so far to no succeess.

Via the following FFMPEG commands, I can create playable AVI containers:



ffmpeg -vcodec mjpeg -i "source file.avi" -y -vcodec copy -vtag MJPG "playable file.avi"

The following Vapoursynth code yields "Vapoursynth.Error: AVISource: couldn't locate a decompressor for fourcc MJPG":


import vapoursynth as vs
core = vs.get_core(threads=4)

video1 = core.avisource.AVISource("C:\\sourcefile.avi", fourcc="MJPG")
video1.set_output()


Preferably, I would like to use FFMS2.

How can I add a fourcc header on the fly via a Vapoursynth script using FFMS2?

Thank you very much for your help

jackoneill
19th February 2016, 10:52
Have you tried opening one of these files with ffms2 without doing anything about the fourcc?

440
19th February 2016, 17:00
Yes, thank you - the following code yields "vapoursynth.Error: Index: Couldn't find stream information":

import vapoursynth as vs
core = vs.get_core(threads=4)

video = core.ffms2.Source(source="C:\\sourcefile.avi")

video.set_output()

jackoneill
19th February 2016, 18:06
I don't think ffms2 has a way to specify the fourcc or the video decoder to use. Maybe lsmas.LWLibavSource works?

feisty2
19th February 2016, 18:50
Or easier, let ffmpeg output an uncompressed raw video and load that with raws.Source