View Full Version : Deinterlace .264 transport stream to .AVI (no compression)


blahapa
26th October 2010, 21:13
Any suggestion for encoding HD video H.264 transport stream to uncompress AVI (1,244 Gbps) with DEINTERLACING?

I can do it in VirtualDub, but I can´t set any deinterlacing there. It will also help if I can do the same MPEG-2 file .m2v.

Thanks for any help in advance. Pavel

blahapa
26th October 2010, 22:04
DEINTERLACING?

Sorry guys, I´ve just found it in VirtualDub Filters... It´s fixed. :D

LoRd_MuldeR
26th October 2010, 22:34
As VirtualDub doesn't open H.264 TS streams directly, I assume you open the stream via Avisynth.

So you might want to try one of the various Avisynth Deinterlace Plugins/Scripts (such as YadifMod or TempGaussMC), which can give significant better results than VirtualDub's built-in deinterlace filter.

Moreover, if you have a NVidia card and are willig to spend 15 bucks, you could use DGDecNV/DGSource to read your source, which allows you to enable the PureVideo Hardware Deinterlacing.

Didée
27th October 2010, 00:09
But then, the PureVideo deinterlacing is ... lame. See here (http://forum.doom9.org/showthread.php?p=1433847#post1433847). Plain Yadif is also blazingly fast, and I don't see PureVideo via DGDecodeNV delivering better quality than Yadif.

Time will tell if GPU processing can fulfill the (big) claims. Right now it's mostly marketing hype. As soon as you dare to look closer, all you find is a big balloon of hot air.

nevcairiel
27th October 2010, 13:14
Would be interesting to do the same with a more powerful card then the 220/240. I would run it on my 460, but i don't have DGDecodeNV <.<

nurbs
27th October 2010, 14:07
I have a 460 and DGDecodeNV, but I don't think there would be a difference since the 220 and 240 as well as the 4xx cards all have the newest PureVideo version (VP4) which I think is what counts when doing the decoding and deinterlacing.

Still, if anyone is interested post a source and a script and I'll run it.

nm
27th October 2010, 14:36
I have a 460 and DGDecodeNV, but I don't think there would be a difference since the 220 and 240 as well as the 4xx cards all have the newest PureVideo version (VP4) which I think is what counts when doing the decoding and deinterlacing.

GPU speed matters for deinterlacing and other postprocessing that are done with the stream processors. However, GT 220 is fast enough for realtime 1920x1080/i30 deinterlacing (and simultaneous denoising) with the best methods implemented in the driver and they should be enabled automatically during 1080i playback.

On Linux with VDPAU, any deinterlacing method can be forced for any video resolution regardless of GPU speed. I can for example use the best "vector-adaptive" / "motion adaptive temporal deinterlacing with edge-guided spatial interpolation" with my laptop's 8400M GS; 1080i playback will only be slower than realtime. I haven't looked at how the CUDA API works, but I think it should allow similar setting of the methods to be useful.

Regarding the quality, I agree with Didée: Nvidia's best method is only about as good as yadif. It smears the fine details a bit less, but apparently shimmers more than yadif (according to Didées sample). Edge-directed interpolation is slightly better in test images.

LoRd_MuldeR
27th October 2010, 16:04
But then, the PureVideo deinterlacing is ... lame. See here (http://forum.doom9.org/showthread.php?p=1433847#post1433847). Plain Yadif is also blazingly fast, and I don't see PureVideo via DGDecodeNV delivering better quality than Yadif.

There are much better (quality-wise) deinterlacers than PureVideo HD's deinterlacer without any doubt.

But the fact that you get PureVideo HD deinterlacing for free (in the sense of processing time) and it still delivers quite decent results makes it an option to consider at least!

While Yadif certainly does a nice job for its speed, whether Yadif or PureVideo HD gives the preferable deinterlacing result is up for everybody's own choice ;)

blahapa
27th October 2010, 19:56
Guys (and maybe also girls here), its nice to here about this possibilities. I have ATI HD 5750 card so I cannot use this solution.

However I need the same deinterlacing method as is used in most common DVB set-top-boxes. (Do anyone know?)
It´s part of my diploma work.

No matter if I will do this via AVIsynth or VirualDub. Anyway I need to save it as uncompressed AVI. I don´t know how to do it via AVIsynth. Where I can find any library with filters for VirtualDub?

Blue_MiSfit
27th October 2010, 20:22
Set top boxes always do some kind of bob deinterlacing.

blahapa
27th October 2010, 20:55
Set top boxes always do some kind of bob deinterlacing.

Blue_MiSfit, nice to hear something from you. I have no time to try what you told me in my last problem. But this question is more or less still about the same.

I need to know which deinterlacing method is used in H.264 (as a lot of companies said "MPEG-4") set top boxes. They aren´t in use till now in my country but I think in United Kingdom has many people some.

You think it is BOB or BOB with adaptive deinterlaxing or BOB+wave compensation (I think this one is not used in H.264 set top boxes, STB would cost more) as is on this web site?

http://100fps.com/

I will use maybe Field BOB...

LoRd_MuldeR
27th October 2010, 21:18
I need to know which deinterlacing method is used in H.264 (as a lot of companies said "MPEG-4") set top boxes. They aren´t in use till now in my country but I think in United Kingdom has many people some.

This cannot be answered, because there is not the one deinterlacing method used by all set top boxes.

The H.264 Standard only covers how the H.264 decoder works. It does not cover how the video data is processed (e.g. deinterlaced) after the decoding has happened.

As Blue_MiSfit pointed out, modern set top boxes and television screens use "Bob" deinterlacers, which means from 50i input you'll get 50p output rather than 25p - nothing more, nothing less.

But that's probably the only thing in common. How the hardware deinterlacers work in detail is totally manufacturer-specific. And you can be sure that they won't tell you the algorithms they use.

In Avisynth there is a very simple bob deinterlacer, called "Bob()". But you can be sure that set top boxes use much more sophisticated deinterlacing methods to avoid the "bobbing" effect.

However I would assume that hardware deinterlacers like NVidia's PureVideo HD or the AMD equivalent don't work that much different from other companies hardware deinterlacers...

Blue_MiSfit
27th October 2010, 23:22
^^ Homerun. Couldn't say it better myself, so I won't bother :)

Derek

blahapa
28th October 2010, 15:49
OK, I see...

Now I am looking for some deinterlace filtr for VirtualDub that will not multiple datarate by 2 (HD 25p datarate is aprox. 155MB/s and I can play it with SSD disk but 310MB/s I can play only with SSD disk to PCIe slot - and I dont have 300 € to buy something like this:

http://www.ocztechnology.com/products/solid-state-drives/pci-express/revodrive/ocz-revodrive-pci-express-ssd-.html
)

I have found some deinterlace filters here:
http://software.techrepublic.com.com/thankyou.aspx?&tag=content;leftCol&docid=835393&view=835393&load=1&authId=FlNEoEQgq0CHx95TxKE6XfjEUJVk7CaONplV4l0149S7cDelmfbjiT2mBqfZxKZj

but nothing special. Video after this filtration is like from stroboskop.
Any web which will spare time to find the right filter?

AlekseiV
28th October 2010, 18:14
VirtualDub > Video > Filters > Add > Deinterlace
Use default options (it uses Yadif mode 0 order 1)

Didée
28th October 2010, 18:20
Now I am looking for some deinterlace filtr for VirtualDub that will not multiple datarate by 2
That's impossible. You have a given framesize, a given number of frames per second, and a given compression ratio (namely: no compression). Since everything is fixed, there is nothing left over to reduce. ;)

I don't know the exact "must"-s and "mustnot"-s that you are facing, so here are some options:

a) lossless compression of the output. For example, Huffyuv is a rather common compressor that will reduce the datarate into half, while keeping the result pixel-identical.

