{"id":323,"date":"2021-10-15T02:03:16","date_gmt":"2021-10-14T17:03:16","guid":{"rendered":"https:\/\/derrylab.com\/?p=323"},"modified":"2022-03-02T22:47:31","modified_gmt":"2022-03-02T13:47:31","slug":"how-to-cut-and-download-youtube-videos-using-command-line","status":"publish","type":"post","link":"https:\/\/blog.derrylab.com\/index.php\/2021\/10\/15\/how-to-cut-and-download-youtube-videos-using-command-line\/","title":{"rendered":"How to Cut and Download Youtube Videos using Command Line"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In some of my free time, I am actively using Instagram, not to show off or seeing people&#8217;s life that I don&#8217;t even care about. For me, this social media is perfect for everyday reminders for positive feeds. Usually, people choose a youtube video at the best moment, then re-post it on Instagram as a short one-minute clip, and sometimes I do so.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, the process of downloading, cutting, then re-posting it on Instagram is easy but not a quick task, especially if you do it on your phone. Then I thought it would be better for us (people who loved to share short clips from youtube) if we can do that in just one step. But first, let&#8217;s check what are the tools available for this task.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">In Search of Youtube Downloader<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So I did a little search, and then found a popular youtube downloader repository on Github, <code><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/\" data-type=\"URL\" data-id=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/\" target=\"_blank\" rel=\"noreferrer noopener\">youtube-dl<\/a><\/code>. Unfortunately, it is not a mobile app, it&#8217;s made for PC, works on Linux, Mac, and Windows. It works well and is easy enough for me to download the youtube videos that I want. As simple as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ youtube-dl https:\/\/www.youtube.com\/watch?v=4B9hgn-GG3c<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And let the <code>youtube-dl<\/code> handle the rest.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cut on The Best Moment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So now we have our video. Let&#8217;s cut it at the best moment that we want. For this, I found that <code><a href=\"https:\/\/www.ffmpeg.org\/\" data-type=\"URL\" data-id=\"https:\/\/www.ffmpeg.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">FFmpeg<\/a><\/code> has easy cut commands (<a rel=\"noreferrer noopener\" href=\"https:\/\/askubuntu.com\/a\/716634\" data-type=\"URL\" data-id=\"https:\/\/askubuntu.com\/a\/716634\" target=\"_blank\">source<\/a>). Make sure it is already installed on your system.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ffmpeg -i source.mp4 -ss 00:00:05 -t 00:00:10 -c copy cut_video.mp4<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>-i<\/code> param is for input video, <code>-s<\/code> is for the starting point to cut, <code>-t<\/code> is for the length, and <code>-c<\/code> is for the output. Having these tools, we are able to combine and make our automation script to download and cut. However, there&#8217;s still a problem with this approach.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Another Problem<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most of the time, the clip that we want is short. The problem appears when we need a small clip from super-duper HD really long video. Download time will increase. It&#8217;s really wasteful if you just need a small part of it. Then, what can we do?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By the time I am writing this post, apparently, Youtube is capping download speed on any downloader including the <code>youtube-dl<\/code> to around <code>80KBps<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then I search around and found another downloader. Meet <code><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\" data-type=\"URL\" data-id=\"https:\/\/github.com\/yt-dlp\/yt-dlp\" target=\"_blank\">yt-dlp<\/a><\/code> which is the fork of <code>youtube-dl<\/code>, it contains various fixes and additional features. What surprised me is that it can <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/issues\/686\" data-type=\"URL\" data-id=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/issues\/686\" target=\"_blank\" rel=\"noreferrer noopener\">download only part of the interval using ffmpeg<\/a> using this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ yt-dlp --downloader ffmpeg --downloader-args \"ffmpeg_i:-ss 00:41:21.00 -to 00:41:31.00\" --no-check-certificate https:\/\/www.youtube.com\/watch?v=dqvPzbO__bQ&amp;ab_channel=RodjaTV<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Below is me downloading a part of a 57 minutes video only from minutes 41:21 to 41:31 is done in seconds, awesome! No need to download the whole part of the videos.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ibndias@xps15:~$ yt-dlp --downloader ffmpeg --downloader-args \"ffmpeg_i:-ss 00:41:21.00 -to 00:41:31.00\" --no-check-certificate https:\/\/www.youtube.com\/watch?v=dqvPzbO__bQ&amp;ab_channel=RodjaTV\n&#91;1] 197204\nibndias@xps15:~$ &#91;youtube] dqvPzbO__bQ: Downloading webpage\n&#91;youtube] dqvPzbO__bQ: Downloading android player API JSON\n&#91;info] dqvPzbO__bQ: Downloading 1 format(s): 248+251\n&#91;download] Destination: Shahihu Fiqhis Sunnah  - Syarat-Syarat Tayamum l Ustadz Dr. Musyaffa Ad Dariny &#91;dqvPzbO__bQ].webm\nInput #0, matroska,webm, from 'https:\/\/r5---sn-n3cgv5qc5oq-20nz.googlevideo.com\/videoplayback?expire=1634250846&amp;ei=_ltoYb_xNMTDgQPTpIWgAQ&amp;ip=58.235.241.85&amp;id=o-AGmMeQgP3Rc7RQQIxOyzavFZY0VoTpQPlIAy4msJnQLT&amp;itag=248&amp;source=youtube&amp;requiressl=yes&amp;mh=ax&amp;mm=31%2C29&amp;mn=sn-n3cgv5qc5oq-20nz%2Csn-n3cgv5qc5oq-bh2ld&amp;ms=au%2Crdu&amp;mv=m&amp;mvi=5&amp;pl=24&amp;initcwndbps=1661250&amp;vprv=1&amp;mime=video%2Fwebm&amp;gir=yes&amp;clen=656659706&amp;dur=3468.400&amp;lmt=1633920085252967&amp;mt=1634228955&amp;fvip=5&amp;keepalive=yes&amp;fexp=24001373%2C24007246&amp;c=ANDROID&amp;txp=6316224&amp;sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&amp;sig=AOq0QJ8wRQIgMLOzOcvQTl1k8pFRLmFf8RvFUDA0hPOmsmwjFjYWhhACIQD-kl5de2iWr9hNdXWGHDlm4FP3AoTDTtJy0iMj9DH1SQ%3D%3D&amp;lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&amp;lsig=AG3C_xAwRAIgcKqqM66NWuaPnvugVRSxPjREFIHn35fQjUqD7EBRoX8CIA5n85It0dz3f_kFlxNkkGXCJHIQG1BBqKBaf6piKLO8':\n  Metadata:\n    encoder         : google\/video-file\n  Duration: 00:57:48.40, start: 0.000000, bitrate: 1514 kb\/s\n    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)\nInput #1, matroska,webm, from 'https:\/\/r5---sn-n3cgv5qc5oq-20nz.googlevideo.com\/videoplayback?expire=1634250846&amp;ei=_ltoYb_xNMTDgQPTpIWgAQ&amp;ip=58.235.241.85&amp;id=o-AGmMeQgP3Rc7RQQIxOyzavFZY0VoTpQPlIAy4msJnQLT&amp;itag=251&amp;source=youtube&amp;requiressl=yes&amp;mh=ax&amp;mm=31%2C29&amp;mn=sn-n3cgv5qc5oq-20nz%2Csn-n3cgv5qc5oq-bh2ld&amp;ms=au%2Crdu&amp;mv=m&amp;mvi=5&amp;pl=24&amp;initcwndbps=1661250&amp;vprv=1&amp;mime=audio%2Fwebm&amp;gir=yes&amp;clen=46413793&amp;dur=3468.441&amp;lmt=1633920481569809&amp;mt=1634228955&amp;fvip=5&amp;keepalive=yes&amp;fexp=24001373%2C24007246&amp;c=ANDROID&amp;txp=6311224&amp;sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&amp;sig=AOq0QJ8wRAIgTK9mvpNA_MmCt6AvGdq3dizvvldX0BnMKQQ8SSh3vS8CIGhhnwqWzfa8bFDCiYjduCQrKGRhYkRUB4AAqhtRWUfI&amp;lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&amp;lsig=AG3C_xAwRAIgcKqqM66NWuaPnvugVRSxPjREFIHn35fQjUqD7EBRoX8CIA5n85It0dz3f_kFlxNkkGXCJHIQG1BBqKBaf6piKLO8':\n  Metadata:\n    encoder         : google\/video-file\n  Duration: 00:57:48.44, start: -0.007000, bitrate: 107 kb\/s\n    Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)\nOutput #0, webm, to 'file:Shahihu Fiqhis Sunnah  - Syarat-Syarat Tayamum l Ustadz Dr. Musyaffa Ad Dariny &#91;dqvPzbO__bQ].webm.part':\n  Metadata:\n    encoder         : Lavf58.45.100\n    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080 &#91;SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)\n    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)\nStream mapping:\n  Stream #0:0 -&gt; #0:0 (copy)\n  Stream #1:0 -&gt; #0:1 (copy)\nPress &#91;q] to stop, &#91;?] for help\nframe=  275 fps=0.0 q=-1.0 Lsize=    2414kB time=00:00:09.98 bitrate=1981.2kbits\/s speed=23.7x    \nvideo:2257kB audio:150kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.263868%\n&#91;ffmpeg] Downloaded 2471757 bytes\n&#91;download] 100% of 2.36MiB in 00:06\nibndias@xps15:~$ \n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we have this quick way to download part of youtube videos, I am wondering if we can have this on mobile apps or web apps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I personally prefer web apps, whether it is through a VPS or maybe even just a pure PHP script is enough, <s>let&#8217;s see if we can make it<\/s>. \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Update: We Made It! Please Try! \ud83d\ude42<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, in some of my free time, I was able to create my own web service to cut the portion of youtube videos. Go to <a rel=\"noreferrer noopener\" href=\"http:\/\/shaviq.derrylab.com\" data-type=\"URL\" data-id=\"shaviq.derrylab.com\" target=\"_blank\"><strong>shaviq.derrylab.com<\/strong><\/a> to try! Please try it a lot and give us some useful feedback. You can also add some captions for your trimmed videos for videos title, but if you just want to cut the videos, just leave the title fields empty. \ud83d\ude42<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"458\" src=\"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/Capturea.png?resize=1024%2C458&#038;ssl=1\" alt=\"\" class=\"wp-image-529\" srcset=\"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/Capturea.png?resize=1024%2C458&amp;ssl=1 1024w, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/Capturea.png?resize=300%2C134&amp;ssl=1 300w, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/Capturea.png?resize=768%2C343&amp;ssl=1 768w, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/Capturea.png?resize=1200%2C537&amp;ssl=1 1200w, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/03\/Capturea.png?w=1219&amp;ssl=1 1219w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption>SHAVIQ stands for Share Videos Quickly<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the future, I am planning to add some style templates for captions. It will be good for sharing personalization. See you later! \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In some of my free time, I am actively using Instagram, not to show off or seeing people&#8217;s life that I don&#8217;t even care about. For me, this social media is perfect for everyday reminders for positive feeds. Usually, people choose a youtube video at the best moment, then re-post it on Instagram as a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":405,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[136,134,137,141,36,64,135,133,139,138],"class_list":["post-323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-cut","tag-download","tag-edit","tag-hack","tag-linux","tag-tutorial","tag-video","tag-youtube","tag-youtube-dl","tag-yt-dlp"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/10\/pexels-szabo-viktor-3227986-1.jpg?fit=1280%2C853&ssl=1","jetpack-related-posts":[{"id":2780,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/04\/25\/how-to-replace-string-in-files-without-text-editor-in-linux\/","url_meta":{"origin":323,"position":0},"title":"How to Replace String in Files without Text Editor in Linux","author":"derry","date":"April 25, 2023","format":false,"excerpt":"As a Linux user, it's important to know how to modify text files through the command line. One common scenario is changing a single line in a text file, such as enabling or disabling a feature. But what if the OS doesn't have any text editor installed at all? In\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"pencil shavings","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2538,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/01\/31\/how-to-install-alfa-awus036nh-driver-for-kali-linux\/","url_meta":{"origin":323,"position":1},"title":"How to Install Alfa AWUS036NH Driver for Kali Linux","author":"derry","date":"January 31, 2023","format":false,"excerpt":"This wifi adapter is an important weapon for penetration testers due to its feature that supports monitor and packet injection mode on a 2.4Ghz network. However, even if Alfa said it is already supported out of the box in Kali Linux, I found it unstable out of the box. Sometimes\u2026","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/blog.derrylab.com\/index.php\/category\/hardware\/"},"img":{"alt_text":"Computer desktop","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvZnJ3bGFuX3dpZmlfbmV0d29ya19tb2RlbS1pbWFnZS1reWJjZThvZC5qcGc.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2572,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/02\/08\/how-to-install-the-latest-openwrt-on-arduino-yun\/","url_meta":{"origin":323,"position":2},"title":"How to Install the Latest OpenWRT on Arduino Yun","author":"derry","date":"February 8, 2023","format":false,"excerpt":"By the time I am writing this, this might be the first article that tells you how to install OpenWRT on Arduino Yun because no one talks about it. Also, Arduino Yun is already reached its end of life, and the version history is not well documented in each article\u2026","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/blog.derrylab.com\/index.php\/category\/hardware\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":213,"url":"https:\/\/blog.derrylab.com\/index.php\/2021\/09\/27\/git-pristine-how-to-pristine-clean-your-dirty-git-repository\/","url_meta":{"origin":323,"position":3},"title":"Git Pristine: How to Pristine Clean Your Dirty Git Repository","author":"derry","date":"September 27, 2021","format":false,"excerpt":"I found this command useful and I love this alias! git pristine, a command that will wipe any dirt on your local git copy, any untracked files, and the cache will be removed to make it pristine clean as the remote origin. Now, each time you messed up your repository,\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":211,"url":"https:\/\/blog.derrylab.com\/index.php\/2021\/01\/28\/my-quick-ways-to-auto-format-code-in-vscode\/","url_meta":{"origin":323,"position":4},"title":"My Quick Ways to Auto Format Code in VSCode","author":"derry","date":"January 28, 2021","format":false,"excerpt":"I don't have much time to format my code to looks neat in VSCode (Ctrl + Shift + I), but the default formatting from Visual Code is not efficient for me. It makes the first bracket on function placed alone in one line. This makes my code longer! If you're\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/01\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/01\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/01\/image.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/01\/image.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":962,"url":"https:\/\/blog.derrylab.com\/index.php\/2022\/05\/31\/how-to-access-som9331-serial-console-in-linux\/","url_meta":{"origin":323,"position":5},"title":"How to Access SOM9331 Serial Console in Linux","author":"derry","date":"May 31, 2022","format":false,"excerpt":"I got this old hackable mini router board. It comes with OpenWRT but I can't seem to connect this via USB Serial. It turns out that the driver is not installed. Installation is quick but there is a minor change needed in order to build the driver on a recent\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/05\/81IfBiOdCvL._AC_SL1500_.jpg?fit=1200%2C982&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/05\/81IfBiOdCvL._AC_SL1500_.jpg?fit=1200%2C982&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/05\/81IfBiOdCvL._AC_SL1500_.jpg?fit=1200%2C982&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/05\/81IfBiOdCvL._AC_SL1500_.jpg?fit=1200%2C982&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/05\/81IfBiOdCvL._AC_SL1500_.jpg?fit=1200%2C982&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":12,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":530,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/323\/revisions\/530"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/media\/405"}],"wp:attachment":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}