Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th December 2010, 11:54   #21  |  Link
eddman
Registered User
 
Join Date: Dec 2009
Posts: 77
Quote:
Originally Posted by Blue_MiSfit View Post
Also, @eddman:

Absolutely. That's the only proper way to do 3D for live action.

Derek
Thanks. Sorry for deleting my post just before your reply. I thought it's off-topic.
eddman is offline   Reply With Quote
Old 16th December 2010, 12:32   #22  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Quote:
Originally Posted by Dark Shikari View Post
If you're cutting down resolution, that's different. I meant if you weren't cutting resolution.
Ah, that makes more sense.
kieranrk is offline   Reply With Quote
Old 16th December 2010, 16:19   #23  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by shon3i View Post
@Dark Shikari, tell me how is possible to use two inputs? Left eye and Right eye, and pack that into one stream?
Quote:
Originally Posted by Dark Shikari View Post
Using any of the 6 methods listed in --frame-packing. All could be done with dead-trivial Avisynth scripts.
Greetings. I'm trying to convert two 1920x1080/60p .mts streams into single 3840x1080/60p side-by-side video without success using avs scripts suggested by Limobar and crl2007. Would appreciate if you could point out what I did wrong.

Quote:
Originally Posted by crl2007 View Post
For 3840x1080 you must use Limobar's avs script. Just that instead of mkv you use m2ts. Directshowsource is capable of opening m2ts streams. Only that you will have a mkv file as a final result.
Quote:
Originally Posted by mariner View Post
Not working. The output was about 100KB. This is what I did:

1. Created a 3D700.avs file with following:

Code:
VideoLeft = directshowsource("D:\3D\left.mts", audio=false)
VideoRight = directshowsource("D:\3D\right.mts", audio=false)
VideoStacked = StackHorizontal(VideoRight,VideoLeft)
ConvertToYV12(VideoStacked)
2. Ran batch file

Code:
D:\3D>x264 -o 700.mkv 3d700.avs

avs [info]: 3840x1080p 0:0 @ 10000000/166833 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cach
e64
x264 [info]: profile High, level 5.1
x264 [info]: frame I:4     Avg QP:28.00  size:   799
x264 [info]: frame P:211   Avg QP:31.00  size:   131
x264 [info]: frame B:622   Avg QP:31.00  size:   125
x264 [info]: consecutive B-frames:  0.4%  0.2%  0.0% 99.4%
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0
.0%    skip:100.0%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct:
 0.0%  skip:100.0%  L0:-1.$% L1:-1.$% BI:-1.$%
x264 [info]: 8x8 transform intra:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 99%  0%  1%  0%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: kb/s:62.07

encoded 837 frames, 34.24 fps, 62.46 kb/s

D:\3D>pause
Press any key to continue . . .

This is input file properties:

Code:
General
ID                               : 1 (0x1)
Complete name                    : D:\3D\left.mts
Format                           : BDAV
Format/Info                      : Advanced Video Codec
File size                        : 41.6 MiB
Duration                         : 13s 938ms
Overall bit rate                 : 25.0 Mbps
Maximum Overall bit rate         : 28.0 Mbps

Video
ID                               : 4113 (0x1011)
Menu ID                          : 1 (0x1)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.2
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Format settings, GOP             : M=3, N=30
Codec ID                         : 27
Duration                         : 13s 963ms
Bit rate mode                    : Variable
Bit rate                         : 23.6 Mbps
Maximum bit rate                 : 26.0 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate                       : 59.940 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.190
Stream size                      : 39.3 MiB (95%)

Audio
ID                               : 4352 (0x1100)
Menu ID                          : 1 (0x1)
Format                           : AC-3
Format/Info                      : Audio Coding 3
Mode extension                   : CM (complete main)
Codec ID                         : 129
Duration                         : 14s 16ms
Bit rate mode                    : Constant
Bit rate                         : 384 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Compression mode                 : Lossy
Video delay                      : -34ms
Stream size                      : 657 KiB (2%)