b) dont use the full framesize. 1920x1080 is quite big. Perhaps it is sufficient to show only a certain "region of interest" of the full frame.

c) reduce framerate. E.g. when you start with 30i and deinterlace to 60p, you could show the result in slow motion, by simply setting the destination fps to e.g. 30 fps (half speed) or to 15 fps (quarter speed). This has not only the advantage to cut the bitrate into half / to a quarter ... it has also the advantage that it's more easy to see how good or how bad the deinterlacing process really is.
(Have a look at the sample I had posted here (http://forum.doom9.org/showthread.php?p=1433847#post1433847) - that's zoom=200% / speed=25%, for the sole reason to make it easier to see what's really going on.)

nm
28th October 2010, 19:13
Now I am looking for some deinterlace filtr for VirtualDub that will not multiple datarate by 2

Then you can't bob and you won't get a similar result compared to set-top-boxes and deinterlacing television sets.

(HD 25p datarate is aprox. 155MB/s and I can play it with SSD disk but 310MB/s I can play only with SSD disk to PCIe slot

Do you really need lossless storage? If yes, why not compress losslessly with HuffYUV or Ut (http://forum.doom9.org/showthread.php?t=143624)? You'll save at least half of the bandwidth.

blahapa
28th October 2010, 19:27
That's impossible. You have a given framesize, a given number of frames per second, and a given compression ratio (namely: no compression). Since everything is fixed, there is nothing left over to reduce. ;)


NO, no, original file is MPEG-2 MP@HL 50 Mb/s .m2v and I need to deinterlace it and save it without compression because I need to play it together with videosequence H.264 transport stream (4 to 16Mb/s) and neutral gray without any break between the videos. Only possibility that I see is to join all the videos together in lossless AVI. If there is another way tell my. But I have tried a lot of players and no other than VLC succeded.

No framerate, resolution or other corections is possible. Core of my work is subjective test (ITU BT.500-11 if you know it).

It is possible to compress it lossless codec. Thank you Didée for this idea! It looks that this is solution for me... BUT VLC and my processor can´t keep up but I will try it on Quad core in my school tomorrow. Thanks

blahapa
28th October 2010, 20:46
Do you really need lossless storage?

As is above. I dont need lossless storage but I need lossless playing. That means lossless interpretation of videos. HuffYUV seems to bee good idea but it cost little bit processing time and Dual Core unfortunately can´t keep up evidently...

UT as is written here
http://forum.doom9.org/showthread.php?t=143624
seems to be much better in playing (VLC cant do it) but I have to find any player that will play it fluently. Mplayer can´t do it...

Any fast suggestion?

LoRd_MuldeR
28th October 2010, 21:12
NO, no, original file is MPEG-2 MP@HL 50 Mb/s .m2v and I need to deinterlace it and save it without compression because I need to play it together with videosequence H.264 transport stream (4 to 16Mb/s) and neutral gray without any break between the videos. Only possibility that I see is to join all the videos together in lossless AVI. If there is another way tell my. But I have tried a lot of players and no other than VLC succeded.

(1) I don't see why you can't use compression. If you don't want any quality degradation after the deinterlacing, you can still use a lossless compression. Compression doesn't have to be lossy!

(2) When you say you need to play those videos "together" and "without any break between the videos" what do you mean? You need to play them in parallel/side-by-side? Or time interleaved? :confused:

In both cases you could use Avisynth to join the processed (e.g. deinterlaced) videos together, either with Interleave() or StackHorizontal/Vertical(), and save the result in one video file.

blahapa
28th October 2010, 21:23
That means that when one video ends than must first frame of second video appear... thats the problem of playing videos with another compression in VLC because VLC will show desktop or everything whats behind the VLC window and after 1 or 2 second will appear second video.

Do you know where to play UT Video Codec or HuffYUV videos without any problem? Thats maybe the last what I need know...

In AviSynth I can´t join 2 videos with another compression. Show me this if I am wrong but I can´t do it here. "Splice: Video formats dont match" will appear...

poisondeathray
28th October 2010, 21:48
...Do you know where to play UT Video Codec...


Try Media Player Classic . Enter the # cores for frame divide count in the video configuration for UT video codec. So a quad core = 4 . Also, use Predict Left (optimize for decoding speed)


In AviSynth I can´t join 2 videos with another compression. Show me this if I am wrong but I can´t do it here. "Splice: Video formats dont match" will appear...


They have to be same format, same fps, dimensions, audio, sample rate etc...

Use mediainfo & copy & paste the text view of both videos here

LoRd_MuldeR
28th October 2010, 21:56
In AviSynth I can´t join 2 videos with another compression. Show me this if I am wrong but I can´t do it here. "Splice: Video formats dont match" will appear...

Avisynth doesn't handle video in compressed form at all! After the video has been loaded into Avisynth with the appropriate source filter, all you have is "raw" (uncompressed) video data. All Avisynth filters and functions operate on that "raw" video data. And that's also how Avisynth will deliver the final video to the host application, such as VirtualDub. The host application will usually compress the video again.

If Avisynth refuses to splice two clips using the "++" operator or the "AlignedSplice()" function, then that's either because the clips have different dimensions or because they have a different color format or both. Use Spline36Resize() and/or ConvertToYV12() on the clips before the splice operation to fix that. The Info() function might also be helpful to check the attributes of the clips you'd like to join.

blahapa
28th October 2010, 22:07
Try Media Player Classic . Enter the # cores for frame divide count in the video configuration for UT video codec. So a quad core = 4 . Also, use Predict Left (optimize for decoding speed)


I did all this man, I am still working on dual core computer and the result was quite fluently but still not normal. And processor wasnt working on 100 procent, it was 86 maximum. But anyway I will try it tomorrow on quadro core. I hope it will be better...

blahapa
28th October 2010, 22:23
ConvertToYV12

WELL DONE, MAN! That was the problem. Now I need to play fluently UT or Huffman video and I am lucky man! :);)

LoRd_MuldeR
28th October 2010, 22:37
WELL DONE, MAN! That was the problem. Now I need to play fluently UT or Huffman video and I am lucky man! :);)

Well, VLC Player or MPlayer should play HuffYUV AVI files just fine. MPC-HC with ffdshow installed will do to. Maybe you'd like to give the MadVR renderer a try when using MPC-HC.

However a lossless compression like HuffYUV will result in a very high data rate. Not as high as uncompressed data, but still very high.

So actually your HDD might be the bottleneck that prevents fluid playback. Again: Why does the final encode that you are going to play has to be lossless? Why not encode to H.264 or MPEG-ASP ???

