View Full Version : Linux woes, I just want to encode "Interlace problem"
cogman
20th November 2007, 13:59
Ok, so I was swayed by ubuntu 7.10 Everything seemed to install fine and work great. Im running the 64 bit version right now (may be where half my problems are stemming)
So after a grueling battle with dgdecode, avs2yuv, MPlayer vobcopy, mencoder, neroAac, and of course x264. I have finally gotten my encoded video to playback. Heres the problem, It is interlaced! Doh! I don't know if the source was interlaced or if I encoded it interlace. The reason I don't know if it was the source is because when I playback the source the video looks progressive.
So 1, how do I tell if it is my source that is interlaced, and 2 how do I deal with that? Thanks
Ohh yeah, lest I forget. Here is what I passed to mencoder.
wine avs2yuv.exe battery.avs -o - | mencoder - -o test.mp4 -ovc x264 -x264encopts crf=20.5:subq=7:frameref=16:mixed-refs:direct=auto:b-rdo:weightb=1:me=esa:trellis=1:partitions=all:8x8dct=1:bframes=16:b_adapt:b_pyramid:weight_b:threads=auto:qcomp=0.8
And here is my avs script (the movie is batteries not included btw)
MPEG2Source("h:\BATTERIE1-1.d2v", cpu=0)
Crop(2, 4, -2, -8)
Spline36Resize(720, 480)
fft3dfilter(sigma=1.5, bt=4)
nm
20th November 2007, 15:26
So after a grueling battle with dgdecode, avs2yuv, MPlayer vobcopy, mencoder, neroAac, and of course x264. I have finally gotten my encoded video to playback. Heres the problem, It is interlaced! Doh! I don't know if the source was interlaced or if I encoded it interlace. The reason I don't know if it was the source is because when I playback the source the video looks progressive.
The encoding process you described won't make the video interlaced unless it already is interlaced (and even then, you encode it as progressive video).
The most reliable way to tell if the source is interlaced (or hard-telecined) or not is by looking at it with a player/decoder that doesn't deinterlace. How have you played the source? How about trying different players (at least MPlayer and VLC, remember to disable any deinterlacing filters). If it still seems progressive, upload a sample clip somewhere.
So 1, how do I tell if it is my source that is interlaced, and 2 how do I deal with that? Thanks
You'll need to deinterlace or do IVTC (inverse telecine) if the source is actually telecined. The latter is quite probable in case of NTSC DVD movies, for example.
Ohh yeah, lest I forget. Here is what I passed to mencoder.
wine avs2yuv.exe battery.avs -o - | mencoder - -o test.mp4 -ovc x264 -x264encopts crf=20.5:subq=7:frameref=16:mixed-refs:direct=auto:b-rdo:weightb=1:me=esa:trellis=1:partitions=all:8x8dct=1:bframes=16:b_adapt:b_pyramid:weight_b:threads=auto:qcomp=0.8
MEncoder won't output MP4 with that command-line, and I'm not sure if it even has a working MP4 muxer yet. You'll need to output a H.264 elementary stream with:-of rawvideo -o test.264And then mux that to MP4 or Matroska with external tools (MP4Box or mkvmerge).
And here is my avs script (the movie is batteries not included btw)
MPEG2Source("h:\BATTERIE1-1.d2v", cpu=0)
Crop(2, 4, -2, -8)
Spline36Resize(720, 480)
fft3dfilter(sigma=1.5, bt=4)
I'd suggest searching for more information about AviSynth IVTC filters since your source is probably telecined.
cogman
29th November 2007, 06:37
Well (sorry for the semi abandoned thread) I re-looked at the video from a windows machine, and to my surprize the video is not interlaced, I used both the Megui analyze tool (reported as progressive, the video looked progressive as well) and looked at it from AVS, Now I am really stumped. Perhaps it has something to do with the combination of Ubuntu x64 version of mencoder with a self compiled version of x264.
nm
29th November 2007, 08:45
If the video is telecined, MeGUI will correctly recognize it as progressive and IVTC it. Also, on Windows the graphics card and driver (PureVideo, Avivo) may be doing IVTC on the fly. In contrary, MEncoder doesn't do any automatic IVTC and I don't think your AviSynth script does either, so the output will seem interlaced (it's not interlaced, it's telecined).
Can you post the AviSynth script generated by MeGUI?
cogman
3rd December 2007, 00:03
Ill have to get back on that one, I don't have the original source (im in college and my source is at home :() I will as soon as I can, but it will be a while (a week or so). Thanks for your interest though, is there any good examples of telecined video? Ill go look it up of course, but it would be great if I know what I'm looking for.
nm
3rd December 2007, 07:49
Almost all movies released on NTSC DVDs are examples of telecined film. Usually they are soft telecined so that the original frames are stored progressively, and flags are used to tell the player to do pulldown. However, there are also hard telecined DVDs and even worse cases like mixed progressive and interlaced.
For more information, see:
http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-telecine.html
http://www.doom9.org/ivtc-tut.htm
http://www.hometheaterhifi.com/volume_7_4/dvd-benchmark-part-5-progressive-10-2000.html
http://en.wikipedia.org/wiki/Telecine
rernst
31st December 2007, 17:49
Almost all movies released on NTSC DVDs are examples of telecined film. Usually they are soft telecined so that the original frames are stored progressively, and flags are used to tell the player to do pulldown. However, there are also hard telecined DVDs and even worse cases like mixed progressive and interlaced.
For more information, see:
http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-telecine.html
http://www.doom9.org/ivtc-tut.htm
http://www.hometheaterhifi.com/volume_7_4/dvd-benchmark-part-5-progressive-10-2000.html
http://en.wikipedia.org/wiki/Telecine
Mencoder deals just fine with interlaced content. It does perfect. It deals just fine with pulldowns (look up -vf pullup,softskip). It does not mux into MP4 container but you can do mplayer dump and then mp4creator or MP4Box afterwards (I do both).
The only thing Linux has had a half-hearted support for is Matroska. (Yes, I know there are some distributions which are supported but for some reason the #1 distribution (PCLinuxOS according to distrowatch) does not offer a package and I have pr unable from source.
But this doesn't seem to be your problem anyhow. I don't understand why you want to run all this stuff under wine? Why don't you want to use the native tools>
nm
31st December 2007, 19:55
But this doesn't seem to be your problem anyhow. I don't understand why you want to run all this stuff under wine? Why don't you want to use the native tools>
He probably wants to use AviSynth filters (like fft3dfilter) that can't be replaced with native tools, yet. Personally I haven't had such needs, but I know AviSynth is a very useful tool.
buba king
1st January 2008, 03:26
The only thing Linux has had a half-hearted support for is Matroska. (Yes, I know there are some distributions which are supported but for some reason the #1 distribution (PCLinuxOS according to distrowatch) does not offer a package and I have pr unable from source.
What does this even mean? mkvtoolnix is available on Debian and Ubuntu (and probably fedora) and thats basically all you need to make mkv files. Do you mean playback? mplayer, gstreamer and xine all support mkv.
buba king
1st January 2008, 03:30
He probably wants to use AviSynth filters (like fft3dfilter) that can't be replaced with native tools, yet. Personally I haven't had such needs, but I know AviSynth is a very useful tool.
Might i suggest mencoder/mplayers hqdn3d? I think it works the same way. mplayer has some really great filters i doubth you'll ever miss any AviSynth filters.
mplayer -vf hqdn3d
Edit: Damn, this was not really ment for nm. :P
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.