Text
ID                               : 4608 (0x1200)
Menu ID                          : 1 (0x1)
Format                           : PGS
Codec ID                         : 144
Duration                         : 13s 449ms
Video delay                      : -34ms
mariner is offline   Reply With Quote
Old 16th December 2010, 16:33   #24  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
1. Correct your script:
VideoStacked = StackHorizontal(VideoLeft, VideoRight)
ConvertToYV12(VideoStacked)
AssumeFPS(60000, 1001)

2. Define frame packing
x264 --frame-packing 3 -o 700.mkv 3d700.avs

Whether your player supports this kind of file is a hole different story, though.
sneaker_ger is offline   Reply With Quote
Old 16th December 2010, 16:53   #25  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by sneaker_ger View Post
1. Correct your script:
VideoStacked = StackHorizontal(VideoLeft, VideoRight)
ConvertToYV12(VideoStacked)
AssumeFPS(60000, 1001)

2. Define frame packing
x264 --frame-packing 3 -o 700.mkv 3d700.avs

Whether your player supports this kind of file is a hole different story, though.
Thanks for your kind reply, sneak_gear.

Same problem, output is 113KB and took just a few seconds.

Code:
VideoLeft = directshowsource("D:\3D\left.mts", audio=false)
VideoRight = directshowsource("D:\3D\right.mts", audio=false)
VideoStacked = StackHorizontal(VideoLeft, VideoRight)
ConvertToYV12(VideoStacked)
AssumeFPS(60000, 1001)
Code:


D:\3D>x264 --frame-packing 3 -o 700.mkv 3d700.avs
avs [info]: 3840x1080p 0:0 @ 60000/1001 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cach
e64
x264 [info]: profile High, level 5.1
x264 [info]: frame I:4     Avg QP:28.00  size:   814
x264 [info]: frame P:211   Avg QP:31.00  size:   131
x264 [info]: frame B:622   Avg QP:31.00  size:   125
x264 [info]: consecutive B-frames:  0.4%  0.2%  0.0% 99.4%
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0
.0%    skip:100.0%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct:
 0.0%  skip:100.0%  L0:-1.$% L1:-1.$% BI:-1.$%
x264 [info]: 8x8 transform intra:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 99%  0%  1%  0%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: kb/s:62.11

encoded 837 frames, 34.12 fps, 62.50 kb/s
mariner is offline   Reply With Quote
Old 16th December 2010, 17:03   #26  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Then the problem is probably in the source filters. You could try to install ffmpegsource or one of neuron's tools - test the AviSynth script in a player first to see if it's OK. If you can't succeed search/open a thread in the AviSynth usage section of this forum.
sneaker_ger is offline   Reply With Quote
Old 16th December 2010, 17:32   #27  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by sneaker_ger View Post
Then the problem is probably in the source filters. You could try to install ffmpegsource or one of neuron's tools - test the AviSynth script in a player first to see if it's OK. If you can't succeed search/open a thread in the AviSynth usage section of this forum.
Downloaded ffmpegsource-2.14.7z.

What do I do with ffms2.dll? Copy it to the AviSynth/plugins directory or register it?

Apologize for being so thick, but this is first attempt at encoding.

Many thanks.
mariner is offline   Reply With Quote
Old 16th December 2010, 17:38   #28  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by mariner View Post
Downloaded ffmpegsource-2.14.7z.

What do I do with ffms2.dll? Copy it to the AviSynth/plugins directory or register it?

Apologize for being so thick, but this is first attempt at encoding.

Many thanks.
Copy to AviSynth/plugins.

Then change script to:
VideoLeft = FFVideoSource("D:\3D\left.mts")
VideoRight = FFVideoSource("D:\3D\right.mts")
sneaker_ger is offline   Reply With Quote
Old 16th December 2010, 17:55   #29  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by sneaker_ger View Post
Copy to AviSynth/plugins.