If you pick a bitrate that is high enough, H.264 or MPEG-4 ASP will look indistinguishable from a lossless encode for the viewer. Still that bitrate will be MUCH lower than HuffYUV or similar.

(I would suggest to you to encode your Avisynth script with x264 using CRF-Mode at CRF=18 or even CRF=16 and then visually compare the result to a lossless HuffYUV encode)

blahapa
28th October 2010, 23:01
So actually your HDD might be the bottleneck that prevents fluid playback.

Fuuhh... it´s really quite a lot of work to explain all the diploma thesis. ITU-R BT.500-11 http://www.dii.unisi.it/~menegaz/DoctoralSchool2004/papers/ITU-R_BT.500-11.pdf

Subjective test of videos - I cannot recode it or losy compress because I need one reference videoclip and one clip from hardware H.264 coder (.ts H.264 stream)...

HuffYUV has 60 MB/s but I am not playing this 10s video from my HDD but from RAMdisk. You see? Here could not start the problems with playing. Even if I am using UT YUV420 with data rate aprox. 30 MB/s I still cannot play it fluently...

Thats players problem... As I see thats also weakness of this UT and HuffYUV codec (if someone want to use it on HD resolution). If it won´t be better on quad core tomorrow I will be pressed to use normal deinterlacing a not to use Huff or UT coding... : (

nm
28th October 2010, 23:05
In both cases you could use Avisynth to join the processed (e.g. deinterlaced) videos together, either with Interleave() or StackHorizontal/Vertical(), and save the result in one video file.

Or if he only needs to play the files, AviSynth output doesn't even need to be saved -- it can be played directly. I just tried this myself and didn't have any problems with splicing two 1080p streams one after another during playback.

So, why not simply use AviSynth for the whole deal and forget about raw/lossless temporary files?

blahapa
28th October 2010, 23:13
use AviSynth for the whole deal

nm, tell me how to play it directly on fullscreen and it will be best present for (even if I have birthday on spring) :) But I need .m2v file to deinterlace (bob) before or during playing...

edit: And what did you ment with yours: "And if it's not fast enough with H.264, link it against ffmpeg-mt" in another thread?

I found something about it:
http://ubuntuforums.org/showthread.php?t=1049449

But I thing that my mplayer uses both cores... Anyway it is too slow...

LoRd_MuldeR
28th October 2010, 23:20
Fuuhh... it´s really quite a lot of work to explain all the diploma thesis. ITU-R BT.500-11 http://www.dii.unisi.it/~menegaz/DoctoralSchool2004/papers/ITU-R_BT.500-11.pdf

Subjective test of videos - I cannot recode it or losy compress because I need one reference videoclip and one clip from hardware H.264 coder (.ts H.264 stream)...

Again: If you encode the "reference" with x264 using CRF=16 and visually compare it to the lossless original, you probably won't be able to spot the difference!

Moreover H.264 does have a "true" lossless mode as well ;)


HuffYUV has 60 MB/s but I am not playing this 10s video from my HDD but from RAMdisk. You see? Here could not start the problems with playing. Even if I am using UT YUV420 with data rate aprox. 30 MB/s I still cannot play it fluently...

Thats players problem... As I see thats also weakness of this UT and HuffYUV codec (if someone want to use it on HD resolution). If it won´t be better on quad core tomorrow I will be pressed to use normal deinterlacing a not to use Huff or UT coding... : (

HuffYUV already is stunning fast. Will be hard to find a lossless Codec that's even faster.


Or if he only needs to play the files, AviSynth output doesn't even need to be saved -- it can be played directly.

...given his filter chain is fast enough for real-time processing. Depending on the deinerlacing filter in use, this can easily be not the case.

Didée
28th October 2010, 23:39
nm, tell me how to play it directly on fullscreen
I usually do this by opening the *.avs script in a media player, then switch the media player to fullscreen.

But I need .m2v file to deinterlace (bob) before or during playing...
Why you need m2v? In regards to deinterlacing or playing back, there's no technical need for the source to be m2v. You can bob/deinterlace AVI just as well, or *mp4, or *mkv, or *wmv, or whatever.

All in all, we're close to the 3rd page in this thread, and it's still not clear what exactly you want to accomplish. Something is to be subjectively compared, and bob deinterlacing will be involved. Apart from that, everything is clear as mud.


Seriously - you are working on your diploma thesis?

blahapa
28th October 2010, 23:45
won't be able to spot the difference!

Ok, I know what you wanna tell me. Anyway... You maybe know it that there will be no difference after coding to H.264, maybe I will see the same... but maybe on 45" TV the observers can see the difference. An also my teacher will not allow me to recompress 50Mbps .m2v reference... Lossless H.264 model - it could be but where and how do it? How to join the files together and how to play it?

HuffYUV already is stunning fast.

UT is faster... but anyway too slow.

Depending on the deinerlacing filter in use, this can easily be not the case.¨

So I can´t play it directly...

Tomorrow I will know more... I am going to sleep and will tell you tomorrow how it works on quad core.

LoRd_MuldeR
28th October 2010, 23:51
Ok, I know what you wanna tell me. Anyway... You maybe know it that there will be no difference after coding to H.264, maybe I will see the same... but maybe on 45" TV the observers can see the difference.

I doubt that, really ;)

So I suggest you give it a try! And if you really can see a difference with CRF=16, successively lower the CRF even further until you can't spot the difference anymore.


Lossless H.264 model - it could be but where and how do it? How to join the files together and how to play it?

x264.exe --qp 0 --output lossless.mkv input.avs

The result can be decoded with any H.264 decoder that supports the "Predictive Lossless Coding" feature of the "High 4:4:4" profile.
As this applies to libavcodec's H.264 decoder for quite some time now, an up-to-date MPlayer or VLC Player will do the job...

nm
29th October 2010, 00:03
nm, tell me how to play it directly on fullscreen and it will be best present for (even if I have birthday on spring) :) But I need .m2v file to deinterlace (bob) before or during playing...

As Didée said, make your player open it on full screen. Speed is mostly determined by the H.264 decoder and the bobber you're using. Bob() should be fast enough during MPEG-2 decoding and its deinterlacing quality will be comparable to that of cheap hardware solutions. For a bit better deinterlacing, you could try yadif, but then you'll probably need to split filtering to multiple threads with AviSynth MT.


edit: And what did you ment with yours: "And if it's not fast enough with H.264, link it against ffmpeg-mt" in another thread?

I found something about it:
http://ubuntuforums.org/showthread.php?t=1049449

Yep. Ffmpeg-mt contains a version of libavcodec with frame-based multithreading. It's usually faster than the normal libavcodec on multicore CPUs. There are probably "mplayer-mt" Windows builds available, but I haven't looked around. FFdshow-tryouts also allows you to use this decoder.

Depending on the CPU speed, you may need to use ffmpeg-mt or some other fast decoder (Divx7, CoreAVC, DiAVC) for realtime playback of your .264 segment. They can be accessed through AviSynth's DirectShowSource2 (DSS2).

But I thing that my mplayer uses both cores... Anyway it is too slow...

