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. |
8th March 2024, 15:30 | #1561 | Link | |||||
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Quote:
Effectively, it was checking whether there was an lwi file in the same directory as the file and if it was written with the same version of LWLibav. If it was written with an older version, then it would recreate the lwi index, otherwise it would use the one it found. In this new version, however, it recreates the lwi file every single time, not just with AVSPmod mod but also with ffmpeg and any other application. For instance, in this very same unchanged script, we have two different command lines calling ffmpeg and it's recreating the index files both times: Quote:
Setting cache=true doesn't affect it as it keeps recreating it anyway and it's set to true by default anyway even when it's left unspecified. I tried with cachefile but it is still recreating it: Quote:
Even changing the disk didn't change a thing: Quote:
adding a simple: Quote:
Last edited by FranceBB; 8th March 2024 at 16:26. |
|||||
8th March 2024, 17:25 | #1563 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Who says I didn't? :P https://github.com/HomeOfAviSynthPlu...orks/issues/58
|
10th March 2024, 06:55 | #1564 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
Quote:
FFMS2 is the same, as far as I know. This LWLibavVideoSource(Source, cachefile=IndexFile) should create a smaller index file than this LWLibavAudioSource(Source, cachefile=IndexFile) assuming the source contains audio. So this would be slower v = LWLibavVideoSource(Source, cachefile=IndexFile) a = LWLibavAudioSource(Source, cachefile=IndexFile) AudioDub(v, a) than this a = LWLibavAudioSource(Source, cachefile=IndexFile) v = LWLibavVideoSource(Source, cachefile=IndexFile) AudioDub(v, a) I haven't messed around with a file containing multiple audio streams myself, but what happens if you open the audio streams in reverse order, or you use the index file as the source? Unless that ability was removed at some stage, although it's working fine for r1164, which I think I'm using, at least for a file with a single audio stream. LWLibavAudioSource(Source, cachefile=IndexFile) a = LWLibavAudioSource(IndexFile) v = LWLibavVideoSource(IndexFile) AudioDub(v, a) That's why I sometimes I use L-Smash in preference to FFMS2. You can batch index a bunch of files and open the index files directly later, without them having to be in the same folder as the source, much like indexing with DGIndex and then using the d2v file as the input for MPEG2Source. It was handy when I used to use MeGUI regularly, as it can run a batch of indexing jobs, and it understands lwi files can be used as the source. Last edited by hello_hello; 10th March 2024 at 08:55. |
|
11th March 2024, 08:43 | #1565 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Bug acknowledged and fixed by asd-g.
Check this commit: https://github.com/HomeOfAviSynthPlu...790ff926986e22 Test build: https://github.com/HomeOfAviSynthPlu...ource_1177.zip As always asd-g is amazing, he's always very committed in getting things to work and replies immediately. Kudos to him for keeping LWLibav alive and kickin. |
26th March 2024, 12:56 | #1566 | Link |
Registered User
Join Date: Mar 2007
Posts: 192
|
Linux newb here, trying to build this on Ubuntu 22.04 using the following commands:
Code:
git clone https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works cd L-SMASH-Works/AviSynth/ mkdir build meson . build/ ninja -C build Code:
ninja: Entering directory `build/' [1/21] Compiling C++ object liblsmashsource.so.p/libavsmash_source.cpp.o FAILED: liblsmashsource.so.p/libavsmash_source.cpp.o c++ -Iliblsmashsource.so.p -I. -I.. -I/usr/local/include/avisynth -I/home/leo/ffmpeg_build/include -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O3 -Wno-sign-compare -DXXH_INLINE_ALL -D_FILE_OFFSET_BITS=64 -mfpmath=sse -msse2 -fPIC -MD -MQ liblsmashsource.so.p/libavsmash_source.cpp.o -MF liblsmashsource.so.p/libavsmash_source.cpp.o.d -o liblsmashsource.so.p/libavsmash_source.cpp.o -c ../libavsmash_source.cpp ../libavsmash_source.cpp:29:10: fatal error: lsmash.h: No such file or directory |
26th March 2024, 14:26 | #1567 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
You have to build and install L-SMASH first. Which itself requires obuparse.
https://github.com/dwbuiten/obuparse ↓ https://github.com/vimeo/l-smash ↓ https://github.com/HomeOfAviSynthPlu.../L-SMASH-Works |
26th March 2024, 16:05 | #1568 | Link |
Registered User
Join Date: Mar 2007
Posts: 192
|
@qyot27 thanks, I've built and installed obuparse and l-smash as you instructed and now getting the following error:
Code:
[21/21] Linking target liblsmashsource.so FAILED: liblsmashsource.so c++ -o liblsmashsource.so liblsmashsource.so.p/audio_output.cpp.o liblsmashsource.so.p/libavsmash_source.cpp.o liblsmashsource.so.p/lsmashsource.cpp.o liblsmashsource.so.p/lwlibav_source.cpp.o liblsmashsource.so.p/video_output.cpp.o liblsmashsource.so.p/.._common_audio_output.c.o liblsmashsource.so.p/.._common_decode.c.o liblsmashsource.so.p/.._common_libavsmash.c.o liblsmashsource.so.p/.._common_libavsmash_audio.c.o liblsmashsource.so.p/.._common_libavsmash_video.c.o liblsmashsource.so.p/.._common_lwindex.c.o liblsmashsource.so.p/.._common_lwlibav_audio.c.o liblsmashsource.so.p/.._common_lwlibav_dec.c.o liblsmashsource.so.p/.._common_lwlibav_video.c.o liblsmashsource.so.p/.._common_lwsimd.c.o liblsmashsource.so.p/.._common_osdep.c.o liblsmashsource.so.p/.._common_qsv.c.o liblsmashsource.so.p/.._common_resample.c.o liblsmashsource.so.p/.._common_utils.c.o liblsmashsource.so.p/.._common_video_output.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,-O1 -shared -fPIC -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -Wl,--start-group /usr/local/lib/liblsmash.a -lm /usr/local/lib/libobuparse.so /home/leo/ffmpeg_build/lib/libavcodec.a -pthread /usr/lib/gcc/x86_64-linux-gnu/11/libatomic.so /home/leo/ffmpeg_build/lib/libfdk-aac.a /home/leo/ffmpeg_build/lib/libx264.a -lpthread -ldl /home/leo/ffmpeg_build/lib/libx265.a /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so /usr/lib/gcc/x86_64-linux-gnu/11/libgcc_s.so /usr/lib/gcc/x86_64-linux-gnu/11/libgcc.a -lrt /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libnuma.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libz.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libva.so /home/leo/ffmpeg_build/lib/libswresample.a /home/leo/ffmpeg_build/lib/libavutil.a /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libva-drm.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libva-x11.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libvdpau.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libX11.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libdrm.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libxcb.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libXau.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libXdmcp.so /home/leo/ffmpeg_build/lib/libavformat.a /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libgnutls.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libgmp.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libunistring.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libhogweed.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libnettle.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libtasn1.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libidn2.so /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libp11-kit.so /home/leo/ffmpeg_build/lib/libswscale.a -Wl,--end-group /usr/bin/ld: /usr/local/lib/liblsmash.a(box.o): warning: relocation against `isom_fiel_box_default' in read-only section `.text' /usr/bin/ld: /home/leo/ffmpeg_build/lib/libavcodec.a(vc1dsp_mmx.o): relocation R_X86_64_PC32 against symbol `ff_pw_9' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. |
26th March 2024, 16:09 | #1569 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
I figured that was going to be the next error. Linking static libraries (read: ffmpeg in a custom prefix, since most guides that do that build it as static) into a shared library (liblsmashsource) requires adding -Wl,-Bsymbolic to the LDFLAGS of the shared library when you configure it.
Code:
PKG_CONFIG_PATH=$HOME/ffmpeg_build/lib/pkgconfig LDFLAGS=-Wl,-Bsymbolic meson setup <build options> |
26th March 2024, 16:34 | #1570 | Link |
Registered User
Join Date: Mar 2007
Posts: 192
|
@qyot27 I'm probably missing something as I ran the following and got the same error:
Code:
git clone https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works cd L-SMASH-Works/AviSynth/ mkdir build PKG_CONFIG_PATH=$HOME/ffmpeg_build/lib/pkgconfig LDFLAGS=-Wl,-Bsymbolic meson setup . build ninja -C build/ |
26th March 2024, 17:59 | #1571 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
NVIDIA users:
Code:
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git cd nv-codec-headers sudo checkinstall --pkgname=nv-codec-headers --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --fstrans=no --default Code:
sudo apt-get install libvpl-dev Code:
sudo apt-get install libdav1d-dev
Code:
git clone https://git.videolan.org/git/ffmpeg.git mkdir -p ffmpeg/ffmpeg-build cd ffmpeg/ffmpeg-build ../configure --prefix=$HOME/ffmpeg_build_minimal \ --enable-gpl --enable-version3 --disable-encoders \ --disable-muxers --disable-doc --disable-debug --enable-libdav1d \ --enable-libvpl --cpu=native --extra-cflags="-march=native" && \ make -j$(nproc) && \ make install Code:
git clone https://github.com/dwbuiten/obuparse.git && \ cd obuparse && \ make && \ sudo make install l-smash: Code:
git clone https://github.com/vimeo/l-smash.git cd l-smash ./configure --extra-cflags="-march=native -fPIC" && \ make -j$(nproc) && \ sudo checkinstall --pkgname=lsmash --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --fstrans=no --default Code:
git clone https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works.git && \ mkdir -p L-SMASH-Works/AviSynth/build && \ cd L-SMASH-Works/AviSynth/build && \ PKG_CONFIG_PATH=$HOME/ffmpeg_build_minimal/lib/pkgconfig LDFLAGS="-Wl,-Bsymbolic" meson setup .. && \ ninja && \ sudo checkinstall --pkgname=lsmashsource --pkgversion="1:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default ninja install |
Today, 09:16 | #1573 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
|
I found a WMV which I want to convert, and in my experience, L-SMASH Works does that quite well, in general; but in this case I noticed that the audio gets async at the end of the clip. I can't check easily how much it is in the beginning, as there is only music, the interview starts after about 40 minutes, and here it is clearly out of sync in the Avisynth script. But when I play the WMV in a media player (MPC-HC with LAV Filters or ffplay), it is nicely in sync.
I wonder if the file is a result of concatenated smaller clips with originally audio streams exceeding the video streams, which are still contained in the resulting file, so an Avisynth source filter decodes them linearly, but they get skipped (or missing frames frozen) when a media player syncs to timestamps ... if that is even possible with this container. I'll try to circumvent that for my conversion (e.g. remux to WMV with ffmpeg; remux to MKV with ffmpeg or mkvtoolnix; use DSS), yet I stay curious what might cause this difference. Or are there possibly parameters for LwLibav(Video/Audio)Source I should test? Last edited by LigH; Today at 09:27. |
Today, 10:41 | #1576 | Link |
Registered User
Join Date: May 2009
Location: Belgium
Posts: 1,743
|
I haven't done it for years but you can try directshowsource with convertfps=false. You should see directly if the number of frames is still the same (which does not mean that the sync will be perfect but maybe better).
|
Thread Tools | Search this Thread |
Display Modes | |
|
|