Then change script to:
VideoLeft = FFVideoSource("D:\3D\left.mts")
VideoRight = FFVideoSource("D:\3D\right.mts")
Success. Many thanks.

It seems that further compression has been applied. Is there a way to keep this to a minimal to preserve quality?

The new 3840x1080/60p file properties:
Code:
General
Complete name                    : D:\3D\700.mkv
Format                           : Matroska
File size                        : 36.3 MiB
Duration                         : 13s 981ms
Overall bit rate                 : 21.8 Mbps
Writing application              : x264 r1834 a51816a
Writing library                  : Haali Matroska Writer b0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L5.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 13s 981ms
Bit rate                         : 21.4 Mbps
Width                            : 3 840 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 3.556
Frame rate                       : 59.940 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.086
Stream size                      : 35.6 MiB (98%)
Writing library                  : x264 core 112 r1834 a51816a
Encoding settings                : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                         : English
The original 1920x1080/60p file properties:
Code:
General
ID                               : 1 (0x1)
Complete name                    : D:\3D\left.mts
Format                           : BDAV
Format/Info                      : Advanced Video Codec
File size                        : 41.6 MiB
Duration                         : 13s 938ms
Overall bit rate                 : 25.0 Mbps
Maximum Overall bit rate         : 28.0 Mbps

Video
ID                               : 4113 (0x1011)
Menu ID                          : 1 (0x1)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.2
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Format settings, GOP             : M=3, N=30
Codec ID                         : 27
Duration                         : 13s 963ms
Bit rate mode                    : Variable
Bit rate                         : 23.6 Mbps
Maximum bit rate                 : 26.0 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate                       : 59.940 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.190
Stream size                      : 39.3 MiB (95%)

Last edited by mariner; 16th December 2010 at 18:09.
mariner is offline   Reply With Quote
Old 16th December 2010, 18:28   #30  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by mariner View Post
It seems that further compression has been applied. Is there a way to keep this to a minimal to preserve quality?
You used the default CRF 23. Try --crf 20 or maybe 18 if file size doesn't matter.

If the video is live action (not cel animation), also use --tune film
nm is offline   Reply With Quote
Old 16th December 2010, 18:32   #31  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by nm View Post
You used the default CRF 23. Try --crf 20 or maybe 18 if file size doesn't matter.

If the video is live action (not cel animation), also use --tune film
Thanks nm for the kind reply. Will try that.

Best regards.
mariner is offline   Reply With Quote
Old 17th December 2010, 02:05   #32  |  Link
rica
Registered User
 
Join Date: Mar 2008
Posts: 2,021
Dear coders, MVC and VLC encoder open source codes are waiting for you and we are waiting for you.
Thanks in advance.
rica is offline   Reply With Quote
Old 17th December 2010, 07:44   #33  |  Link
invincible
Registered User
 
Join Date: Oct 2009
Posts: 16
What's source filter can index right.h264 (raw h264 stereo)?

Last edited by invincible; 17th December 2010 at 07:50.
invincible is offline   Reply With Quote
Old 17th December 2010, 18:54   #34  |  Link
Zerofool
VR, 3D & HDR UHD fan
 