Hmm. Were you playing H.264 video or what? I thought you were using it for playing the lossless huffyuv and Ut files, and I don't think MPlayer/libavcodec has a multithreaded HuffYUV decoder. Ut is a different deal since it's an external VFW (and optionally DirectShow) codec, so it should work about as fast in any VFW-compatible player.

blahapa
29th October 2010, 00:05
I usually do this by opening the *.avs script in a media player, then switch the media player to fullscreen.

Works but so slow with mpeg2 .m2v video.
M2V video is format of video part of file that you obtain when you will unwrap .MXF file that is saved from profesional player (for example Omneon
http://www.omneon.com )

I am sorry that I cannot tell everything about diploma WORK (sorry for this mistake - as our former prime minister said: "My english is not perfect") but its too much to tell and there is no place and time to do but I will try in short way...(as I was trying also before but without any success)

Next file is .ts (H.264 transport stream - I will have it from 4 Mbps till 16 Mbps - depending on how I will set H.264 hardware coder). You can become this file from streamer, which saves stream on output of hardware coder (on the input is for example Omneon).

This two video sekvences I need to play in sequence (last frame of 1st video and than fisrt of 2nd video). Also I need to put between it AVI video (I made it in Adobe Permiere) with neutral grey and caption "Sequence number 1A" ... 1B.. 2A and so on.

I need to deinterlace M2V and .TS file the same way as H.264 set top boxes do (hopefully it is BOB).

More clear? Any suggestion for that? Another way than I am going? Because I am missing after long way only normal playing of videos that were lossless compressed by HuffYUV or UT.

Thanks a lot.

nm
29th October 2010, 00:12
Works but so slow with mpeg2 .m2v video.

Which source plugin are you using for the M2V? Try something else too, since this should be the easiest part of the process.

More clear? Any suggestion for that? Another way than I am going? Because I am missing after long way only normal playing of videos that were lossless compressed by HuffYUV or UT.

Yep, both should play on a quad box.

blahapa
29th October 2010, 14:36
Which source plugin are you using for the M2V?

When I am importing it to VirtualDub via AviSynth its DGDecode. Otherwise I am opening it directly in VirtualDub.

AviSynthScript:
LoadPlugin(...path\DGDecode)
mpeg2source( path\videoclip.d2v)
Bob

D2V is made in DGIndex.

But I dont think that this is relevant for speed of decompression.

Yep, both should play on a quad box.

Quad BOX: result is the same even when I was coding it for 4 core... Video is not playing fluently. Processor works on 46 procent.

Maybe I need another UT or HUFF decoder. Till now I am using UTvideo-8.4.0-x86 and Huffman from ffdshow_rev3562_20100907

Any new version of theese codecs? Another player than Media Player classic? It is really strange... Thanks

nm
29th October 2010, 14:45
When I am importing it to VirtualDub via AviSynth its DGDecode. Otherwise I am opening it directly in VirtualDub.

AviSynthScript:
LoadPlugin(...path\DGDecode)
mpeg2source( path\videoclip.d2v)
Bob

D2V is made in DGIndex.

But I dont think that this is relevant for speed of decompression.

It may be relevant when we're talking about direct playback of the AviSynth script. Try FFMS2 instead, as Didée shows here: http://forum.doom9.org/showpost.php?p=1454089&postcount=15

Quad BOX: result is the same even when I was coding it for 4 core... Video is not playing fluently. Processor works on 46 procent.

So you tried changing the "Frame divide count" option in Ut? Did you also check "Optimize for decoding speed (Predict left)"? Maybe even more threads might help? Maybe there's an I/O bottleneck?

For HuffYUV, make sure you're using a multithreaded implementation. FFdshow isn't, AFAIK.

Blue_MiSfit
30th October 2010, 05:11
blahapa,

Listen.

You don't need lossless video. I understand you want the playback to look just like the original videos, but that doesn't mean you need to be mathematically lossless.

What you want is PERCEPTIBLY lossless video. Enter x264.

Encode your video at CRF15, and try spotting a difference between the source and the encode, then come back and tell me you need lossless ;)

I guarantee that a CRF15 encode will play back perfectly in Media Player Classic HC ;)

If you're on a Mac, ProRes is the codec of choice for this kind of work. DNxHD when you have Avid software installed on Windows or Mac, and CineForm if you're a Premiere user. Cineform is probably the best overall solution for this kind of thing.

Still, x264 should be more than adequate.

Derek

blahapa
30th October 2010, 22:58
I guarantee that a CRF15 encode will play back perfectly in Media Player Classic HC

I did it and.... the result is still the same, maybe worse. But media player was using exactly 50 proc. of my processor - it seems like it is using only one core. Is it possible to compress it with x264 with multithread or multicore support?

you can see screen, how it was here:
http://leteckaposta.cz/849797986

x264 --crf15 -o output.mkv AVSfile.avs

And I cannot use Media player Classic Home Cinema but the normal one. HC cannot read output file...

poisondeathray
30th October 2010, 23:06
Are you using ffdshow for the decoder for MPC? (I see the task tray icon in your screenshot)

Set h.264/avc decoding to ffmpeg-mt for multithreading decoding in the ffdshow configuration

For encoding, the source filter is not multithreaded if you used DGIndex and dgdecode.dll and may be a bottleneck

Didée
30th October 2010, 23:58
Yes, decoding via ffmpeg-mt within ffdshow surely is a good idea.

To further reduce decoding complexity, include --no-cabac into the commandline for encoding. CABAC needs quite some processing power, both for encoding and decoding. The higher the bitrate, the more CPU time is needed for CABAC. And you have a pretty high bitrate.

Blue_MiSfit
31st October 2010, 04:09
And I cannot use Media player Classic Home Cinema but the normal one. HC cannot read output file...


This makes no sense whatsoever.

MPC-HC is just a newer version of MPC, with many many many MANY improvements, and supports much more "out of the box".

If you're not getting realtime decoding, and are seeing exactly 50% CPU usage, then you're using vanilla libavcodec for decoding. This happens with old versions of ffdshow or MPC. You need to be using ffmpeg-mt, as configured by default in newer builds.

1) Remove MPC, haali splitter and ffdshow
2) Get latest MPC-HC and ffdshow-tryouts from xvidvideo.ru, get latest haali splitter from http://haali.su/mkv/
3) Install with defaults
4) Configure MPC-HC to use haali renderer if your GPU is very slow. The current default (VMR9 on XP and EVR-CP on Vista / 7) can be tough on older / integrated GPUs and slow playback unnecessarily. Haali isn't perfect, but is usually VERY fast.

The advantage of H.264 is that it's MUCH easier to play back in real-time than (for example) the lossless codecs you've described here, mainly due to the fact that everyone is interested in playing back HD H.264 :)

After following these steps, if you're still seeing poor decode performance, you can try re-encoding with --no-cabac, as suggested by Didee. This will make the stream MUCH easier to decode on slower CPUs. Still, a modest dual core (or any quad) should handle up to 1080p30 of at least ~30mbps (rough estimation) without skipping a beat, even with CABAC.

On the encoding side, x264 is multithreaded by default. You're using a recent build from x264.nl, right? You can use a faster preset if the default is too slow for you.

Derek

