2023,江端さんの忘備録

トイレで一人でお弁当を食べることを「便所メシ」というそうです。

Eating lunch alone in the restroom is called "Benjyo meishi(Lunch in the Toilet)".

いじめられている子どもや仲間外れにされている子どもの話と思っていたのですが、ちゃんと調べてみると、それだけでもないようです。

I thought it was about children being bullied and ostracized, but upon proper investigation, it seems that it is not just that.

―― 快適な閉空間での食事をする為の、積極的なトイレでの食事の利用

"Active use of restrooms to eat in comfortable enclosed spaces"

という観点があるようで、ちょっと驚いています。

I am a little surprised that there seems to be a point of view that.

それは、『私がマイノリティではなかった』ということです。

That is, 'I was not a minority'.

とは言っても、私はトイレで御飯を食べたことないので、そういう意味では経験者ではありません。

However, I have never experimented to eat lunch in a restroom, so I could not be joined.

私は『本を読みながら、一人で食う飯は旨い』と信じていて、グループで食べるのを忌避してきた『孤食の江端』ですから、そもそも、トイレで食べる必要もないのです。

I am a "solitary Ebata" who believes that "eating alone while reading a book is delicious," and I have always avoided eating in groups, so there is no need to eat in the bathroom in the first place.

-----

私、「便所メシ」なるものが、『ひとりぼっちでいることを、他の人から認識されるのを避けるための行為』だと思っていたのですが、

I used to think that "Benjyo meshi" was "an act to avoid being recognized by others as being alone".

もちろん、そういう観点もあるのでしょうが ――

Of course, there's a point of view that--

『わずらわしい人間関係から逃れて、ゆっくり食事を食べたい』という人が、結構な数いることが分かって、安堵しています。

It is a relief to know that there are a good number of people who want to "get away from the hassle of relationships and enjoy a leisurely meal.

まあ、お局様とか、自慢話しかしない上司とかとか、ネタを提供せず黙り続ける部下とか ―― うんざりですよね。

Well, the arrogant senior woman, the bosses who only brag, and the subordinates who keep silent without providing any stories -- it's disgusting, isn't it?

とは言え、上司から食事に誘われれば、さすがの私も断われませんが。

However, if my boss invites me out to lunch, as expected, I cannot refuse.

-----

『君にこの本の価値の1/100でもあると思っているのか。ずうずうしいぞ』と面と向かって言える相手は、意外と少ないんですよね。

"Do you think you have even 1/100th of the value of this book? " There are surprisingly few people to whom you can say that to their face.

「え! そんな重大な背信行為を江端さんに働いたのですか?」

2023,江端さんの忘備録

今の時期、体調を崩す人が多いと思いますが、私も崩しています。

I hear many people are sick this time of year, and I am also sick now.

というか、私の場合、不眠、歯痛、アレルギーが、常に巡回しながら発生しますが、今は、アレルギーです。

In my case, insomnia, toothache, and allergies occur in a constant cycle, but now, allergies are coming.

全身がぼんやりした痒さに襲われていて、落ち着きません。

I feel uncomfortable because of the vague itches of my body.

-----

という訳で、近くのクリニックに診察に行ってきました。

So I went to the nearby clinic for my checkup.

医師:「ハウスダストの影響かもしれませんね。眠くならない薬を出しておきましょう」

Dr.: "It could be house dust. Let me give you some medicines that don't make you sleepy.

江端:「いえ、私、不眠症なので、『眠くなる薬』は、どんな薬でもウエルカムです」

Ebata: "Don't worry. I am insomnia, so any medicine that makes me sleepy is welcome".

実際に、私、「副作用で眠くなる」と言われる薬で、眠くなったことが、一度もありません。

In fact, I have never been sleepy to take medicines that make me sleepy with side effects.

安定剤も効かないことがありますし、下手すると睡眠薬にも『勝ちます』。

Sometimes, stabilizers may not work either, I will 'win' over sleeping pills if I am unlucky.

ですので、

Therefore I want to shout