Join Date: Mar 2006
Location: Sofia, Bulgaria
Posts: 53
Quote:
Originally Posted by Stephen R. Savage View Post
Dark Shikari: Is one stereoscopic packing mode more effective compression-wise than the others? Column interlacing and checkboard look pretty awful to me in this aspect, but I'm not sure how top/bottom compares with left/right.
I did some testing few months ago, and both side-by-side and over/under a.k.a. top/bottom (full-rez per eye), produced files ~99% bigger than just one of the views (in CRF mode). Frame sequential on the other hand, produced noticeably smaller file, saving 20-25% (if my memory serves me well), but I had doubts if all these psycho-visual optimizations stripped some of the details compared to sbs and o/u (thinking the human eye can't see the difference between the very fast switching images). I didn't really make in-depth image quality comparison, so my question is if there is something we should take in consideration when encoding frame-sequential 3D videos (regarding psy optimizations for example, or other x264 options)?

Otherwise, as an experienced Stereo-3D (PC) gamer (and 3D-video-watcher ) I personally think side-by-side is better for viewing than over/under (top/bottom) and dual-file encodes, because in the first case there's often vertical misalignment (yes, it's ridiculous, there shouldn't be, each view occupies exactly the half of the image, and still, one of the views appears to be higher or lower than the other, by let's say one pixel; if that was Stereoscopic Player issue, it would have been resolved in the many years this software has existed), and in the second case - synchronization is needed and also decoding and rendering are heavier tasks with two files.


Quote:
Originally Posted by Dark Shikari View Post
Frame interleaving may be better for compression, especially once x264 gets awareness of the frame interleaving occurring. I will probably be working on this after the end of this semester.
That's great, I can't wait to see some results. I've been wishing for such option for quite some time!
Quote:
Originally Posted by Zerofool View Post
...it's about efficient storage and playback of 3D videos on the PC.
Zerofool is offline   Reply With Quote
Old 17th December 2010, 19:46   #35  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,869
What about 3D BD spec- my tests show quite often 50% saving on 2nd view. R eye is just a difference and requires much less bits than L (main) view. Very common setting can be 24Mbit for L and 12Mbit average for R eye.


Andrew
kolak is offline   Reply With Quote
Old 17th December 2010, 20:10   #36  |  Link
Zerofool
VR, 3D & HDR UHD fan
 
Join Date: Mar 2006
Location: Sofia, Bulgaria
Posts: 53
Hi, Andrew. It really depends on the content. As the stereo separation increases, the savings will get lower. Other factors may be camera misalignment, difference in focus, gamma and so on.
May I ask what MVC encoder are you using for your tests?
Zerofool is offline   Reply With Quote
Old 17th December 2010, 23:30   #37  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,869
Quote:
Originally Posted by Zerofool View Post
Hi, Andrew. It really depends on the content. As the stereo separation increases, the savings will get lower. Other factors may be camera misalignment, difference in focus, gamma and so on.
May I ask what MVC encoder are you using for your tests?
Cinemacraft MVC- few different movies show that R eye needs 70%- 40% of L, depending on the source. This is for movies eg. like Avatar, Step Up.

Andrew
kolak is offline   Reply With Quote
Old 18th December 2010, 12:19   #38  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
I am playing with Mainconcept MVC (not cinevision) and usualy get same results as kolak. Right eye definitly need less bitrate, but depends from many factors.
shon3i is offline   Reply With Quote
Old 18th December 2010, 18:41   #39  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by nm View Post
You used the default CRF 23. Try --crf 20 or maybe 18 if file size doesn't matter.

If the video is live action (not cel animation), also use --tune film
Tried --crf 18 --tune film. Bit rate is bumped up to 55 mbps. Is this the highest it will go?

What is the advantage of profile 5.1 over 4,2 or 4.1?

Many thanks and best regards.
mariner is offline   Reply With Quote
Old 18th December 2010, 19:10   #40  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by mariner View Post
Tried --crf 18 --tune film. Bit rate is bumped up to 55 mbps. Is this the highest it will go?
No. You can go up to lossless (CRF 0) if necessary. But CRF 18 is already visually transparent in most cases, and realtime decoding will get increasingly difficult when you raise the bitrate. Or is that not a concern for you?

Quote:
What is the advantage of profile 5.1 over 4,2 or 4.1?
You mean level, not profile. Higher levels allow higher bitrates and more reference frames at high resolutions. See: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels
nm is offline   Reply With Quote
Reply

Tags
stereo-3d, stereoscopic, useless

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.