nm
31st October 2010, 11:19
The advantage of H.264 is that it's MUCH easier to play back in real-time than (for example) the lossless codecs you've described here, mainly due to the fact that everyone is interested in playing back HD H.264 :)

Lossy H.264 is easier to decode because the bitrates are much lower than with lossless codecs. Lossless H.264 is harder than multithreaded HuffYUV and Ut.

After following these steps, if you're still seeing poor decode performance, you can try re-encoding with --no-cabac, as suggested by Didee. This will make the stream MUCH easier to decode on slower CPUs. Still, a modest dual core (or any quad) should handle up to 1080p30 of at least ~30mbps (rough estimation) without skipping a beat, even with CABAC.

Blahapa is trying to play 1080p50 (or maybe 60p?), so he'll need to either drop CABAC or use a quad core. Hardware decoding on Nvidia/Ati (only Radeon HD >4xxx) GPUs through DXVA/CUDA is also possible.

Blue_MiSfit
1st November 2010, 02:22
Yeah, double rate progressive at CRF15 will probably require a quad to play smoothly, with CABAC and deblock. You can disable both and you should be fine.

Derek

blahapa
3rd November 2010, 09:01
Set h.264/avc decoding to ffmpeg-mt for multithreading decoding in the ffdshow configuration

Thank you, poisondeathray, for this suggestion, that really helped. And thanx also Didée, --no-cabac also helped.

I also realize that if I use compression HuffYUV (but from ffdshow, not the other one) from Virtualdub directly, VLC is playing video finally fine with quad core. So I need only 64 GB SSD disk to play the videos (cca 75 MB/s) :)

Oh, I think that I forgott send my last answer, Derek, I wrote it but wanted to write last modification and didnt send:)
I will try to reinstall codecs and MPC as you wrote if it will be needed. Till now it seems I will you another solution (above).
Of course I know that most people will use H.264. Thats also subject of my thesis and I went throught a lot of theory about H.264 coding and decoding...

The only problem know is to use Bob for h.264 transport stream. If I am importing it into Virtualdub directly and then I am using built in deinterlacing than is everything fine but if I wanted to use AviSynth:


a=DirectShowSource("E:\aa\a.ts")
Bob(a)

And then save as AVI (no matter which compression) it seems like some frames go forward and some backward the movement in the picture. So I have tried to alternate field order in gunnar Thalin smooth deinterlace filter the result was different but still was it 2 frames forward and two back...

Any idea? I can just import the file directly:

a=DirectShowSource("E:\aa\a.ts")
return a

and than use Rafal Fraczek Yad deinterlace filter I have tried to control it point by point and the results are quite good - Rafal is using some prediction in picture but I dont know if the result video wont be total different from HD set-top-box with Bob+something(blur, sharpen - who knows) deinterlace because it is yadiff and frame rate will stay at 25fps. Maybe I can use built-in Bob doubler deinterlace filter - it semm it is only bobing nothing else...

Rafal Fraczek Yad deinterlace filter - download:
http://download.chip.eu/pl/download_getfile_pl_3561980.html?s=http://dl01.chip.eu&f=/155626/vd10.zip&t=4cd11613&sign=c26603c41f3313f950aa06cdc11d5bc1&dl_type=dl_hs&lang=pl#
http://download.chip.eu/pl/VdYad-1.0_3561964.html

Here are some informations in english:
http://software.techrepublic.com.com/abstract.aspx?kw=deinterlace&docid=835393&tag=tr-left

Didée
3rd November 2010, 09:53
Pardon if I sound penetrant, but I still don't see clearly what you are (will be) compairing to what.

The "reference" seems to be "deinterlacing like set-top boxes are doing". Now,

a) different boxes supposedly will implement different techniques

and from what I gathered,

b) you don't even have the output stream of a settop box, but are going to somehow similate it?


When the theoretical anchor is vague/nebulous, and that anchor isn't even available but is to be simulated, then I wouldn't have much faith in the comparison. You simply cannot compare software bob/deinterlacing to hardware deinterlacing when you don't have a stream produced by that hardware. The difference between what a box is doing and your simulation, that difference might as big (perhaps even bigger) than the difference between two different and unrelated software filters!


I just want to prevent that you end up doing a comparison that's totally pointless. But for that, it must be clear what you're going to compare with what.

blahapa
3rd November 2010, 10:05
Yee, the reference is from Omneon player 50 Mbps MPEG2 and video to compare is .ts from H.264 coder (cca 6-14 Mbps).

Exactly, I cant compare output from h.264 set top box because I and my school dont have any, so I have to guess using information from internet. Or if anyone have some video sample. how is the picture from h.264 coder it will also help. But more important is the way of deinterlacing in that set top boxes...

Didée
3rd November 2010, 10:22
In any case, I would not assume that the simple bob() of Avisynth is comparable to hardware boxes. Bob() is a very generic filter - in other words, it's about the most simple / most dumb method that only exists.
I'd guess that using tdeint, like source.tdeint(mode=1) would be more close to the deinterlacing of settop boxes. At least it has detection of static areas (station logos usually don't flicker like hell when shown by a settop box, or do they?), and the 3D-kernel helps on slight (subpixel) motion.

When you want to include a high anchor from the "offline processing" (i.e. slower than realtime) side, then there is TempGaussMC, respectively QTGMC.

For loading the source into Avisynth, watch out for FMMS2 (ffmpegsource2). With DirectShowSource, you simply don't know what is going on behind the lines. One knob turned wrong, and the source already gets pre-processed before you get your filtering fingers on it.


But once more - you might have a fine source there, but it doesn't help for your basic goal. All you can do is compairing different software deinterlacers against each other. You can not compare against "hardware processing" when you simply don't have it! Any assumption about how HW processing probably is working might be completely off and wrong. You just can't know, simple as that.

blahapa
4th November 2010, 21:53
When you want to include a high anchor from the "offline processing" (i.e. slower than realtime) side, then there is TempGaussMC, respectively QTGMC.
For loading the source into Avisynth, watch out for FMMS2 (ffmpegsource2).

OK, no matter if it will be exactly like on STBoxes. I will use Bob. Its enough for me because this is not main goal of the work.

I have tried ffmpegsource2 but when I wanted to import m2v file I will get en error FFIndex: failed to open file.m2v for writing.

When I wanted to open .ts file: Can´t open file...

Whats wrong again? It really starts driving me mad. If anyone knows how to import this .ts file into the VirtualDub or x264 via AviSynth and in the result will be no backward steps when I am playing it frame by frame, please tell me...

poisondeathray
4th November 2010, 22:09
DSS2("video.ts")


Get .avss.dll from haali media splitter package, put in avisynth plugins directory. Make sure you have haali media splitter installed with ffdshow (set to ffmpeg-mt)

If you want audio, use audiodub

vid=DSS2("video.ts")
aud=directshowsource("video.ts")
audiodub(aud,vid)

nm
4th November 2010, 22:13
I have tried ffmpegsource2 but when I wanted to import m2v file I will get en error FFIndex: failed to open file.m2v for writing.

When I wanted to open .ts file: Can´t open file...

http://ffmpegsource.googlecode.com/svn/trunk/doc/ffms2-avisynth.html