―― 『私を倒す薬は、名乗りを上げよ!』

"Show me the medicine that will defeat me"

と叫びたいです。

「クスリをくれ」

-----

先日、巨大なビニール袋を購入して、そこにベッドマットを突っ込み、布団乾燥機から5時間熱風を流し続けました。

The other day, I purchased a big plastic bag from Amazon.com, put my bed mat into the bag, and ran hot air from the futon dryer for 5 hours straight.

その後、ベットマットを掃除機にかけて、『ダニの大虐殺』はできたと思うのですが、まだアレルギーは収まっていません。

I think I have vacuumed the bed mats after the "dust mite massacre", but the allergies have not yet subsided.

ここ週末、自室の徹底的な掃除を心掛けています。

I have been trying to thoroughly clean my room over the past weekend.

私の掃除の理由は、清掃・清潔ではなく、アレルギー対策です。

The reason I make my room clean is not for cleaning and sanitation but for against allergies.

2023,江端さんの忘備録

Windows95が出てきて、インターネットが常時接続になったころ(まあ、「常時接続って何?」という人は、無視して下さい)、私は、実家で、パソコンを設定して、ネット接続ができるようにしました。

When Windows 95 came out and the Internet became always-on (well, if you're asking, "What's an always-on connection?" please ignore me), I set up a PC and connect to the Internet.

ところが、両親は一向にパソコンを使おうとしませんでした。

However, my parents didn't use the PC.

そこで、私は、父の為に、将棋や碁の通信対戦環境を整えました。

So I also installed the net game of "Go" and "Shogi" for my father.

しかし、私は、父が自分でパソコンを立ち上げて、自分でアプリを開いて、自分からそのゲームをやっているところを見るところを、ついに見ることはできませんでした。

However, I had never seen my father put the PC's start button, opened the game apps, and play the games.

結局、私の両親は、ITに全く関わることなく、彼らの人生を終えました。

Finally, my parents had never touched IT in their life.

ここから私が得た教訓は、

The lesson I took from this is the fact of

―― 人から勧められたモノでは、自分を楽しませることはできない

"We cannot enjoy ourselves with anything others recommend"

という事実です。

このように書くと内容は哲学的ですが、実施例はにショボイですが。

Looking at the above, this seems to be philosophical but it is trivial in the real.

例えば、私が他人に勧めらて、試してみて、全くダメだったものの代表は『ゲーム』ですね。

For example, in my case, I was recommended and tried, and finally, it was in vain about "Games".

『メイド喫茶』の敗北については、こちら(後半)に記載しています。

The failure case of "Maid Cafe" was written in this diary(in the latter half).

今、これから発生する数万人規模の死体収容所を作っている ―― って、どこの世界線(ディストピア)の話? と聞きたくなります

-----

多分、他人の娯楽は、本人以外は制御できない。

Maybe, nobody will control their entertainment except for themselves.

自分の親や伴侶、そして自分の子どもでさえ、です。

Even if they are my parents, partner, and children.

『こんなに便利で楽しいものがあるのに』と、もどかしい気分になるのは分かります。

I know your frustration about "it can be to have something so convenient and fun".

これは仕方ありません。あきらめましょう。

However, it cannot be helped. Let you give up.

私たちは基本的に「やりたいことなどない」のですから。

Because we don't have what we want to do basically.

―― 私たちには、やりたいことなどない

-----

そういう意味では、好奇心がある人というのは、この変化の激しい時代においては『強い』と思います。

In that sense, people who have curiosity are stronger against this era of rapid change.

もっとも、好奇心があっても、オペレーション(準備とか、手続とか、処理とか)が難しすぎて、結局、深みにはまれない、というケースが多いと多います。

On the other hand, even if you have curiosity, you could not enthuse the object because the operations(preparations, procedures, and processes) are too difficult.

特にIT関係においては、『ITに精通した人間が、家族に最低一人存在するか否かで、その好奇心の生死が決定する』と断言できます。

Especially, in the case of IT, I can say that 'the presence of at least one IT-savvy person in the family determines whether or not the curiosity lives or dies'.

まあ、私の両親のケースでは『ITに精通した人間がいても、ダメなものはダメ』だったですけど。

Well, in my parents' case, "even if there were an IT-savvy(me), it was not enough"

2023,江端さんの技術メモ

『コーディングが嫌になったのなら、ドキュメントを書けばいいのに』という、某国の最後の王妃となった、マリーなんとかさんの声が脳内から聞こえてくるようです。

提出するペーパーに数式を記載しなければならないのですが、

とまあ、コピペが美しくなくて、レビューアの心象悪くしそうです。

今さらLatexで数式を記載するのは、冗談ではありませんし、Wordの数式記載の手間は、1行記載するだけで1日の時間をもっていかれそうです。

私の汚ない数式を整形してくれるツールはないかな、と、10秒くらい探したら、見つかりました。

iPadに、neboといアプリをインストールして対応しました。

(Step 1)新規をApple Penでクリック

(Step 2)新規"文章"をクリック

(Step 3) "+" → "数式"をクリック

(Step 4) Apple Penを使って、数式を手書きする

で、数式を記載した領域をタップすると、

となる(魔法のようだ)。

(Step 5) エクスポートでword形式にして、好きなところに飛ばす(私の場合LINEの"自分メモ"に飛ばしました)

転送されたwordファイルを開いたら、こんな感じになっていました。

必要な数式をコピペして完了 (青色の数式を、黒に変える)


感想:中古で購入したApple Penが、ようやく役に立った。

未分類

このフレーズ、次の学会発表で叫んでこよう

江端加筆_20221121_XXXXXXX.pptx

2023,江端さんの忘備録

"Don't worry. I am wearing"は、ご存知の通り、今、英国で大絶賛されている、あの日本のお笑い芸人さんの決めセリフです。

"Don't worry. I am wearing" is, as you may know, the famous line of the Japanese comedian who is now highly respected in the UK.

私も、ビデオクリップを見て、久々に気持よく盛大に笑いました。

Watching the video clip, I busted in laugh for a long time.

これを見て、思ったことがあります。

When I watched the video, I thought that

資格TOEICのPart1で、『絶対にダメ』と言われている英語の使い方が『ちゃんと通じている』。

This line is not allowed by TOEIC Part 1, however, it is allowed in the U.K.

(1)"wear"はパンツを履いている状態を示すので、進行形は使わない。

(1) "Wear" shows the state of wearing pants, so the progressive tense is not used.

(2)"wear"は他動詞なので、目的語「パンツ」が必要

(2) "Wear" is a transitive verb, so the object "pants" is necessary.

などに注意しないと失点するんですよ、中学や高校の英語テストや英検やTOEICでは。

If you don't pay attention to that, you lose the score of junior-high and high school, Eiken, and TOEIC.

-----

このケースで、

About this line, in my case,

- "Don't worry. I have worn the pants"

- "Don't worry. I wear the underwear"

- "Don't worry. I wear my pants"

のどれがいいかなぁ、などと気にするようになったのは、私が、英語日記を開始して5年目くらいです。

It was about five years after I started my English diary that I began to worry about "which one would be best".

5年間もかけて、ようやく、私は、他動詞やら進行形やら定冠詞を気にするようになったのです。

It took me five years, but I finally got to the point where I cared about transitive verbs, progressive forms, and the definite article.

しかし、そういうことで、トラブルになったことはありません。

However, I have never had any trouble with those issues.

それも、"日常会話で"ではなくて"ビジネスで"、です。

by not only "in dairy conversation" but also "in business".

ですから、

Therefore,

私は『そんなことは無視して構わん』と再三繰り返し主張し、「日本英語」の10の指標を示してきたのです。

画像はイメージです

So I have claimed that "Don't worry. I am using (English)" again and again, and showed you ten policies about Japanese English.

-----

英語テストの"点数を稼ぐ"のではなく、英語を"使う"ために、

Not to get the score on English tests, but to use English, I continued that

(Step 1)とにかくデタラメ英語を"毎日"使う → (Step 2)デタラメで困った時だけ基礎に戻る → (Step 3)基礎を少しずつ加えながらデタラメ英語を"毎日"続ける

(Step 1) Use bullshit English "every day" anyway → (Step 2) Return to basics only when I have trouble with bullshit → (Step 3) Continue to use bullshit English "every day" while gradually adding basics

という、『毎日英語』を続けてきたのです。

as a "dairy English".

繰り返しますが、

I repeat it, there is no problem thinking as

―― 『基礎』とは、必要になった時に取りに帰る『忘れ物』

"Basics" are "forgotten items" that you return to retrieve when you need them.

でいいと思うんです。

『英語は基礎こそが重要だ』と思っている人は『基礎英語』に人生を捧げ続けるのもいいと思う。でも、それを人に押しつけるべきではない ――

"If you think "Basics are the most important for studying English" and spend your time to "Basic English" in your life, it is O.K. However you should not push it on others."

ということだけは、あなたに押しつけたいのです。

I want to push that on you.

-----

私、10年間のデタラメ英語日記を経て、この度、"grammary for Chrome"の有料プランに入ることにしました(今、手続中)。

After 10 years of my bullshit English diary, I have decided to join the paid plan of "grammary for Chrome" (currently in the process).

年間144ドルは少々痛いのですが、これで、毎日、私の英語日記の添削をしてくれると思えば、安いものです。

The $144 per year is a bit of a pain for me, but it's a small price to pay considering that they will be correcting my English diary every day.

これからの私の英語の先生は、IT技術 & AI技術 です。

My future English teacher will be IT technology & AI technology.

もう、英語教師はいりません。

No more English teachers.

私は生れて始めて『AI技術による廃業』の予感を感じました ―― 最初の犠牲者は、語学教師です。

 

2023,江端さんの忘備録

今日は、大学の全体ゼミに出席してきました。

Today I attended a plenary seminar at the university.

日本人学生の皆さんは、英語の発表、および質疑応答で苦労をしていたようです。

Japanese students seemed to have a hard time with their English presentations and Q&A sessions.

(ちなみに、私も英語の授業で苦労しています。)

(I am also struggling in my English class.)

-----

30年前の過去の自分のことを省みると、

When I reflect on my past 30 years ago, I remember that

―― 大学院(マスター)課程で、英語なんて1mmも使わなかった

"I didn't use a millimeter of English in my graduate (masters) program"

と思います。

英語など、アブストラクトに10行程度を書いたくらいの記憶しかありません。

I only remember writing about 10 lines in an English abstract.

これらのことを考えると、現在の学生さんたちの英語環境は過酷になっていると言えます。

Considering these factors, the English environment for today's students is becoming more demanding.

ゼミの半数(以上?)が国際留学生で占めている講堂で、英語の発表に立ち向かっている姿は、立派だと思います。

I think it is admirable that they are giving presentations in English in an auditorium where half (or more?) of the seminar students are international students.

-----

ただ、私たちの時代には、Deepl(翻訳エンジン)もChatGPT(生成AI)もなかったし、SNSもメールのなく、そもそもインターネットがなかった。

But in our time, there was no Deepl (translation engine), no ChatGPT (generative AI), no SNS, no email, and no internet to begin with.

文献調査というのは、日本語文献がメインで、英語の論文は、単に持ち歩いていただけのような気がします。

Literature research is mainly in Japanese, and I feel that English papers were simply carried around.

それぞれの時代は、それぞれのメリットとデメリットがあって、それを相殺するとトントンになるのかな、とか考えています。

I am thinking that each era has its advantages and disadvantages and that if they are offset, it would be an even or something like that.

-----

まあ、シニアの私が言えることは、

Well, as a senior, I can tell you,

―― 英語との付き合いのコツは『ダラダラと続けていくこと』

"A helpful tip for handling the English language is to maintain a relaxed approach"

ということくらいですね。

「ダラダラ」は、「ダラダラ」ということの意味以外にも「途切らせない」という意味もあります。

Besides the meaning of "lazy," "lazy" also means "uninterrupted".

『あなた独自の"毎日続く仕組み作り"』を、検討してみて下さい。

Please consider "creating your own 'daily life mechanism'".

私の経験上、絶対に失敗するのは『英字新聞またはニューズウィークの購読』です。

In my experience, the one thing that fails is 'subscribing to an English newspaper or Newsweek'.

お忘れなく。

Please don't forget.

ようやく「カモ」から卒業した私は、「ニューズウィーク日本版」を日本語で読んでいます。

 

2023,江端さんの忘備録

技術は日進月歩 ―― それは分かっているのですが。

"Technology is constantly advancing", I know it well.

このアンテナが15年前にあれば、私の仕事(実証実験)はどれだけ楽だっただろうか、と。

I wonder how much easier my work (demonstration) would have been if this antenna had been around 15 years ago.

屋外実験において、無線通信に手を出してはならない

電波のルートを確保する為に、雨の中、デパート屋上での、体を張った決死のアンテナ設置工事など、走馬灯のように思い浮んできます。

I can still recall the desperate, physically demanding installation of antennas on the roof of a department store in the rain in order to secure a route for the radio waves.

これと同程度の性能のアンテナを自作する為に、勉強したりもしていました。

I even studied to build my own antenna with the same level of performance as this one.

え? 電波法ですか? すみません、エンジニアなので、法律面は素人でして。

What? The Radio Law? Sorry, I am an engineer, so I am a layman in the legal side.

-----

私(たち)のあの苦労は一体何だったのだろうか ―― と考えると虚しいものがあります。

I wonder what all those hardships I (we) went through were all about -- it's a very empty feeling.

以前、20年待てば、誰でも『現時点と同じ性能のスパコン』が手に入るというお話をしました。

I mentioned before that if we wait 20 years, anyone can get a "supercomputer with the same performance as at present".

なるほど、『私たちは、みんな、20年前のスパコンを使っている』ことになる訳です。

ならば、私(たち)は『20年後に解決することが決っている技術課題』の為に、闘ってきたのだろうか、と。

If so, I wonder if I (we) have been fighting for the sake of "technological issues that will be solved in 20 years.

-----

せめて、

At least,

―― 私たちの辛く厳しい実証実験は、その20年間の技術を進歩させるための必要な犠牲であった

-- Our painful and severe demonstrations were a necessary sacrifice to advance the technology over those 20 years.

と、でも思い込まないと、やってられません。

If I didn't think so, I wouldn't be doing it.

2023,江端さんの技術メモ

最近、映像制御の仕事をすることになりました。

WSLを使って、作業効率をはかりたいと考えていますが、WSLは基本的にコマンドインターフェースなので、表示システムを作らなければなりません。

「Windows11にWSL2+Ubuntu20.04をインストールする」を試してみて、Golangをインストールしてみた件

すったもんだしているのですが、とりあえず、Windows10の方にX-Windowの方に、X serverを立てて表示ができたので、メモを残しておきます。

(というか、『Windows10上で、X-Windowsのサーバ動かす』という発想ができなかったので、

(gedit:5386): Gtk-WARNING **: cannot open display やらで、悩んでいました。

基本は、

Windows10のWSLでX11アプリケーションを実行してみた

の通りに実施したら動きました(実は、ここまで、手当たりしだい "sudo apt-get install" を乱発して

WSLの方から、

>export DISPLAY=:0

>gedit dummy.txt

 

と投入したら、X-windowsのエディタが立ち上がってきましたが、

など、たくさん問題が出ているようなので、対応を続けます(続く)

ところで、

WSLでGUIアプリを実行する

などで、自分の「上手くできなかったことを、きちんと書き残している方」のメモは本当に素晴しい。こういうメモは、普通の成功パターンしか記載していないメモの何十倍も役に立つのです。

で、まあ、それはさておき。


本命はこちら ――

GStreamer

です。

私、映像の伝送の研究は色々やってきたのですが(10~15年前)、映像そのものの研究は初めてなので、まずは、ローカルのパソコンで色々遊ぶ・・・もとい、調査することにしました。

で、今の私、GStreamerが何なのかも分かっていないのですが、「これを使え」と指示されているので、「これに突っ込んでいく」だけです。

『ほとんどの入門書は、入門者にとっては、ただの"ゴミ"』

マルチメディアフレームワークGStreamer ~ 入門編

を参考にさせて頂き、

$ export DISPLAY=:0

$ gst-launch-1.0 videotestsrc ! autovideosink

で、これが出てきました。

おお! やった!

WSLの方はこんな感じです。

$ gst-launch-1.0 filesrc location=./out.h264 ! avdev_h264 ! autovideosink

も、ちゃんと表示されるようです。映像の違いは分かりませんが。

カーネルコンパイルしたら表示されなくなりました(それが理由かは分かりません)。

$ gst-launch-1.0 -v videotestsrc ! x264enc ! avdec_h264 ! videoconvert ! autovideosink

で、表示できました。

(とりあえず、error: XDG_RUNTIME_DIR not set in the environment. だけでも潰しておこう)

ともあれ、最初の一歩は確保しました。

エラーコメントの表示対応のため、以下の設定をしておきました。

$ cd ~
$ vi .bash_profile

以下の2行を追加(正直、上の設定の意味は分からんが、とりあえずエラーは消える)。

export XDG_RUNTIME_DIR=/tmp/runtime-futa
export DISPLAY=:0


GStreamerによるレートコントロールについて調べています。

ラズパイにWEBカメラを接続してGStreamerを使った際に小一時間ハマった話

こちらに、

そして、例えば、任意のサイズやフレームレートでキャプチャを行いたい場合は、video/x-raw,width=1280,height=720,framerate=30/1 のような指定を行います。

というような記載がありました。

$ gst-launch-1.0 videotestsrc ! autovideosink

をちょっと変更して試してみました。

$ gst-launch-1.0 videotestsrc ! videoconvert ! video/x-raw,width=1280,height=720,framerate=30/1 ! autovideosink

画面がでっかくなって表示されました。

$ gst-launch-1.0 videotestsrc ! videoconvert ! video/x-raw,width=1280,height=720,framerate=1/1 ! autovideosink

これで、1fpsの表示になりました。

で、実際に映像ファイル(start_up.mp4)を持ち込んで表示してみました。

$gst-launch-1.0 filesrc location=start_up.mp4 ! decodebin ! videorate ! video/x-raw,framerate=30/1 ! autovideosink

これを、1fpsの表示に変えてみます。

$gst-launch-1.0 filesrc location=start_up.mp4 ! decodebin ! videorate ! video/x-raw,framerate=1/1 ! autovideosink

これを、1fpsのmp4ファイルとして保存してみます。

■1ftp映像に変換したもの "1ftp.mp4"$ gst-launch-1.0 -e filesrc location=start_up.mp4 ! decodebin ! videoconvert ! videoscale ! videorate ! "video/x-raw,framerate=1/1" ! videoconvert ! x264enc bitrate=2000 ! mp4mux ! filesink location=1ftp.mp4

上記のコマンドでは、GStreamerのgst-launch-1.0ユーティリティを使用しています。filesrcエレメントを使用して入力ファイルを読み込み、decodebinエレメントを使用してデコードします。その後、videoconvertvideoscaleエレメントを使用して動画の形式を変換し、videorateエレメントを使用してフレームレートを変更します。最後に、x264encエレメントを使用してビットレートを設定し、mp4muxエレメントを使用して新しいmp4ファイルに変換します。


ひき続き、SRTの通信実験を行ってみます。

(2)映像転送プロトコルは、現在、SRTが有力候補

     (a)タイムスタンプが付与した再送機能付きUDP(と理解)

     (b)Gstreamerに標準装備されている(らしい)

で、高信頼の映像通信を実現するプロトコルのようです。

GStreamer で SRT を使用する その1

の内容をマネします。

私の場合、新規の設定をしないでも以下のコマンドが動きましたので、どっかで設定を終えてしまったのだと思います。

$ gst-launch-1.0 videotestsrc ! videoconvert ! x264enc tune=zerolatency key-int-max=30 ! mpegtsmux ! srtserversink uri="srt://:12345" latency=500

で、SRT の配信には、srtserversink を使用しているようです。

で、受信側は、VLCメディアプレーヤを用います。

※WSL2にしてカーネルコンパイルした後、

C:\Users\ebata>ipconfig

(中略)

Windows IP 構成

イーサネット アダプター vEthernet (WSL):

接続固有の DNS サフィックス . . . . .:
リンクローカル IPv6 アドレス. . . . .: fe80::c317:ce40:f52f:1a41%40
IPv4 アドレス . . . . . . . . . . . .: 172.22.144.1
サブネット マスク . . . . . . . . . .: 255.255.240.0
デフォルト ゲートウェイ . . . . . . .:

しか使えなくなってしまったので、上記のVLCのアドレスは、

とする必要が生じました。

これで、「再生(P)ボタン」を押すと、テスト映像が表示されます。


次にWebRTCの実験を行います。

ここでは、

Go + GStreamer でお手軽 WebRTC 体験

を試させて頂きました。

GOのソースは一つだけだったので、WSL環境から行ってみました(最初、エラーの嵐だったのですが、よく考えれば、私はWSLの方にGStremaerの環境を立てていたので当然でした。

結構エラーが出てきましたので、色々対応をしていました。

sudo apt-get install libgstreamer-plugins-base1.0-dev

で、一部解決したのですが、以下のエラーが取れません。
# pkg-config --cflags -- gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 gstreamer-plugins-bad-1.0 Package gstreamer-plugins-bad-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-plugins-bad-1.0.pc' to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-plugins-bad-1.0' found pkg-config: exit status 1

で、

https://github.com/notedit/gstreamer-go

に訪問してみたところ、

$ sudo apt-get install libgstreamer-plugins-bad1.0-dev

が、当たりだったようです。

で、後は上記のページの記載通りにGOプログラムを動かしたのですが、

2023/05/25 17:57:31 peer state change: failed

が登場してきて、変だなーと思ていたのですが、実はこれ成功しています。

このメッセージの上に、Goの出力の「長い文字列」が主力されていました。

これを入力して、「start session」ボタンを押下したら、以下の画面がブラウザに表示されました。

では、動作も確認できたので、ここからコードの勉強に入りましょう。


WebRTC を今から学ぶ人に向けて

の中にある、

WebRTC コトハジメ

が分かりやすい。

好奇心旺盛な人のためのWebRTC

も良い。

私はGolang使いなので、https://github.com/pion/webrtcを使いこなしたいが、膨大で手が出ない状況。今、とっかかりを探している。

とりあえず、wsl -d Ubuntu-20.04で、
ebata@DESKTOP-P6KREM0:/mnt/c/users/ebata/から、
get clone https://github.com/pion/webrtc で、インストール。

https://github.com/pion/webrtc/blob/master/examples/README.md

から、

$ cd webrtc
$ cd examples
$ go run examples.go --address :8080

で、ブラウザ http://localhost:8080で以下の画面が出てくる。

で、

のところで、"Run JavaScript"を押して、暫く(2~3分)待っていると、

という漢字で文字列が出てくるので、これを、上記のGo + GStreamer でお手軽 WebRTC 体験 のプログラムに放り込んで、同じように得られた文字列を放り込むと、

てな感じで映像が表示される。


$git clone https://github.com/pion/rtwatch.git

に挑戦。

https://github.com/pion/rtwatch の内容通りに設定するが、実行のところだけ少し違った

ebata@DESKTOP-P6KREM0:/mnt/c/users/ebata/rtwatch$ go run main.go -container-path=start_up.mp4
Video file 'start_up.mp4' is now available on ':8080', have fun!

これで、複数の、http://localhost:8080/ から同期した映像が配信されるようすが分かる。