投稿時間:2022-03-27 14:20:46 RSSフィード2022-03-27 14:00 分まとめ(23件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese ハイキングやトレイルランニングなど アウトドア向けシューズがAmazon新生活セールでお買い得! https://japanese.engadget.com/new-life-sale-outdoor-shoes-043333653.html amazon 2022-03-27 04:33:33
TECH Engadget Japanese 米政府、ロシアのカスペルスキーを「国家安全保障上の脅威」と認定 https://japanese.engadget.com/fcc-calls-russian-kaspersky-national-security-risk-041506893.html kasperskylab 2022-03-27 04:15:06
TECH Engadget Japanese G-SHOCKやPROTREKなど カシオの腕時計がお買い得価格に!|Amazon新生活セール https://japanese.engadget.com/new-life-sale-casio-040306052.html amazon 2022-03-27 04:03:06
js JavaScriptタグが付けられた新着投稿 - Qiita M5Core2とM5Atom EchoでMP3再生 https://qiita.com/poruruba/items/3a9afd186991a0227f1d また、WAVEファイルなどでも利用可能ですが、単純化のため今回はMPファイル限定にしました。 2022-03-27 13:42:49
js JavaScriptタグが付けられた新着投稿 - Qiita JSのscrollHeight, clientHeight, offsetHeightの違い https://qiita.com/banban-22/items/9d990d3d7a2f1c6dbff7 scrollHeightscrollHeightは、要素のコンテンツの高さoverflowによってスクリーン上では見れなくなっているコンテンツを含むまた、要素のpaddingは含みますが、bordermargin縦方向のスクロールバーは含みません。 2022-03-27 13:11:23
Linux Ubuntuタグが付けられた新着投稿 - Qiita Ubuntu Franka プログラム設定 https://qiita.com/carpenders/items/95c66a219d40e7e787b6 2022-03-27 13:48:17
AWS AWSタグが付けられた新着投稿 - Qiita 【amplify】signIn機能実装にて、認証が済んでいない場合のエラーハンドリングについて https://qiita.com/yoshiwo/items/c4d184add6c6c1971273 そこで、仮にsignInページでメアド・パスワードを入力しても、エラーとして返ってきた内容によって認証ページに遷移させたりする機能を実装することにしました。 2022-03-27 13:46:05
AWS AWSタグが付けられた新着投稿 - Qiita AWS Backup for Amazon S3を使ってみた https://qiita.com/ma_igarashi/items/7e2f0a28405d8b65a95e ②IAMロールを作成AWSBackupにはデフォルトロールの用意がありますが、Sのポリシーは含まれていません。 2022-03-27 13:43:33
golang Goタグが付けられた新着投稿 - Qiita 【Golang】1文字をruneに変換する https://qiita.com/KEINOS/items/25ea1d69ee17fbe2716f 【Golang】文字をruneに変換するGo言語以下Golangで、文字の文字列をruneUnicodeのコードポイント符号位置専用のint型に変換したい。 2022-03-27 13:40:29
技術ブログ Developers.IO AWS CLI로 EBS 볼륨 DeleteOnTermination 설정해 보기 https://dev.classmethod.jp/articles/try-configuring-ebs-volume-deleteontermination-in-aws-cli/ AWS CLI로EBS 볼륨DeleteOnTermination 설정해보기안녕하세요클래스메소드김재욱 Kim Jaewook 입니다 이번에는AWS CLI로EBS 볼륨의DeleteOnTermination 옵션을설정해보는명령어를정리해봤습니다 CloudFo 2022-03-27 04:19:11
海外TECH DEV Community Reverse-engineering a weird video file https://dev.to/19wintersp/reverse-engineering-a-weird-video-file-3og Reverse engineering a weird video fileRecently I happened across a rather unusual video file whilst browsing Discord a video that would show something different depending on your platform InvestigatingAfter sending it to a suitable number of other servers and friends I decided to try to figure out how it worked FFmpeg is a great tool which you should definitely have and includes a program called ffprobe ffprobe can as the name suggests probe media files and dump their data Here s what it gave me matroska webm xfcdf Unknown or unsupported track type Last message repeated timesInput matroska webm from discord moment webm Metadata title encoder Lavf Duration start bitrate kb s Stream Video vp Profile yuvp tv x SAR DAR fps tbr k tbn k tbc Stream Audio vorbis Hz stereo fltp default Shout out to pious dev great advertising Looking at the main data near the bottom shows us nothing unusual Most video files follow this format one video stream and one audio stream In the usual sense of the word video files are actually containers for multiple streams They can only contain the actual data and only of one type out of audio video subtitles etc In our day to day usage we only tend to interact with container formats such as MP or WebM under the hood these formats most commonly use codecs with weird names like H AAC Vorbis or VPX VP In full ffprobe is telling us that we have two streams A video stream encoded as VP pixel format of YUVP at FPSAn audio stream encoded as Vorbis at samples per second in stereo audioHowever something more interesting is the warning at the top matroska webm xfcdf Unknown or unsupported track type Last message repeated timesWhat does this mean What s a track type We need some docs The first port of call would be some documentation about the WebM format and a quick search leads us to the Container Guidelines on the WebM Project site Hit Ctrl F and we get to the TrackType element of a Track A set of track types coded on bits video audio complex x logo x subtitle x buttons x control Interesting the track type that ffprobe is complaining about is a complex track Container formats often also contain unstructured data in addition to video and audio data as you d expect and the fact that such data is present in this file looks like it might be a clue We can use this information in conjunction with some confused messages around the original post to infer that there are three video tracks One shows Chromium one shows Firefox and one shows Android This means it must be taking advantage of how each of those platforms parsers works differently The FFmpeg set of tools includes another useful one ffplay can play videos how FFmpeg would interpret them And it shows Chromium Now we know that Chromium purportedly only shows the video track which has the correct track type of video This also means that Firefox is using one of the tracks that has a complex track type To understand further we need to dig deeper Doing some more research eventually shows up that WebM is based on Matroska another video format which in turn has its specification based on EBML created specifically for it it seems EBML claims to be a simplified binary extension of XML so we can parse it like markup Rust is great let s use that If we search crates io for an EBML parser there s webm iterable perhaps that can help Quickly creating a Rust project and adding webm iterable to it a basic program can be produced which just dumps the data in a file specified use std env args use std fs File use webm iterable WebmIterator fn main let src File open args nth unwrap unwrap let tag iterator WebmIterator new src amp for tag in tag iterator println tag Ok Running that on the file gives us a very long list of all of the tags in the file though we can narrow it down to the bit we care about the track list You can try to do it yourself if you want the raw log but translating it loosely to XML it looks like this lt Tracks gt lt TrackEntry gt lt TrackNumber gt lt TrackNumber gt lt TrackUid gt lt TrackUid gt lt CodecId gt V VP lt CodecId gt lt TrackType gt lt TrackType gt lt Video gt lt PixelWidth gt lt PixelWidth gt lt PixelHeight gt lt PixelHeight gt lt Video gt lt TrackEntry gt lt TrackEntry gt lt TrackNumber gt lt TrackNumber gt lt TrackUid gt lt TrackUid gt lt FlagDefault gt lt FlagDefault gt lt CodecId gt V VP lt CodecId gt lt TrackType gt lt TrackType gt lt Video gt lt PixelWidth gt lt PixelWidth gt lt PixelHeight gt lt PixelHeight gt lt Video gt lt TrackType gt lt TrackType gt lt TrackEntry gt lt TrackEntry gt lt TrackNumber gt lt TrackNumber gt lt TrackUid gt lt TrackUid gt lt FlagDefault gt lt FlagDefault gt lt CodecId gt V VP lt CodecId gt lt TrackType gt lt TrackType gt lt Video gt lt PixelWidth gt lt PixelWidth gt lt PixelHeight gt lt PixelHeight gt lt Video gt lt TrackEntry gt lt TrackEntry gt lt TrackNumber gt lt TrackNumber gt lt TrackUid gt lt TrackUid gt lt CodecId gt A VORBIS lt CodecId gt lt TrackType gt lt TrackType gt lt Audio gt lt Channels gt lt Channels gt lt SamplingFrequency gt lt SamplingFrequency gt lt BitDepth gt lt BitDepth gt lt Audio gt lt TrackEntry gt lt Tracks gt And hey this looks familiar This echoes exactly what we saw in what ffprobe gave us the ones it showed us are seen here as track numbers and if you want you can check that all of their values are the same and now we have two extras These two must be the ones that had track type and it ignored Indeed for track number it has a track type element with value However track number has two of these elements the first one has a value of and the second has a value of This is weird and I m pretty sure this isn t valid likely key to understanding it Let s forego some of this fancy tooling for now and open up the beloved hex editor Here I m using Okteta though it s not because it s good in any way sorry Using those handy codec ID strings as a guide we can pinpoint the location of this track data Since we know that FFmpeg will ignore any tracks which have a track type of how about we try to change one of the tracks with a track type of to not be We ll target track number so we need to find that second track type element and change it to be a Starting at the second obvious V VP string we can work forward until we see the two values for width and height Sure enough pretty soon afterwards there is a lone in the hex data Switch that to a save and run ffplay with it and Awesome So now we know that the second track is intended for Firefox which implies that Firefox treats the duplicate track type element differently to FFmpeg It only sees the first one video whereas FFmpeg uses the last complex which we changed to a just now It also tells us that the player will choose the first track which it considers valid and ignore any other tracks even if they are also valid This editing process with the hex editor can be repeated with the first track to extract the Android version the reader is invited to attempt doing so themselves Since Android apparently picks the first track despite it not being a video track we assume that it just ignores it entirely Weird Let s do a quick recap we have a file with multiple video tracks in and these tracks each have a track type or multiple and each parser that this video targets interprets them differently either picking the first or last when there is duplicates or ignoring the value entirely This is a pretty cool discovery ExtendingNow that we have acquired knowledge let s apply it At this stage we could make our own video by manually modifying a specially crafted WebM file in the hex editor But let s try to automate that Going back to our little Rust project we ll add a simple bit of code to the start that will create the basic WebM file with the multiple tracks Should be as simple as ffmpeg i video mp i video mp i video mp i audio mp output webm right Er no Save me StackOverflow Okay seems we need to use the map option So ffmpeg i video mp i video mp i video mp i audio mp map map map map output webm Right This is fairly trivial to add to the code though we may also want to throw in a q to make FFmpeg shut up it s rather verbose Once we ve created this file we can go through it to make the changes that we originally made via the hex editor Luckily for us that library we were using earlier webm iterable also provides a way for us to write files as well as reading them Let s take our existing tag dump code and modify it to write the tags to the output instead Now it ll just directly copy one file to the other Making all of these tiny modifications is pretty boring and it essentially boils down to matching one thing and switching it for another Here s how we insert the track type for example match tag tag is an element in the file if it s a track type element Spec TrackType gt Chromium is the only one who does it correctly if platforms i Platform All platforms i Platform Chromium tag output write tag if it s the codec ID element Spec CodecId id gt copy out the tag tag output write tag figure out what the actual type should be for example V VP is a video codec let true type match amp id A gt audio V gt video gt bail codec id is not video or audio let track type match platforms i Android is only Platform Android gt Firefox initially should have the real type Platform Firefox gt true type otherwise just ignore this gt continue write the tag tag output write amp Spec TrackType track type if we re at the end of the track Spec Video Spec Audio gt copy this over we re just using it as an anchor tag output write tag write the second Firefox tag if platforms i Platform Firefox tag output write amp Spec TrackType There s a few other minor tweaks like this that need to be made for a full useful program but you get the gist Notably our program also supports changing the audio on each platform though the original video did not The original creator likely did know about this though since a friend later linked me another example from his Github which does take advantage of the audio changing If we bring all this together with a nice CLI interface and some video and audio files we get our own amazing oddity of a video Brilliant ConclusionThis was pretty fun I ve put all of the code in a GitHub Gist despite how bad it is so you can go off and make your own I d still like to stress that I didn t discover this I wish and all of this is just reverse engineering that file that I saw on Discord a couple of days ago Also first DEV article Written at am feels fitting Comments feedback insults whatever appreciated below 2022-03-27 04:16:22
海外TECH DEV Community Why GitHub? 🤖 https://dev.to/itskunal/why-github-13j8 Why GitHub I hope you know much about git Why do we need tools like GitHub GitHub it is a place where you can store your code online it doesn t mean its the only one but most popular Due to its generous free services high security and again popularity You can store write update your code with others but what s more with GitHub is working with branches opening issues wiki for a repository Branchesits like Everyone can work on same ship without interfering work of others Branches concept is similar to time travel your code You can commit on a branch for a change in file afterwards you can see those logs and also go back there Merge a branch in your codebase maintain different versions of your code Is it ok for a Developer alone It depends on project but most of the time yes As it shows your work to public You can maintain your repository with a nice format from anywhere in world Is it ok to contribute in other projects Yes this can help you to understand best practices to maintain a codebase how things work at different levels You got to know a lot of people groups Develops your community skills connections ForkFork is use to get a copy of another repository for your so that you can make changes over it collaborate After making changes you can send pull requests so that admin of that repository can merge your code Issueswhenever there is code there is a bug so consider a situation where you find a error in code but you don t know how to fix it that s where you can open issues on that You can use issues section as Task list most used one Tip Start using it as a shopping list personal diary or films to watch list that s how I practice Git amp GitHub That s it on GitHub if you want a cheat sheet on GitHub Checkout devhints io 2022-03-27 04:14:11
海外TECH DEV Community Video thumbnails generate with vanilla JS, ReactJS. Like YouTube https://dev.to/rajeshroyal/video-thumbnails-generate-with-vanilla-js-reactjs-like-youtube-3ok8 Video thumbnails generate with vanilla JS ReactJS Like YouTubeHave you ever needed where the user uploads the video and has the option to select a thumbnail if yes keep reading Recently I needed to create a service in one of my projects where users will upload a video and can select a thumbnail of that video and I needed to generate multiple thumbnails from the different timeframes of video So the user can select one of the thumbnail from the givensomething like this can t upload the original screen  I search for JS libraries which can do this for me but ended up creating my own NPM package video thumbnails generatorContributions are more than welcome I have already added a roadmap in the Readme md   But first lets see how its working behind the scene Index js The Driver convert image to object part instead of base for better performance export const importFileandPreview file revoke gt return new Promise resolve reject gt window URL window URL window webkitURL let preview window URL createObjectURL file remove reference if revoke window URL revokeObjectURL preview setTimeout gt resolve preview param videoFile FIle the video file param numberOfThumbnails number number of thumbnails you want to generate returns string an array of base thumbnails images abstract Idea taken from The original functionality of getVideoThumbnail function is customized as per working code If it didn t work in future then replace it with about links working example export const generateVideoThumbnails async videoFile numberOfThumbnails gt let thumbnail let fractions return new Promise async resolve reject gt if videoFile type includes video reject not a valid video file await getVideoDuration videoFile then async duration gt divide the video timing into particular timestamps in respective to number of thumbnails ex if time is and numOfthumbnails is then result will be gt we will use this timestamp to take snapshots for let i i lt duration i duration numberOfThumbnails fractions push Math floor i the array of promises let promiseArray fractions map time gt return getVideoThumbnail videoFile time console log promiseArray promiseArray console log duration duration console log fractions fractions await Promise all promiseArray then res gt res forEach res gt console log res res slice thumbnail push res console log thumbnail thumbnail resolve thumbnail catch err gt console error err finally res gt console log res resolve thumbnail reject something went wront const getVideoThumbnail file videoTimeInSeconds gt return new Promise resolve reject gt if file type match video importFileandPreview file then urlOfFIle gt var video document createElement video var timeupdate function if snapImage video removeEventListener timeupdate timeupdate video pause video addEventListener loadeddata function if snapImage video removeEventListener timeupdate timeupdate var snapImage function var canvas document createElement canvas canvas width video videoWidth canvas height video videoHeight canvas getContext d drawImage video canvas width canvas height var image canvas toDataURL var success image length gt if success URL revokeObjectURL urlOfFIle resolve image return success video addEventListener timeupdate timeupdate video preload metadata video src urlOfFIle Load video in Safari IE video muted true video playsInline true video currentTime videoTimeInSeconds video play else reject file not valid param videoFile File returns number the duration of video in seconds export const getVideoDuration videoFile gt return new Promise resolve reject gt if videoFile if videoFile type match video importFileandPreview videoFile then url gt let video document createElement video video addEventListener loadeddata function resolve video duration video preload metadata video src url Load video in Safari IE video muted true video playsInline true video play window URL revokeObjectURL url else reject ExplanationsimportFileandPreview This function will take an File object and will convert it into windowObjectURI which look something like this blob http localhost dbc f ed ac dc export const importFileandPreview file revoke gt return new Promise resolve reject gt todo your logic here getVideoDuration abbrivation This function takes a video File object as an input and returns the duration of that video param videoFile File returns number the duration of video in seconds export const getVideoDuration videoFile gt return new Promise resolve reject gt if videoFile resolve duration else reject getVideoThumbnail abbrivation This function takes a video File Object and the time where we need a snapshot of video screen It will return a snapshot of the video at the given time in base format param File file param number videoTimeInSeconds returns string baseImage const getVideoThumbnail file videoTimeInSeconds gt return new Promise resolve reject gt if file type match video resolve thumbnail base image else reject file not valid generateVideoThumbnails This functin will take two input video File and Number And It will generate that many thumbnails param videoFile FIle the video file param numberOfThumbnails number number of thumbnails you want to generate returns string an array of base thumbnails images abstract Idea taken from The original functionality of getVideoThumbnail function is customized as per working code If it didn t work in future then replace it with about links working example export const generateVideoThumbnails async videoFile numberOfThumbnails gt let thumbnail let fractions return new Promise async resolve reject gt if videoFile type includes video reject not a valid video file first we get video duration then we calculate how many thumbnails to generate we cann generateThumbnail function that many times then we resolve all those promises and return result await Promise all promiseArray then res gt res forEach res gt thumbnail push res resolve thumbnail catch err gt console error err finally res gt resolve thumbnail reject something went wrong See it in action Live Demo  Hope you enjoyed it reading Do not forget share of hit that heart icon see you soon with new material 2022-03-27 04:10:22
海外TECH DEV Community My dream is about solving global warming with fusion and AI https://dev.to/thedima/my-dream-is-about-solving-global-warming-with-fusion-and-ai-1f4n My dream is about solving global warming with fusion and AIMy dream is about solving global warming with fusion and AI We all know that matter consists of atoms and an atom consists of atomic nuclei and electrons orbiting it Atomic nuclei are not very friendly electrostatic forces push them apart However if they are close enough for long enough if the nuclear force is greater than electrostatic they fuse into heavier nuclei For many elements the reaction is accompanied by energy release for example hydrogen Our sun consists primarily of hydrogen and its fusion product helium As you might guess it has two protons in contrast to one proton in hydrogen Hydrogen fusion in the sun releases all the energy required to enable evolution on our planet But why can t we reproduce the same on Earth Why can t we light up mini starts in fusion reactors and consume infinite energy Hydrogen after all is the most abundant element in the universe We try we try hard Suppose one wants to surpass electrostatic force and make hydrogen nuclei fuse In that case one has two choices bring huge volume to one place read Sun or pump up a lot of energy into a limited amount read fusion reactor Small reactor higher the temperature should be Plasma is what physicists call pumped up with energy hydrogen More power hotter and denser plasma becomes The temperature is so high that no such material can withhold it Hence the only way to hold is a strong magnetic field But steering a fusion plasma toward stability is a complicated problem If we can do it in real time with high precision we can crack super high temperature fusion in a limited volume Simple methods don t work A human operator is also not capable of this because of the human s reaction time But what about an AI DeepMind tried and their result looks very promising The idea of DeepMind s research and proof of concept is that there is no need to simulate and support a specific configuration of the plasma carefully The AI can steer it precisely enough and react to ever changing states The hope is that they will be able to hold plasma in the desired configuration for as long as needed and slowly extract the energy we want I dream of AI controlling hundreds if not thousands of small fusion reactors They produce so much energy that we don t burn coal gas or oil to get the power we so desperately need Do you want to see such a world too 2022-03-27 04:08:53
海外ニュース Japan Times latest articles North Korea may be preparing for nuclear test soon, report says https://www.japantimes.co.jp/news/2022/03/27/asia-pacific/us-north-korea-nuclear-test-site-repair/ North Korea may be preparing for nuclear test soon report saysPyongyang appears to be working on a shortcut to a tunnel at its Punggye ri test facility apparently in an attempt to repair the site which 2022-03-27 13:18:08
ニュース BBC News - Home Taylor Hawkins: Drugs found in body of late Foo Fighters drummer https://www.bbc.co.uk/news/entertainment-arts-60890202?at_medium=RSS&at_campaign=KARANGA hawkins 2022-03-27 04:34:26
ニュース BBC News - Home Cricket World Cup: England beat Bangladesh to reach semi-finals https://www.bbc.co.uk/sport/cricket/60890065?at_medium=RSS&at_campaign=KARANGA wellington 2022-03-27 04:49:04
ニュース BBC News - Home Caribbean tour: Prince William says future is for the people to decide https://www.bbc.co.uk/news/uk-60890440?at_medium=RSS&at_campaign=KARANGA caribbean 2022-03-27 04:18:18
ニュース BBC News - Home The papers: Putin 'cannot stay' and duke's Caribbean promise https://www.bbc.co.uk/news/blogs-the-papers-60890078?at_medium=RSS&at_campaign=KARANGA commonwealth 2022-03-27 04:34:24
ビジネス 不景気.com 週刊不景気ニュース3/27、上場企業の子会社が倒産 - 不景気.com https://www.fukeiki.com/2022/03/week-report-220327.html 上場企業 2022-03-27 04:26:49
北海道 北海道新聞 濱口監督「夢の世界楽しみたい」 アカデミー賞前に心境 https://www.hokkaido-np.co.jp/article/661750/ 祭典 2022-03-27 13:18:11
北海道 北海道新聞 ラプターズ渡辺は6得点 米プロバスケNBA https://www.hokkaido-np.co.jp/article/661759/ 渡辺 2022-03-27 13:04:00
ビジネス 東洋経済オンライン 上皇后を大笑いさせた日本通のフィリピン人作家 ショニール・ホセ氏が残した愛憎混じる日本への言葉 | アジア諸国 | 東洋経済オンライン https://toyokeizai.net/articles/-/541471?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-03-27 13:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)