Limitations
* Requires Haali's Media Splitter if ogm or mpeg ps/ts is to be opened.
* Haali's splitter requires transport streams to be cut at packet boundaries. Use TsRemux to fix the stream before trying to open it.
* Because of LAVF's demuxer most raw streams will fail to work properly such as elementary h264 and other mpeg video streams.


So, mux the .m2v to a container (MKV should work) and install Haali's Media Splitter for TS support.

Also note:


Known issues
* There will appear decoding artifacts on h264 in transport streams.


So you should use DSS2 or remux the streams for that case.

Didée
4th November 2010, 22:15
1) ffmpegsource2 will create an index file in the same folder where the source file resides. Do you have writing access to that folder?

2) Did you respect the following premises:
FFmpegSource2 User Manual
.
.
Limitations

* Requires Haali's Media Splitter (http://haali.cs.msu.ru/mkv/) if ogm or mpeg ps/ts is to be opened.
* Haali's splitter requires transport streams to be cut at packet boundaries. Use TsRemux (http://forum.doom9.org/showthread.php?t=125447) to fix the stream before trying to open it.


Edit: Late I was ;)

blahapa
4th November 2010, 22:57
DSS2("video.ts")


Get .avss.dll from haali media splitter package, put in avisynth plugins directory. Make sure you have haali media splitter installed with ffdshow (set to ffmpeg-mt)



Result: Cant open file: video.ts 80070003

poisondeathray
4th November 2010, 23:11
did you rename the video to "video.ts" ? or does it have another name ?

can you play the .ts video in mpc directly ?

what happens when you render the file in graph edit or graphstudio ? do the pins connect ?

try re-wrapping in tsmuxer to .m2ts (sometimes there is problem with container) , then try again

