tobitti0 / joinlogoscptrialsetlinux Goto Github PK
View Code? Open in Web Editor NEWJoinLogoScpTrialSet for Linux and Avisynth+3.5.x
JoinLogoScpTrialSet for Linux and Avisynth+3.5.x
現時点で問題なく動作しているEPGStationとの連携方法を公開する。
必要な情報
Dockerfile
エンコード用jsファイル
セットアップ方法の最後docker-compose up --build
の実行にエラーが出て失敗しました。
#11 を参考にFFMS2の部分はコメントアウトしました
ログ
/usr/bin/ld: /usr/local/lib/libvpx.a(vp9_ext_ratectrl.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' 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.
ERROR: Service 'join_logo_scp_trial' failed to build : The command '/bin/sh -c set -xe && cd /tmp && git clone https://github.com/HolyWu/L-SMASH-Works.git && cd /tmp/L-SMASH-Works/AviSynth && git checkout 72d3eac802eebcfc9080009c1a8d47a747e3a306 && CC=gcc-9 CXX=gcc-9 LD=gcc-9 LDFLAGS="-Wl,-Bsymbolic" meson build && cd build && ninja -v && ninja install && ldconfig && rm -r /tmp/*' returned a non-zero code: 1
どうすれば良いでしょうか?
chapter_exe terminate called after throwing an instance of 'AvisynthError'
略
/home/XXXX/src/JoinLogoScpTrialSetLinux/modules/join_logo_scp_trial/src/output/chapter_jls.js:51
for(let r of data.match(RegExp(strRegTrim,'g'))){
TypeError: data.match is not a function or its return value is not iterable
at Interface.<anonymous> (/home/XXXX/src/JoinLogoScpTrialSetLinux/modules/join_logo_scp_trial/src/output/chapter_jls.js:51:25)
at Interface.emit (node:events:517:28)
at [_onLine] [as _onLine] (node:internal/readline/interface:423:12)
at [_normalWrite] [as _normalWrite] (node:internal/readline/interface:617:22)
at ReadStream.ondata (node:internal/readline/interface:250:23)
at ReadStream.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at node:internal/fs/streams:277:14
Node.js v18.19.1
環境
orange pi5 plus
ubuntu-rockchip (Ubuntu 24.04 LTS)
ffmpeg-rockchip(6.0)
他メモ https://note.com/perl2note/n/n180020ce5967
使用コマンド
jlse -i "ファイル名" -e -t cutcm_logo -o " -c:v h264_rkmpp -vf pullup=jb=54 -preset veryfast -acodec aac -b:v 4M -aspect 16:9 -r 24000/1001 -ab 256K"
jlse --help
は通るところまで行けたのですがTSファイルを指定してエンコードを走らせたところ
lwiファイルの作成までは行くのですがそのあと上記エラーが発生しました。
自分でも調べて解決に至らず、可能でしたらお知恵を拝借させていただけないでしょうか。
セットアップ方法通りにdocker-composeでビルド・インストールしましたが、docker-compose up --build
の最後に下記のログが出ました:
Creating join_logo_scp_trial ... done
Attaching to join_logo_scp_trial
join_logo_scp_trial |
join_logo_scp_trial | > [email protected] start /join_logo_scp_trial
join_logo_scp_trial | > node src/jlse.js "-i" "--help"
join_logo_scp_trial |
join_logo_scp_trial | internal/modules/cjs/loader.js:638
join_logo_scp_trial | throw err;
join_logo_scp_trial | ^
join_logo_scp_trial |
join_logo_scp_trial | Error: Cannot find module '/join_logo_scp_trial/src/jlse.js'
join_logo_scp_trial | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
join_logo_scp_trial | at Function.Module._load (internal/modules/cjs/loader.js:562:25)
join_logo_scp_trial | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
join_logo_scp_trial | at startup (internal/bootstrap/node.js:283:19)
join_logo_scp_trial | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
join_logo_scp_trial | npm ERR! code ELIFECYCLE
join_logo_scp_trial | npm ERR! errno 1
join_logo_scp_trial | npm ERR! [email protected] start: `node src/jlse.js "-i" "--help"`
join_logo_scp_trial | npm ERR! Exit status 1
join_logo_scp_trial | npm ERR!
join_logo_scp_trial | npm ERR! Failed at the [email protected] start script.
join_logo_scp_trial | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
join_logo_scp_trial |
join_logo_scp_trial | npm ERR! A complete log of this run can be found in:
join_logo_scp_trial | npm ERR! /root/.npm/_logs/2020-10-06T02_26_01_765Z-debug.log
join_logo_scp_trial exited with code 1
ホストにファイルはあるようです:
~/JoinLogoScpTrialSetLinux/modules/join_logo_scp_trial/src$ ls
channel.js command jlse.js output param.js settings.js
どうすればいいでしょうか?
(度々申し訳ありません。LinuxでCMカットができるようになってとっても嬉しくて色々な機能を試したいと思っています。)
setting/JLparam_set1.csv
に入ってるuse_tssplit
の機能を使ってみたら(バリューを0
から‘1`に変更:JLparam_set1.csv.txt, obs_param.txt)、すぐに落ちました:
:~/JoinLogoScpTrialSetLinux$ docker-compose run --rm -v ~:/ts join_logo_scp_trial /ts/NTV_video.ts
> [email protected] start /join_logo_scp_trial
> node src/jlse.js "-i" "/ts/NTV_video.ts"
TS spliting ...
TS split done
chapter.auf pre loading program.
usage:
chapter_exe.exe -v input_avs -o output_txt
params:
-v 入力画像ファイル
-a 入力音声ファイル(省略時は動画と同じファイル)
-m 無音判定閾値(1〜2^15)
-s 最低無音フレーム数
-b 無音シーン検索間隔数
-e 無音前後検索拡張フレーム数
Setting
video: /join_logo_scp_trial/result/NTV_video/in_org.avs
audio: (within video source)
out: /join_logo_scp_trial/result/NTV_video/obs_chapterexe.txt
mute: 50 seri: 8 bmute: 60 emute: 4
Loading plugins.
Avisynth ERROR: [Fatal]: Failed to avformat_open_input.
(/join_logo_scp_trial/result/NTV_video/in_org.avs, line 2)
放送局:NTV
Avisynth error: [Fatal]: Failed to avformat_open_input.
(/join_logo_scp_trial/result/NTV_video/in_org.avs, line 2)
error: '/join_logo_scp_trial/result/NTV_video/in_org.avs' didn't return a video clip
double free or corruption (fasttop)
auto detect CutMrgIn=9.5 CutMrgOut=11
current set CutMrgIn=9.5 CutMrgOut=11
create_done: /join_logo_scp_trial/result/NTV_video/in_cutcm.avs
create_done: /join_logo_scp_trial/result/NTV_video/in_cutcm_logo.avs
/join_logo_scp_trial/result/NTV_video/in_org.avs
の中身:
TSFilePath="/join_logo_scp_trial/result/NTV_video/NTV_video_split.ts"
LWLibavVideoSource(TSFilePath, repeat=true, dominance=1)
AudioDub(last,LWLibavAudioSource(TSFilePath, stream_index=-1, av_sync=true))
/join_logo_scp_trial/result/NTV_video/NTV_video_split.ts
は見つからななかったと思います。
ts_splitter
は正常に動作しなかった気がします。ファイルパーミッションの問題なんでしょうか?
10月6日にpullしたファイルをREADME通りにセットアップしました。試しに使ってみたら解析中に[error: wrong command in」というエラーが数回発生しました。logを添付しました。
join_logo_scp_trial-log.txt
resultフォルダーを見たら、下記のファイルは入っていました:
in_cutcm.avs in_org.avs obs_cut.avs obs_logo_erase.avs obs_logoframe_list.ini obs_param.txt
in_cutcm_logo.avs obs_chapterexe.txt obs_jlscp.txt obs_logoframe_1.txt obs_logoframe.txt
参考のために、WindowsVMを活躍してjoin_logo_scp_set_v4とjoin_logo_scp_306で同じビデオのCM解析をしたら下記ファイルが出力されました:
in_cutcm.avs obs_chapter_cut.chapter.txt obs_chapter_tvtplay.chapter obs_logo_erase.avs obs_logoframe.txt
in_cutcm_logo.avs obs_chapterexe.txt obs_cut.avs obs_logoframe_1.txt obs_param.bat
in_org.avs obs_chapter_org.chapter.txt obs_jlscp.txt obs_logoframe_list.ini
JoinLogoScpTrialSetLinuxのresultと比べるとobs_chapter_cut.chapter.txt
、obs_chapter_org.chapter.txt
、obs_chapter_tvtplay.chapter
とのファイルが足りないことが分かりました。
続いて、obs_jlscp.txtも比べて結果はそれぞれ異なっていました。両方を添付しました:
obs_jlscp-linux.txt
obs_jlscp-windows.txt
この情報は手がかりになるといいですが、他の情報が必要であれば教えてください。
#5 で要望のあった再生ソフト向けChapterリスト作成を担っている func_chapter_jls.vbs
を移植する。
正規表現でファイルを読み、1行ごとに処理を実施している模様。
これが移植完了した場合、基本的なTrialと同等の処理が移植できたことになると思われる。
あくまでご相談なのですが、JLファイル設定でTrailer/Sponsor/Endcardを自動カットにさせる方法が知りたいです。
JLScpは予告などの識別と位置を高精度で認識ができるのにどうすればその認識された部分を自動カットさせられるのが分かりません。
0 186 6 7 0 :Nologo
187 636 15 0 0 :CM
637 34861 1142 0 1142 :L
34863 35760 30 -1 0 :CM
35761 36660 30 1 0 :CM
36661 37109 15 -1 0 :CM
37110 37559 15 0 0 :CM
37560 38458 30 0 0 :CM
38459 51405 432 0 432 :L
51406 52304 30 0 0 :CM
52305 52753 15 -1 0 :CM
52754 53203 15 0 0 :CM
53204 54102 30 0 0 :CM
54103 55001 30 1 0 :CM
55003 69177 473 -1 473 :L
69178 69627 15 0 0 :CM
69628 70076 15 -1 0 :CM
70077 70526 15 0 0 :CM
70527 70975 15 -1 0 :CM
70976 71874 30 0 0 :CM
71875 72324 15 0 0 :CM
72325 72773 15 0 0 :CM
72775 94292 718 0 718 :L
94293 94742 15 0 15 :Trailer(add)
94743 94892 5 0 5 :Trailer
94893 95041 5 0 5 :Trailer
95043 95401 12 -1 0 :Sponsor(cut)
95402 95491 3 0 0 :Endcard(add)
95492 95940 15 -1 0 :CM
95941 96390 15 0 0 :CM
96391 96839 15 -1 0 :CM
96840 97289 15 0 0 :CM
97290 97738 15 -1 0 :CM
97739 98188 15 0 0 :CM
98189 98307 4 -1 0 :Nologo(cut)
98308 98316 0 8 0 :Nologo
Trim(637,34861) ++ Trim(38459,51405) ++ Trim(55003,69177) ++ Trim(72775,95041) ++ Trim(95402,95491)
JL_標準.txt内の設定をいじってみましたどうしてもカットにはできません。それぞれの設定を変えた結果が予想外で、期待していたものとは違っていました。とっても謎です。
試した設定変更と結果:
param_cuttr=1
94293 94742 15 0 15 :Trailer(add)
94743 94892 5 0 5 :Trailer
94893 95041 5 0 5 :Trailer
95043 95401 12 -1 0 :Sponsor(add)
95402 95491 3 0 0 :Endcard(add)
param_cutsp=1
94293 94742 15 0 15 :Trailer(add)
94743 94892 5 0 5 :Trailer
94893 95041 5 0 5 :Trailer
95043 95401 12 -1 0 :Sponsor(cut)
95402 95491 3 0 0 :Endcard(add)
cuttr_limit=0
94293 94742 15 0 15 :Trailer
94743 94892 5 0 5 :Trailer
94893 95041 5 0 5 :Trailer
95043 95401 12 -1 0 :Sponsor(add)
95402 95491 3 0 0 :Endcard(add)
cuttr_limit=5
94293 94742 15 0 15 :Trailer(add)
94743 94892 5 0 5 :Trailer(add)
94893 95041 5 0 5 :Trailer(add)
95043 95401 12 -1 0 :Trailer(add)
95402 95491 3 0 0 :Endcard(add)
cuttr_limit
はこう定義されています:
予告と認識させる構成数(0:予告なし 1~:構成数)
がDefault addtr_limit $cuttr_limit # 予告が見つからないと判断する必要予告構成数(0:制限なし 1~:構成数)
use_addtr=0
94293 94742 15 0 15 :Trailer(add)
94743 94892 5 0 5 :Trailer
94893 95041 5 0 5 :Trailer
95043 95401 12 -1 0 :Sponsor(add)
95402 95491 3 0 0 :Endcard(add)
param_cuttr=1 cuttr_limit=5
94293 94742 15 0 15 :Trailer(add)
94743 94892 5 0 5 :Trailer(add)
94893 95041 5 0 5 :Trailer(add)
95043 95401 12 -1 0 :Trailer(add)
95402 95491 3 0 0 :Endcard(add)
param_cuttr=1 param_cutsp=1 cuttr_limit=5
94293 94742 15 0 15 :Trailer(add)
94743 94892 5 0 5 :Trailer(add)
94893 95041 5 0 5 :Trailer(add)
95043 95401 12 -1 0 :Trailer(add)
95402 95491 3 0 0 :Endcard(add)
設定をどう変えればいいでしょうか?
Trailer/Sponsor/Endcardを自動カットすることができれば、私は非常に満足します!
README.mdのセットアップ方法に従い以下を実行
git clone --recursive https://github.com/tobitti0/JoinLogoScpTrialSetLinux.git
cd JoinLogoScpTrialSetLinux
cp -r modules/join_logo_scp_trial/JL .
cp -r modules/join_logo_scp_trial/setting .
cp -r modules/join_logo_scp_trial/src .
docker-compose up --build
現時点でビルドにコケる箇所が2か所確認できた
apt-get -y build-dep ffmpeg
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libi/libiec61883/libiec61883-0_1.2.0-3_amd64.deb Undetermined Error [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
E: Failed to process build dependencies
ERROR: Service 'join_logo_scp_trial' failed to build: The command '/bin/sh -c set -xe && sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list && apt-get update && apt-get -y build-dep ffmpeg && cd /tmp && git clone --depth 1 git://git.ffmpeg.org/ffmpeg.git && cd /tmp/ffmpeg && ./configure --enable-gpl --enable-version3 --disable-doc --disable-debug --enable-pic --enable-avisynth --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-nonfree && make CC=gcc-9 CXX=gcc-9 LD=gcc-9 -j$(nproc) && checkinstall --pkgname=ffmpeg --pkgversion="7:$(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 && apt-get clean all && rm -r /tmp/*' returned a non-zero code: 100
サーバ側の問題の可能性と考え
RUN sed -i '[email protected]@ftp.jaist.ac.jp/pub/Linux@g' /etc/apt/sources.list
を追加し日本のミラーサーバに切り替えると解決
ミラーサーバに切り替えず、apt-getをaptに切り替えても解決することを確認
./autogen.sh --enable-shared --enable-avisynth
の箇所でコケる
checking whether -Wl,-Bsymbolic is needed... no
configure: error: in `/tmp/ffms2':
configure: error: cannot build ffms2 as a shared library
See `config.log' for more details
ERROR: Service 'join_logo_scp_trial' failed to build: The command '/bin/sh -c set -xe && cd /tmp && git clone --depth 1 git://github.com/ffms/ffms2.git && cd ffms2 && PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig CPPFLAGS="-I/usr/local/include/avisynth" ./autogen.sh --enable-shared --enable-avisynth && make -j$(nproc) && checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-git" --backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default && ldconfig && rm -r /tmp/*' returned a non-zero code: 1
エラー内容的にはこれと同じと思われる
FFMS/ffms2#281
--
1点目につきましては自己解決できましたが、2点目が解決できません
どうすればよいでしょうか?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.