digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Mencoder: Satellite DVB Capture (http://www.digitalfaq.com/archives/encode/9984-mencoder-satellite-dvb.html)

kwag 05-30-2004 10:13 PM

Satellite DVB Capture
 
Here's my first satellite capture/mencoder encode :)

I've done many captures and encodes in the past, but they were all done with TMPEG.
So this is my first DVB (Digital Video Broadcast) capture with my Panasonic DMR-E80 that is encoded with mencoder. The movie is "Die Hard", which was just playing a little while ago.
I used vmesquitas MencodeME to get the temp.conf file and the encode.bat, and modified it to my taste.

The source was with my Satworks ST-3618 DVB receiver, tuned to FX channel on C-Band.
The original captured file is 76.624MB, and my encoded file is 18.342MB, with no visual difference. I demuxed the AC3 audio, and muxed it with the new encoded video, so the audio is the original captured AC3 source.

The great thing about this capture is that FX channel broadcasts 4:3, but wide screen (letterboxed), and their logo is put on the bottom black border :cool:

So the original capture looks like this:

http://www.digitalfaq.com/archives/i.../2004/05/1.png

But my encoded file looks like this :D

http://www.digitalfaq.com/archives/i.../2004/05/2.png

What I did is I feeded the original capture into Vdub, added null transform filter to get the film pixel area, and edited the crop values in the temp.conf with those values. The idea is to get the exact film area excluding the borders, and then expanding the film back to the original captured resolution of 704x480.

Here's the funny thing. Reading the Mencoder documentation, I found this paragraph:

Code:

        pullup
        Third-generation pulldown reversal (inverse telecine) filter, capable of handling mixed hard-telecine, 24 fps progressive, and 30 fps pro- gressive content. The pullup filter is designed to be much more robust than detc or ivtc, by taking advantage of future context in making its deci- sions. Like ivtc, pullup is stateless in the sense that it does not lock onto a pattern to follow, but it instead looks forward to the following fields in order to identify matches and rebuild progressive frames. It is still under development, but be- lieved to be quite accurate. No configuration op- tions are available yet. NOTE: Always follow pullup with the softskip filter when encoding to ensure that pullup is able to see each frame. Fail- ure to do so will lead to incorrect output and will usually crash, due to design limitations in the codec/filter layer.

My capture is 29.97fps, but the original movie was FILM.
So this is what I used in the temp.conf.file:
Code:

vf=yuvcsp,scale=704:480:0:0:60,crop=704:272:-1:-1,pullup,softskip,unsharp=l3x3:0.6,hqdn3d=3:6:2,unsharp=l3x3:-0.7:c3x3:-1.5,noise=3th,expand=704:480:-1:-1:1
of=rawvideo=1
ovc=lavc=1
nosound=1
sws=9
lavcopts=vcodec=mpeg2video:vrc_eq=tex:vmax_b_frames=2:vrc_maxrate=7000:aspect=1.3333:keyint=18:vrc_buf_size=1835:preme=2:precmp=2:vstrict=-1:autoaspect=1:scplx_mask=0.3:vqblur=0:mbqmin=1:vqmin=1:mbqmin=1:lmin=1:
intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79:
inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44
ofps=23.976


So this :arrow: pullup,softskip is what did the IVTC, on the fly, as I encoded the clip.

And my encode.bat:
Code:

Mencoder.exe -include temp.conf -lavcopts vbitrate=4070:vpass=1 "E:\DVD_RTAV\VR_MOVIE.VOB" -o "E:\DVD_RTAV\VR_MOVIE.mpv"
Ran the first pass, and then I edited it again with vpass=2 for the second pass.

Here's the result, using calcumatic, to fit 2 movies of this length ( I didn't know the runtime of "Die Hard", so I used the latest version of CalcuMatic to find out from IMDB, and found out it's 131 minutes long ;) )
My encoded sample is 20,32MB
Get it here: http://s11.yousendit.com/d.aspx?id=9...AD136A0AF4AA70


-kwag

Encoder Master 05-31-2004 08:56 AM

Very good picture Quality kwag. Did you have some Problems with the buffer or too high peaks?


"www.yousendit.com"


I think you have a new favourite! :lol:

kwag 05-31-2004 10:23 AM

Quote:

Originally Posted by Encoder Master
Did you have some Problems with the buffer or too high peaks?

Not at all :!:
Look at the Bitrate Viewer graph:

http://www.digitalfaq.com/archives/i.../2004/05/3.png
Quote:



"www.yousendit.com"


I think you have a new favourite! :lol:
I think we all do :)

