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 > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd March 2019, 04:58   #1  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Does DGIndexNV not support h264 lossless format?!

I encoded a video, losslessly (for a multi-part encode), with:

x264 --qp 0 -o <output> <input>

As per the x264 documentation. It would seem DGIndexNV can't do anything useful with it, though:

Code:
DGAVCIndexFileNV20 DGIndexNV 2053.0.0.162 X32
C:\Program Files (x86)\dgdecnv\

f:\video\toys_top_l.mkv 20163556746

DEVICE 0
DECODE_MODES 0,0,0,0,0
STREAM 2 0
CLIP 0 20 0 8
RANGE 0 0 18446744073709551615 0
DEMUX
DEPTH 8
ASPECT 0 0
COLORIMETRY 2 2 2

SIZ 944 x 528
FPS 25 / 1
CODED 0
PLAYBACK 0
0.00% FILM
ORDER -1
Feeding this to VSEditor makes it crash immediately (probably because there's nothing to process, I reckon).

This is bad. I really needed the intermediate lossless format (as multiple parts will be assembled later).
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 22nd March 2019, 05:12   #2  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
You have the options of FFMS2 or L-Smash (LWLibavSource) though.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 22nd March 2019 at 05:18.
WorBry is offline   Reply With Quote
Old 22nd March 2019, 05:31   #3  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by WorBry View Post
You have the options of FFMS2 or L-Smash (LWLibavSource) though.
Yes, fortunately, it would appear LWLibavSource can do it.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 22nd March 2019, 13:11   #4  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 311
For lossless intermediates I recommend you to encode into mp4 container and use LSMASHSource() for decoding. First of all, It will not create index, so you don't need to wait for ages for opening lossless intermediates.
__________________
Me on GitHub
PC Specs: Ryzen 3900X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 22nd March 2019, 13:17   #5  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by DJATOM View Post
For lossless intermediates I recommend you to encode into mp4 container and use LSMASHSource() for decoding. First of all, It will not create index, so you don't need to wait for ages for opening lossless intermediates.
I tried:

Code:
toys_top_l = core.lsmas.LWLibavSource ("f:/video/toys_top_l.mkv")
And the index was created lightning fast, actually (a few secs, for a 20G file). My ffmsindex.exe appears to be from 2015, though, so I should probably upgrade it too (I already upgraded to the recently posted L-SMASH-Works-r935-3edd194-win64).
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 22nd March 2019, 13:22   #6  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 311
Ah, 20G is not that much. Usually I've got 35-50 GB files (depending on bitness and compression), and indexing of those is not that fast thing. Anyway now you know how to avoid indexing in the workflow.
__________________
Me on GitHub
PC Specs: Ryzen 3900X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 22nd March 2019, 14:06   #7  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by DJATOM View Post
Ah, 20G is not that much. Usually I've got 35-50 GB files (depending on bitness and compression), and indexing of those is not that fast thing. Anyway now you know how to avoid indexing in the workflow.
Thanks.

I don't even know how to directly encode to mp4, btw (unless done with ffmpeg). I always use x264, and it supports .mkv container only (albeit that I normally just have it output to raw .264).

Usually, when stuff needs to be temporally denoised and such, I'd like a frame-accurate input filter, so I kinda like an index. But even more usual than that, I use DGIndexNV (which, after a fashion, also creates an index, of course).
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 22nd March 2019, 22:40   #8  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
x264cli can be compiled with support for mp4 output but not all builds have it.

Code:
x264 --help
x264 core:157 r2969 d4099dd
Syntax: x264 [options] -o outfile infile

Infile can be raw (in which case resolution is required),
  or YUV4MPEG (*.y4m),
  or Avisynth if compiled with support (yes).
  or libav* formats if compiled with lavf support (yes) or
Outfile type is selected by filename:
 .264 -> Raw bytestream
 .mkv -> Matroska
 .flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC or L-SMASH support (no)
Output bit depth: 8/10
...
sneaker_ger is offline   Reply With Quote
Old 23rd March 2019, 09:49   #9  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Seems mine actually does have it:

Code:
Infile can be raw (in which case resolution is required),
  or YUV4MPEG (*.y4m),
  or Avisynth if compiled with support (yes).
  or libav* formats if compiled with lavf support (yes) or ffms support (yes).
Outfile type is selected by filename:
 .264 -> Raw bytestream
 .mkv -> Matroska
 .flv -> Flash Video
 .mp4 -> MP4 if compiled with GPAC or L-SMASH support (lsmash)
Output bit depth: 8/10
So, I don't get it. This is L-SMASH without needing an index?!
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 23rd March 2019, 14:15   #10  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,117
Quote:
So, I don't get it. This is L-SMASH without needing an index?!
So far as I remember, LSMASHVideoSource(vFN) does not require index for ISO container.
Code:
    Function IsISOFileName(String s) {
        s=RT_GetFileExtension(s) Return(s==".mov"||s==".mp4"||s==".m4v"||s==".3gp"||s==".3g2"||s==".mj2"||s==".dvb"||s==".dcf"||s==".m21")}
Whereas LWLibavVideoSource(vFN) does.

EDIT: You would also likely use LSMASHAudioSource(vFN) for ISO type, rather than LWLibavAudioSource(vFN).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 23rd March 2019 at 14:19.
StainlessS is offline   Reply With Quote
Old 23rd March 2019, 16:06   #11  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Thanks.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 23rd March 2019, 17:36   #12  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,622
lsmash when compiled with x264 is a muxer for MP4 container , that enabled direct MP4 export (instead of MKV or ES)

lsmash is also a standalone muxer.exe (and has boxdumper.exe, remuxer.exe, timelineeditor.exe)

lsmash is also a set of plugins for avisynth, vapoursynth, aviutl

The vapoursynth version for MP4/MOV/ iso base media formats (that do not require indexing) is called with lsmas.LibavSMASHSource . (Avisynth syntax is different; it's called with LSmashVideoSource) . The file doesn't have to been muxed with lsmash . GPAC/MP4box or anything else could have been used

The vapoursynth version for non MP4/MOV formats is called with lsmas.LWLibavSource , and requires indexing
poisondeathray is offline   Reply With Quote
Old 24th March 2019, 06:32   #13  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by poisondeathray View Post
lsmash when compiled with x264 is a muxer for MP4 container , that enabled direct MP4 export (instead of MKV or ES)

lsmash is also a standalone muxer.exe (and has boxdumper.exe, remuxer.exe, timelineeditor.exe)

lsmash is also a set of plugins for avisynth, vapoursynth, aviutl

The vapoursynth version for MP4/MOV/ iso base media formats (that do not require indexing) is called with lsmas.LibavSMASHSource . (Avisynth syntax is different; it's called with LSmashVideoSource) . The file doesn't have to been muxed with lsmash . GPAC/MP4box or anything else could have been used

The vapoursynth version for non MP4/MOV formats is called with lsmas.LWLibavSource , and requires indexing

It's perfectly clear now.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 17th April 2019, 12:24   #14  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by poisondeathray View Post
The vapoursynth version for MP4/MOV/ iso base media formats (that do not require indexing) is called with lsmas.LibavSMASHSource

I did notice, btw, that I can't 'preview' a file when I let x264 encode to .mp4, though: seems I can only play it when the entire process is done (contrary to, say, raw .264 output). I suppose that's normal?
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 17th April 2019, 12:45   #15  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,468
Quote:
Originally Posted by asarian View Post
I did notice, btw, that I can't 'preview' a file when I let x264 encode to .mp4, though: seems I can only play it when the entire process is done (contrary to, say, raw .264 output). I suppose that's normal?
Yes, because the mp4 index is written after the encode is finished.
The mkv can be played while the file is still encoding BUT the "final" mkv has no index (or not a proper one). I noticed that with several 40-60gb lossless h264 files. Seeking takes very long if you don't remux the mkv that was produced by x264.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 17th April 2019, 12:47   #16  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by ChaosKing View Post
Yes, because the mp4 index is written after the encode is finished.
The mkv can be played while the file is still encoding BUT the "final" mkv has no index (or not a proper one). I noticed that with several 40-60gb lossless h264 files. Seeking takes very long if you don't remux the mkv that was produced by x264.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 19th April 2019, 20:01   #17  |  Link
AzraelNewtype
Registered User
 
AzraelNewtype's Avatar
 
Join Date: Oct 2007
Posts: 136
Quote:
Originally Posted by DJATOM View Post
For lossless intermediates I recommend you to encode into mp4 container and use LSMASHSource() for decoding. First of all, It will not create index, so you don't need to wait for ages for opening lossless intermediates.
Every time I've actually tested, no matter how long the indexing takes, it takes less total time to generate an index and run the script than to use LSMASHSource to run the script. If you have to touch the same lossless file more than once, it only compounds.
AzraelNewtype is offline   Reply With Quote
Reply

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 09:47.


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