sneaker_ger
4th November 2010, 23:44
If the suggestions of the other posters fail you could also try DGMPGDec (http://hank315.nl/files/DGdecode/dgmpgdec158.zip) for the m2v and DGAVCDec (http://www.videohelp.com/download/dgavcdec109.zip) for the h264 ts.

poisondeathray
4th November 2010, 23:48
...DGAVCDec (http://www.videohelp.com/download/dgavcdec109.zip) for the h264 ts.

Not a good idea, since his AVC transport stream is interlaced

blahapa
4th November 2010, 23:49
[url]* Requires Haali's Media Splitter if ogm or mpeg ps/ts is to be opened.
* Haali's splitter requires transport streams to be cut at packet boundaries. Use TsRemux to fix the stream before trying to open it.


I have Haali's Media Splitter, I also tryed to fix .ts stream... use output formats m2ts or ts but the result is still the same...

No, my video has another name aa.ts and I really dont try to open it with the template code but with my code.

Here is the aa.ts file in ZIP (10MB):
http://leteckaposta.cz/730871560

Yes, I can play .ts directly in MPC I can also open it in VirtualDub directly. I can also import it throught AviSynth using .dga file (but the results are very bad - a lot of artefacts) and I can also import it using DirectShowSource but there are still some backward moves after import:(

Graph edit? I dont need to render this file but I can try it if it helps...

poisondeathray
4th November 2010, 23:53
I can also import it throught AviSynth using .dga file (but the results are very bad - a lot of artefacts)

This is known issue with AVC PAFF streams (type of interlacing) , and why you shouldn't use it for this


I can also import it using DirectShowSource but there are still some backward moves after import:(


This is why DSS2() was suggested. Frame accurate in a container


Graph edit? I dont need to render this file but I can try it if it helps...
Graph edit was just to diagnose your directshow filters , since you are using directshow source and directshowsource2 (DSS2) , but since directshowsource works, it shouldn't be necessary to do this

Theoretically, if DirectShowSource() works, then DSS2() should also work but you shouldn't get misplaced frames with DSS2()

sneaker_ger
5th November 2010, 00:05
Not a good idea, since his AVC transport stream is interlaced

This is known issue with AVC PAFF streams (type of interlacing) , and why you shouldn't use it for this

Didn't know that it does not work correctly with PAFF. Just had a small MBAFF stream which seemed to work fine.


Graph edit was just to diagnose your directshow filters , since you are using directshow source and directshowsource2 (DSS2) , but since directshowsource works, it shouldn't be necessary to do this

DirectShowSource can also open graph files. Create a video only graph, delete the renderer, save and open the graph file with DirectShowSource. Also use parameter "audio=false" - or "video=false" if you're creating an audio graph.

poisondeathray
5th November 2010, 00:20
Here is the aa.ts file in ZIP (10MB):
http://leteckaposta.cz/730871560


I can't download from this host. I'm getting 3-4KB/s and it times out everytime. I'm in Canada, so maybe it's a location issue

poisondeathray
5th November 2010, 00:24
DirectShowSource can also open graph files. Create a video only graph, delete the renderer, save and open the graph file with DirectShowSource. Also use parameter "audio=false" - or "video=false" if you're creating an audio graph.

Yes I know, but the point was to see if his pins connected automatically to see if there is a problem with directshowsource or filters, not to manually set up a graph. DSS2 will connect to the same filter with highest merit as directshowsource

Earlier he said he couldn't open a file at all:

When I wanted to open .ts file: Can´t open file...


But later, he said directshowsource works, so obviously it's not a directshow filter issue

sneaker_ger
5th November 2010, 00:53
I can't download from this host. I'm getting 3-4KB/s and it times out everytime. I'm in Canada, so maybe it's a location issue

I uploaded the sample to mediafire:
http://www.mediafire.com/?gdlfdlu9n69qrs5

I had no trouble opening the sample using DirectShowSource with Haali + ffdshow.

blahapa
5th November 2010, 00:56
I can't download from this host. I'm getting 3-4KB/s and it times out everytime. I'm in Canada, so maybe it's a location issue

Oh, yes... I didnt know that it could be so bad... Try this link:
http://megarapid.eu/files/1258705/aa.zip

Or I can upload it somewhere in North America... suggest the server

blahapa
5th November 2010, 01:02
I uploaded the sample to mediafire:
http://www.mediafire.com/?gdlfdlu9n69qrs5

I had no trouble opening the sample using DirectShowSource with Haali + ffdshow.

I have also no problem to open it throught DirectShowSource. But try to use Bob in AviSynth alghorithm. You´ll get what I am talking about one frame forward, one backward the motion....

poisondeathray
5th November 2010, 01:02
No it's ok, i got it from sneaker_ger's link

it works fine here too DSS2(), and directshowsource() as expected (haali + ffdshow as well)

are you sure path and filename are correct?

poisondeathray
5th November 2010, 01:03
I have also no problem to open it throught DirectShowSource. But try to use Bob in AviSynth alghorithm. You´ll get what I am talking about one frame forward, one backward the motion....

wrong field order

assumetff()
bob()

avisynth assumes bff() by default

Didée
5th November 2010, 01:29
wrong field order
avisynth assumes bff() by default

OUCH!!! http://www.cheesebuerger.de/images/smilie/boese/k022.gif


BTW, on the original sample ffmpegsource2 told me:
"ffindex: can't parse file, most likely a transport stream not cut at packet boundaries"

Using tsMuxeR(GUI), remuxing *with* "continually insert SPS/PPS", the file can be accessed correctly. (Except for ffms2 won't find the 1st keyframe or something, correct picture starts only after frame 52.)
___

Plea for DGDecodeNV: it accesses the file without any problem. :)

blahapa
5th November 2010, 01:38
wrong field order

assumetff()
bob()

avisynth assumes bff() by default

Man, thank you, this I was looking for!! I dont know AviSynth very much, I thought that another field order is some parametr in Bob... But I havent found any. So this way... Thanx again. It seems I will leave you in peace for a while:) I hope :cool:

blahapa
5th November 2010, 23:09
One more problem, with directshowsource is aviSynth reading some frames badly. Dss2 still dont work for me. I dont know why..

Blue_MiSfit
5th November 2010, 23:11
dss2 doesn't work? Have you copied avss.dll from the haali media splitter installation folder into your avisynth plugins folder?

blahapa
6th November 2010, 00:09
Yes... the er. Message is the same as above: cant open ,.. File.avs: 80070003.
i dont if this is error number or what...

poisondeathray
6th November 2010, 00:11
One more problem, with directshowsource is aviSynth reading some frames badly. Dss2 still dont work for me. I dont know why..


Can you be more specific?

What does "reading some frames badly mean" ?

Do you mean frames out of order ? Pixellation ? Other errors in decoding ? etc...?

DirectShowSource should give the same result as DSS2() except when doing seeking (e.g. scrubbing the timeline) . If you do a straight encode from start to finish, you shouldn't have any problems . There might be other issues going on here like decoding problem

blahapa
6th November 2010, 00:31
Yes, frames pixelation, gray fields in it...
yes, i need seeking because i have one grate file and i need only part of this one... I have only internet on mobile phone, we had strong winds yesterday, wifi will be fix tomorrow...

poisondeathray
6th November 2010, 00:34
Yes, frames pixelation, gray fields in it...
yes, i need seeking because i have one grate file and i need only part of this one...

But file is ok in MPC ? (no pixellation, gray fields)

What version of avisynth ? IIRC , DSS2() doesn't work with older versions. If you don't know what version, type version() for avs script and preview

blahapa
6th November 2010, 01:02
Yes, input .ts file ís fine in mpc and sometimes also in vdub, i think there is some problem when im seeking also-framer are changing numbers plus minus 10 numbers. Ver. 2.60 27 sep 2009

Blue_MiSfit
6th November 2010, 08:01
I'd suggest remuxing your TS to an MKV, since MKV works extremely well with DSS2, at least in my experience.

Seems like a nasty workaround, and definitely ugly in production, but for an academic test like this it can't be THAT bad ;)

You could also transcode your TS source into a lossless H.264 stream using x264, and store it in an MKV or an MP4, just in case there's something pathological about your source that the various open source splitters can't deal with.

Another idea, LAVF splitter: http://forum.doom9.org/showthread.php?t=156191 It's at least something else you can try. Try removing haali splitter for this to work, or maybe making a custom GRF file in GraphEdit and then loading it with DirectShowSource.

TS can be difficult to get into AviSynth, depending on the source :(

Derek

blahapa
7th November 2010, 15:19
I'd suggest remuxing your TS to an MKV

OK, I ll try... But I have not so much time for trying now.
How to mux quickly in MKV? SUPER is very slow for that...

blahapa
7th November 2010, 16:21
Guys, its again moving one frame forward and one backward...
Even assumetff(a) and than Bob (a) cant fix this.

How is it possible? Yesterday it was fine I think I have tested the video... Try this again please on your computers I really dont know what was changed in the meantime...

blahapa
7th November 2010, 16:42
Guys, its again moving one frame forward and one backward...
Even assumetff(a) and than Bob (a) cant fix this.

How is it possible? Yesterday it was fine I think I have tested the video... Try this again please on your computers I really dont know what was changed in the meantime...

Sorry guys, I didnt know, that there is e difference between:

a=directshowsource("file.ts")
assumetff(a)
bob(a)

and

directshowsource("file.ts")
assumetff()
bob()

With the last code it is importing again fine... Ok, last problem is with importing media (some gray fields etc. in some frame as is written above - I am trying x264 and lossless convert to mkv)

blahapa
7th November 2010, 17:17
And how can I get the same INTERLACED output video from x264? I tryed

x264 --crf 0 --interlaced --tff -o out.mkv in.ts

but there are still some warnings and the output video isnt seem to bee like input.

warnings:
interlace+weightp is not implemented

interlaced<1> > level limit <0>

poisondeathray
7th November 2010, 17:41
OK, I ll try... But I have not so much time for trying now.
How to mux quickly in MKV? SUPER is very slow for that...

Try mkvtoolnix

But in my experience, mkv doesn't work well with interlaced streams. You often get wrong framerate, or wrong duration

Try this again please on your computers I really dont know what was changed in the meantime...

Everything works for me on your sample stream, even dss2()

And how can I get the same INTERLACED output video from x264? I tryed

x264 --crf 0 --interlaced --tff -o out.mkv in.ts

but there are still some warnings and the output video isnt seem to bee like input.

warnings:
interlace+weightp is not implemented

interlaced<1> > level limit <0>

Try disabling weightp
--weightp 0

blahapa
7th November 2010, 17:51
But in my experience, mkv doesn't work well with interlaced streams. You often get wrong framerate, or wrong duration

Yes, mkv out from x264 is changing duration (last 3 seconds is off) and maybe framerate too....

What do you suggest (problems with wrong frames time to time)?

//one more edit: //edit: frame rate seems to be ok in mkv and also interlacing is ok but when I was controlling it point to point, there was different colors. In MKV there are colors more dark than in original .ts, so I cant use x264 MKV. I also dont know why is x264 cutting the end of file (40 frames). I could handle this but I can not handle the colors. But in worse case I can use this... But why the colours are changing??

blahapa
7th November 2010, 20:51
Another idea, LAVF splitter: http://forum.doom9.org/showthread.php?t=156191 It's at least something else you can try. Try removing haali splitter for this to work, or maybe making a custom GRF file in GraphEdit and then loading it with DirectShowSource.

TS can be difficult to get into AviSynth, depending on the source
_


I have tryed this and I could see output video from graphEdit using LAVF splitter, the result was little biut different but stil with gray fields in some frames.

Only what helped was x264:

x264 --crf 0 --interlaced --tff -o out.mkv in.ts

the output is fine but with another (more dark) colours. Is anything what I can change to fix the colours?

poisondeathray
7th November 2010, 21:11
How are you determining that it's darker? what decoder/renderer/software?

Levels might be because x264 is built with decoding patch through ffmpeg , and it might be decoding different levels (maybe full range). You can feed it .avs script and control the decoder if that's the case, but then you are back to original problem

Something is set up incorrectly on your system, because your sample clip works fine here with directshowsource, dss2

If you have compatible nvidia cuda card and $15, get dgnvtools , I can't think of anything else. DSS2 would be ideal here if you can get it to work - maybe try another computer ?

blahapa
7th November 2010, 21:49
How are you determining that it's darker? what decoder/renderer/software?

Levels might be because x264 is built with decoding patch through ffmpeg , and it might be decoding different levels (maybe full range). You can feed it .avs script and control the decoder if that's the case, but then you are back to original problem

Something is set up incorrectly on your system, because your sample clip works fine here with directshowsource, dss2

If you have compatible nvidia cuda card and $15, get dgnvtools , I can't think of anything else. DSS2 would be ideal here if you can get it to work - maybe try another computer ?

Darker = in HSV less brightnes... But I havent look at what is changing in color space exactly. If it is important, I will look...

I have put the mkv file back to the virtualdub... but I can also compare with VLC... I think that the result will be the same...

Yes, the sample I send you is corect also here, but the second samples is bad... I can send to mediafire.com..

I can try to decode it in anythign else through graphedit, what do you suggest to become same colours, ffdshow?

I have triedand it seems that ffdshow is working only with directshowsource not with dss2 that is giving me good result video for out.mkv from x264...

I dont have nVidia, I have ATI, so I cant use this and also I dont have so much time to create finall videos. Another computer wont help I think... I will send the new sample... This new sample I have cutted in VideoRedo H.264 - through Trim and copy source file...

blahapa
7th November 2010, 22:17
I have controled the colours one more time and everything seems to be fine now... I cant explain it. So I will go throught this long way to final videos, uff.. it will be long night...Maybe a lot of cuts of original .ts file will be imported in VirtualDub fine and I will have less work..

Blue_MiSfit
8th November 2010, 00:15
You shouldn't have to change the colors / levels at all. Compression doesn't affect this.

If one sample looks darker / brighter than another, you're probably having a TV vs PC levels issue on playback. Study up on this.

Derek

blahapa
8th November 2010, 00:44
You shouldn't have to change the colors / levels at all. Compression doesn't affect this.

If one sample looks darker / brighter than another, you're probably having a TV vs PC levels issue on playback. Study up on this.

Derek

Its fine know... thats probably only fake that I cant explain... I promis that I have really saw that the colours has been changed but I could make also some mistake when I was using AviSynth (convertToYV12 probably?) dont know...

I hope that everything will work fine know... Maybe last question: How is it possible, that the file "out.mkv"
/ x264 --crf 0 --interlaced --tff --weightp 0 -o out.mkv in.ts /
has for example 33 gray frames (at the begining of file) more than source file "in.ts" :)

/edit: I have lisened to you at the end, Derek "Blue_MiSfit", I used x264 and everyhing works fine... and you have it in all your posts:P Thanx

nm
8th November 2010, 00:53
Maybe last question: How is it possible, that the file "out.mkv"
/ x264 --crf 0 --interlaced --tff --weightp 0 -o out.mkv in.ts /
has for example 33 gray frames (at the begining of file) more than source file "in.ts" :)

Because lavf and lavc (or ffms2, if x264 uses that) have problems demuxing and decoding those frames from your input TS. Is this the other file that you haven't yet uploaded?

blahapa
8th November 2010, 01:29
Because lavf and lavc (or ffms2, if x264 uses that) have problems demuxing and decoding those frames from your input TS. Is this the other file that you haven't yet uploaded?

Yes, I am sorry, here it is (hair.rar):
http://www.mediafire.com/?7orifbth6jl6by3

If there will be problem witch decoding I cant see all the frames from .ts file, can I? This 35 or how many frames are added before 1st frame...

blahapa
8th November 2010, 01:34
In any case, I would not assume that the simple bob() of Avisynth is comparable to hardware boxes......

I'd guess that using tdeint, like source.tdeint(mode=1) would be more close to the deinterlacing of settop boxes. At least it has detection of static areas (station logos usually don't flicker like hell when shown by a settop box, or do they?), and the 3D-kernel helps on slight (subpixel) motion.


This is answer to Dide from 3rd page:
I have tried tdeint because you´re right, the static areas is problem... but it didnt work fine for example for titles at the end of movie... I can also upload the result here... Maybe i can use another mode but I really dont have time to investigate which is the best and which mode and settings is good for me... logo´s flicking you cant see from 2,5 m that is the right distance from for example 1m (40 inch) diagonal TV I think...

poisondeathray
8th November 2010, 01:44
Yes, I am sorry, here it is (hair.rar):
http://www.mediafire.com/?7orifbth6jl6by3

If there will be problem witch decoding I cant see all the frames from .ts file, can I? This 35 or how many frames are added before 1st frame...

but there are blank frames at the beginning when you use a media player as well (mpc+haali+ffdshow) , so you would expect the same thing if you encoded using x264 if you were using the same decoder

blahapa
8th November 2010, 01:50
but there are blank frames at the beginning when you use a media player as well (mpc+haali+ffdshow) , so you would expect the same thing if you encoded using x264 if you were using the same decoder

Yes, blank (black) frames at the beginning... but no gray frames I have gray frames at the beginning ofthe output file:) No matter...