-kwag

Encoder Master 05-31-2004 12:01 PM

But what's with the DCT Precision?

Doesn't support MEncoder higher values?

kwag 05-31-2004 12:10 PM

Quote:

Originally Posted by Encoder Master
But what's with the DCT Precision?

Doesn't support MEncoder higher values?

Not via command line.
The only place I've seen higher precision is with QuEnc, which directly fiddles with libavcodec parameters, and can handle higher values.
But frankly, for low average bitrates, 8 bits of precision is plenty, as you can see by the quality of the sample ;)

-kwag

Zyphon 05-31-2004 12:16 PM

Looks great Karl nice work, I would like to work on some Captures I shall have to practice. :)

incredible 05-31-2004 12:33 PM

Karl ....

That capture, I think was at 29.97 telecined, so ...

Is that origin at 29.97 not interlaced?? (dyn.phase shifted)
Or where just the frames doubled??

Because IF I did perform an ivtc=1 or pullup,softskip .....

a 23.976 BUT still interlaced stream resulted :!: ..... How's your result :?:

To get that "interlaced" state restored to progressive I had to bring in front of the IVTC/Pullup filters a softpulldown, ....

AND... I had everytime Video and Audio out of sync as ONLY in this case I had less frames than the original state BUT with Audio/Video out of sync.

So you could give me more experiences WHAT IS REALLY NEEDED FOR NTSC INVERSE TELECINE when doing that with mencoder directly. Cause Im reprogramming Packshot and I finally want that option be included working properly! :)

Thanks a lot

kwag 05-31-2004 12:42 PM

Just a small correction. This particular movie was broadcasted wide screen. Most of the movies on that channel are full screen.
So I was lucky last night when I decided to do the capture :)
I also didn't mention that I captured at the highest quality that the Panasonic DMR-E80 can capture, which is 704x480 at an extremely high bitrate of ~9,700Kbps for one hour capacity per DVD-5.
But I captured directly to DVD-RAM, and then processed in my PC.
Eventually, I'll start to capture at 12Mbps with my WinTV PVR-250, so I can access the machine via ethernet. Right now, I must capture to DVD-RAM or to the hard drive and then transcode to DVD-RAM, which will limit the captured quality. At 2 hours per DVD, that's fine, but some movies are more than 2 hours, when you add all the commercials.
That's the reasom I want to move to software capture with the PVR-250.
Quality should still be about the same as the sample I posted.

-kwag

kwag 05-31-2004 12:55 PM

Quote:

Originally Posted by incredible
Karl ....

That capture, I think was at 29.97 telecined, so ...

Yes it is :)
Quote:


Is that origin at 29.97 not interlaced?? (dyn.phase shifted)
Or where just the frames doubled??
The original source is FILM, and telecined for broadcasting.
Quote:


Because IF I did perform an ivtc=1 or pullup,softskip .....

a 23.976 BUT still interlaced stream resulted :!: ..... How's your result :?:
My result is perfect :!:
That's why I used pullup followed by softskip, as explained in the documentation.
It clearly says: Third-generation pulldown reversal (inverse telecine) filter, capable of handling mixed hard-telecine, 24 fps progressive, and 30 fps pro- gressive content.
And that's exactly the material that is aired, when the movies are FILM. :)
Quote:


To get that "interlaced" state restored to progressive I had to bring in front of the IVTC/Pullup filters a softpulldown, ....
You didn't have to do that.
If the source is FILM, 24fps, the best filter is pullup,softskip, because it "looks ahead" as it parses the stream during encoding, to find out what the material is. That is, it doesn't "lock" on a pattern, which can fail miserably if the material is changed somewhere.
Quote:


AND... I had everytime Video and Audio out of sync as ONLY in this case I had less frames than the original state BUT with Audio/Video out of sync.

So you could give me more experiences WHAT IS REALLY NEEDED FOR NTSC INVERSE TELECINE when doing that with mencoder directly. Cause Im reprogramming Packshot and I finally want that option be included working properly! :)

Thanks a lot
I just did :D
Look at the "temp.conf" parameters I used.
Download the sample, and play it back. You'll see that it plays smoothly, and it's fully progressive, without any missing frames. On the original source, I could clearly see the [3 progressive/2 interlaced frames] in Vdub. Now it's completely restored to progressive state :)

-kwag

incredible 05-31-2004 01:57 PM

Well you didnt understand me ;-)

I want to know IF that 29.97 Source DVB is in a "combed" state???
As a telecine process was done on THAT 23.976 material to become 29.97 ready for broadcasting.

AND .. IF I do a telecine process on a 23.976 stream using avisynth ... a "combed" 29.97 comes out. And that combing bases on the performed "dynamical phase shifts" while telecining. :arrow: Thats the regular case
Dont misunderstand my post as I want to know WHAT will be via DVB broadcasted

a) A simple "framedoubled" 23.976 metrial to 29.97 (which I dont assume)

b) or a "combed" 29.97 stream out of a 23.976

Because IF we do an ivtc via Avisynth we dont only use decimate() but also Telecide() which restores the dynamical phase shifted stream to its orig state and THEN it delets the doubled frames by using the decimate() routine.

Thats above is the reason why that only "pullup, softskip" WITHOUT "softpulldown" in front of it makes me confusing.

BTW ... did you have problems with a simple ivtc=1 ??

As on my ivtc'ed streams when using mencoder (no matter if pullup, softskip or ivtc was used) at the end the movie gets a bit more asynchronous.

kwag 05-31-2004 06:14 PM

Hi Inc.,

Sorry for the late reply :?

The captured video is 29.97fps interlaced, but looking at the video with Vdub, you can clearly see the 3 progressive frames, followed by the 2 interlaced frame (field) pattern.
So as I said, the original FILM movie has been telecined for broadcasting, but this is the case of this channel. I'm not sure if others follow the same principles, so I'll have to do some captures on other channels (transponders) and see it it's the same.
I haven't tried the ivtc=1, because the documents clearly say this: Further development on ivtc has stopped, as the pullup and filmdint filters appear to be much more accurate.
That was one of the reasons I selected the pullup,softskip.
As a matter of fact, I just tried the same settings against my VOB of "Back to the Future", which is FILM, and the results are just as good as with my DVB capture encode.
So I'll do a full encode today, just to see if after I encode and mux the original AC3 audio, everything is in sync ;)

-kwag

incredible 05-31-2004 06:26 PM

Quote:

Originally Posted by kwag
Hi Inc.,

Sorry for the late reply :?

The captured video is 29.97fps interlaced, but looking at the video with Vdub, you can clearly see the 3 progressive frames, followed by the 2 interlaced frame (field) pattern.
So as I said, the original FILM movie has been telecined for broadcasting, but this is the case of this channel. I'm not sure if others follow the same principles, so I'll have to do some captures on other channels (transponders) and see it it's the same.

As I assumed! ;-)
If you would simplyperform a Frame doubling that would end up in a jerky stream and as a telecine process is performed not Frame- but fieldbased ... this causes a dynamical field/phase shift and therefore Telecine in avs is needed to restore that telecined stream back to its orig progressive state and not only decimated state.
And as you do not got a full combed stream thats why its "dynamical" fieldshifted ... this makes the telecined stream looking smooth on tv! ;-)

As I said ... I did tests on manually via avs telecined sources and that 29.97 "combed" input was outputted by mencoder as a perfect 23.976 BUT still combed (I do repeat .. in my cases ... and the telecine was done properly in avs before). A softpulldown inversed the dynamical phase shift ..... and I got a correct 23.976 "progressive" streamoutput in mencoder.
BUT in that InverseTelecine process I always ended up with async muxed streams :(

BUT! As YOU are at the root for those sources it would make really sense if YOur experiences will do "determine" which ivtc commands/setting will be used in packshot or in mencoder generally. ;-)

BTW I got the same isues when using pullup,softskip as I also saw that recommendation in the manual.

:)

PS: I did spend much time on packshot the last days and all suggestions will be integrated ... batch, commandline only, auto resizing via the used routine which also calculates in mencalc = mpeg4 input support. Bitratecalculator etc.etc.etc. .... and by this your IVTC experiences are now more than welcome! :D

vmesquita 05-31-2004 06:38 PM

Quote:

Originally Posted by kwag
I haven't tried the ivtc=1, because the documents clearly say this:

When I was testing with a music video, ivtc gave me better results than pullup... But it maybe at that specific case; :roll:

kwag 05-31-2004 06:48 PM

Quote:

Originally Posted by vmesquita
When I was testing with a music video, ivtc gave me better results than pullup... But it maybe at that specific case; :roll:

Hi Vinicius,

Maybe because the video was interlaced :?:

-kwag

vmesquita 05-31-2004 06:57 PM

No, the video was telecined with many pattern brakes (I checked in VD and saw the 3p-2i pattern). Mencoder has many IVTC filters: detc, ivtc, pullup, as you probably know, and I tested each of them. ivtc=1 gave me the best result. The Mplayer developer (actually the same guy who did the softskip fix, which used to prevent frame dropping/duplicating to work correctly with MPEG, which is fundamental for IVTC to work) told me that pullup should give a better output, but in that case it didin't.

The video was the PAL-M (NTSC should be the same) version of "Britney Spears - Toxic". PLease note that PAL-M, despite the name, is a NTSC variant, not a PAL variant, and has 480 lines and 29.97 fps.

kwag 05-31-2004 07:03 PM

So many options :!:
We're all headed towards the :screwy: :confused: :crazya: nut house (loquero) eventually :lol:

-kwag

Latexxx 06-01-2004 05:29 AM

You should have used one of these for capturing. -> Original MPEG-2 transport stream directly to your HD.

incredible 06-01-2004 05:50 AM

Quote:

Originally Posted by vmesquita
No, the video was telecined with many pattern brakes (I checked in VD and saw the 3p-2i pattern)......

.....The video was the PAL-M (NTSC should be the same) version of "Britney Spears - Toxic".

Well ... even if the origin of Musicvideos is shot on FILM ... the regular way is that they do the cutting for commercial release on a telecined 29.97 version of that source! Thats why the patterns do change!
And thats why PAL versions of these american/ntsc musicvideos are NOT to be deinterlaced in the way we do it on truly interlaced video! As a regular deinterlacing would end up in blended frames IF the ntsc 29.97 source is no present as for PAL that 29.97 telecined and cuttet music video will be converted fieldbased to 25.000 pal including blendings!

By this IF we want restore (NTSC origin based) music videos in PAL to their original progressive state, we have to use tricky avisynth functions like didées "restore24()" which is a very nice approach to select and delete blended frames after a full framerate deinterlacing internally.

By the way the same "shittyshit" problems "we" in PAL land we do have if dealing with origin NTSC "series"!! converted for PAL market!
- Voyager
- Star Trek NG
- Baywatch
- Sitcoms
- Futurama
- Simpsons

and so on .... and thats why many peoples do fail when trying to deinterlace and encode those examples to KVCD/SVCD!

Now you ask yourself "Why dont they do a IVTC and afterwards a simple 25fps speedup to end up in 25fps for the release on the pal market???"

Well ... IMHO they dont care as a "simple" convertbox usage is easier fo them to use .... as they dont care IF someones want to reencode those releases, no matter if in case of broadcastings or of DVD releases as broadcastings will end up on TV, so interlacing gots its purpose and on DVD... well as they can deal with enough Mediaspace they do encode it interlaced using a very high avg bitrate.