poisondeathray
8th November 2010, 02:00
Yes, blank (black) frames at the beginning... but no gray frames I have gray frames at the beginning ofthe output file:) No matter...

Yes I confirm this too (grey frames when input directly into x264) , but not if you use avisynth to do it

blahapa
8th November 2010, 02:08
Yes I confirm this too (grey frames when input directly into x264) , but not if you use avisynth to do it

I cant use AviSynth because when I will import hair.ts to AviSynth, I will get some frames with gray fiels in it and other errors:)

poisondeathray
8th November 2010, 02:18
Let me clarify, x264 is compiled with ffms input , but ffms has problems with transport stream = errors, wrong frame count, added frames. Even when using ffms through avisynth, it has problems

When using directshowsource (dss2) + haali + ffdshow = no problems on either clip (just black frames on 2nd clip same as when played through media player , but no grey frames)

ffms has problems with transport streams - it says so in the readme

blahapa
8th November 2010, 04:27
Let me clarify, x264 is compiled with ffms input , but ffms has problems with transport stream = errors, wrong frame count, added frames. Even when using ffms through avisynth, it has problems

When using directshowsource (dss2) + haali + ffdshow = no problems on either clip (just black frames on 2nd clip same as when played through media player , but no grey frames)

ffms has problems with transport streams - it says so in the readme

YY, right but when I wrote gray fields in last post - thats another problem - thats small gray 10x10 pixels fields in picture... Try to import 2nd sample in Virtualdub via AviSynth using whatever and try to see all non black frames - there you discover 3 ugly frames. Derek wrote here that with some types of ts could have Avisynth problem... thatsway I have to transcode this .ts to .mkv lossless via x264 and then import to Virtualdub...

Long hard way but works!!!

poisondeathray
8th November 2010, 04:35
thats small gray 10x10 pixels fields in picture... Try to import 2nd sample in Virtualdub via AviSynth using whatever and try to see all non black frames - there you discover 3 ugly frames.

I didn't see any.

blahapa
8th November 2010, 04:51
I didn't see any.
Really no error in frame? Sometimes are errors only very small.... Maybe I have some bad settings here... dont know... one .ts is ok, I can import it directly, another one I have to recompress via x264.... Dont know... maybe Videoredo, sometimes is sekvence cuted on I frames sometimes not...

poisondeathray
8th November 2010, 05:02
I double checked, frame-by-frame - no errors in the section between the black frames (it's low quality, but nothing that I would call an error)

It's common to have dropouts and bad frames with broadcast streams, but not in this sample