ALSO there does exist in PAL (and probably also in NTSC regions) a nice way to end up in the same final movielenght EVEN IF parts are cutted cause of "adult parts" or "horror parts" if the stream is broadcasted at a "youth friendly" prime time. That also will be done by dinymical framedoubling and dnymical phase shifts so also in this case you end up with a "raped" stream like mentioned above :evil:

vmesquita 06-01-2004 06:09 AM

Inc,

The pattern changes were in nearly every scene change, and of course there are many scene changes in music video.. This must be the commercial edit you were talking about. :( But the output of ivtc was great, even better than avisynth decomb. Completelly smooth movements (and that's a video with lots of movimets, any stuttering is noticeable.) :D

On the other hand, looks like PAL->NTSC conversions are not very commom or at least not with this problems... :? Am I right? Is this because most stuff is shot in NTSC even in Europe, or maube because Europe (and other PAL countries) don't export too much stuff? :? Here in Brasil there's an English series "As If" broadcasted in Satellite every week, maybe I'll try to capture just for fun. :D

incredible 06-01-2004 06:30 AM

Quote:

Originally Posted by vmesquita
Inc,
The pattern changes were in nearly every scene change, and of course there are many scene changes in music video.. This must be the commercial edit you were talking about. :( But the output of ivtc was great, even better than avisynth decomb. Completelly smooth movements (and that's a video with lots of movimets, any stuttering is noticeable.) :D

EXACT! As every scene change is a "cut", made by the studio who does process the filmed material ;-)

IVTC=1 in YOUR case does handle it right as NO blending used conversion to PAL was performed! Thats why such videos in a still 29.97 state can also be treaten well using Telecide().Decimate() as they perform "smart" and the source in that still 29.97 state doesnt contain blendings. Those blendings are only aplied IF a norm-conversation to PAL 25.000 interlaced was done.
Take a PAL!1 MTv capture of "Toxic" and perform a simple ivtc, no matter if using avs or mencoder .... you will end up in blendings ... thats why we need restore24() as it "cleans" the 25fps converting from the problems being added by such "rape" conversions to 25fps.

Quote:

On the other hand, looks like PAL->NTSC conversions are not very commom or at least not with this problems... :? Am I right? Is this because most stuff is shot in NTSC even in Europe, or maube because Europe (and other PAL countries) don't export too much stuff? :? Here in Brasil there's an English series "As If" broadcasted in Satellite every week, maybe I'll try to capture just for fun. :D
In here we talk about bad NTSC2PAL conversions, NOT the other way around like you said above!
As said more above IF you do capture Sources in the same framerate like they have been produced .. you wont have these problems!

Case a) NTSC origin for NTSC final broadcast usage:
Produced Material at 23.976 :arrow: telecined to 29.97 :arrow: sended by NTSC broadcasting station :arrow: captured by Vmesquita at 29.97 :arrow: ivtc will be no problem!

Case b) NTSC origin for PAL final broadcast usage (if the NTSC was deleivered for PAL market at 29.97!!):
Produced Material at 23.976 :arrow: telecined to 29.97 for NTSC broadcasting :arrow: provided to PAL broadcasting stations :arrow: a "rape" conversation to 25.000 DIRECTLY will be performed :puke: = blendings :arrow: sended by PAL broadcasting station :arrow: captured by Inc. at 25.00 :arrow: ivtc will not work and a simple deinterlace would still end up in blendings

Case c) NTSC origin for PAL final broadcast usage (if the FILM was deleivered to the PAL broadcasting Studio at its original Framerate, therefore NOT in a telecined 29.97 state!!):
Speed up 23.976 to 25.000 (still progressive) :arrow: sended by PAL broadcasting station :arrow: captured by Inc. at 25.00 progressive :arrow: :D :D :D :D :D
(And thats the way it should be! and its the cas of 90% of all PAL movie captures as they often get the 24fps for cinema usage generated PAL sources)


All times are GMT -5. The time now is 01:52 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.