Tuesday, 28 January 2025

超简单!白嫖本地AI工具:Ollama 和 LM Studio 教程 - Steal This Trick! Free Local AI Tools: Ollama and LM Studio Tutorial

本地 AI 自由,开启无限可能 - Local AI Freedom, Unleash Infinite Possibilities

宝子们,今天给大家分享两款超绝的本地 AI 工具,能让你实现 AI 自由,还不花一分钱!

一、Ollama:极简上手

Ollama 这个工具,用起来简单得很。先去它官网,点 Github 链接,有两种下载方式,安装包下载更方便,手动安装适合爱折腾的小伙伴。安装好后,回到首页,点击 “Explor models”,就能挑选你心仪的 AI 大模型下载啦。下载完,打开终端,就能用起来。比如你下的是 Llama 3.2,启动命令就是 “ollama run llama3.2”,启动后直接问问题,不想用了输入 “/bye” 退出,就这么简单!

二、LM Studio:图形界面超友好

LM Studio 也很不错,官网无需魔法就能访问,直接下载安装包安装。它有个图形化界面,快速教程没啥用,咱可以跳过。一开始没模型,点击左侧第四个按钮,就能搜索下载模型。要是在 “魔法地区”,去抱脸网其镜像网站下载就行。点击左侧边栏第三个按钮,还能改模型存放位置。

下载好模型,在左侧边栏点击第一个按钮加载模型,不想用了点 “Eject” 去掉。以流行的 Deepseek 模型为例,问它能不能搜索在线信息,答案是否定的,但它会给其他搜索引擎信息;问它最新知识库,是 2024 年 7 月的。试了下 “奶奶秘药” 问题,它直接给了段代码,能在本地无限生成呢。当然,不知道这些秘药是否能用。清除历史记录也一键搞定。

三、结合工作:以翻译软件为例

LM Studio 个人免费使用,还能和工作结合。在左侧边栏点击第二个按钮加载模型,右侧边栏 “API Usage” 会提供 API 名字和本地服务器 IP 地址。以翻译软件为例,打开设置页面,选 “更多翻译服务”,“Add OpenAI compatible service”,自定义服务名,复制粘贴 IP 地址,API Key 随便写,再复制粘贴模型名,点 “Verify service”,出现 “Successful” 绿标就设置成功啦,不想用了删除也方便。

这两款本地 AI 工具,没有复杂限制,用起来超自由,赶紧试试,开启你的 AI 新体验!



Hey guys, today I'm going to share two awesome local AI tools that can give you AI freedom without spending a penny!


1. Ollama: Extremely Easy to Get Started

Ollama is very simple to use. First, go to its official website and click the Github link. There are two download methods. Downloading the installation package is more convenient, while manual installation is for those who like to tinker. After installation, go back to the home - page and click "Explor models" to select and download your favorite AI large - model. After downloading, open the terminal and start using it. For example, if you download Llama 3.2, the startup command is "ollama run llama3.2". After startup, you can directly ask questions. If you don't want to use it anymore, just enter "/bye" to exit. It's that simple!


2. LM Studio: User - friendly Graphical Interface

LM Studio is also great. Its official website can be accessed without "magic". Just download the installation package and install it. It has a graphical interface, and the quick tutorial is not very useful, so we can skip it. At the beginning, there is no model. Click the fourth button on the left to search for and download models. If you are in a "magic area", you can go to Hugging Face or its mirror website to download models. Click the third button on the left - hand sidebar to change the storage location of the AI large - model.

After downloading the model, click the first button on the left - hand sidebar to load the model. If you don't want to use it anymore, click "Eject" to remove it. Taking the popular Deepseek model as an example, when we ask if it can search for online information, the answer is no, but it will provide information about other search engines. When we ask about its latest knowledge base, it is July 2024. We tried the "Grandma's Secret Medicine" question, and it directly gave a piece of code that can generate Grandma's Secret Medicine infinitely locally. Of course, I don't know if these secret medicines work. Clearing the history is also a one - click thing.


3. Combining with Work: Taking a Translation Software as an Example

LM Studio is free for personal use and can be combined with work. Click the second button on the left - hand sidebar to load the model. The "API Usage" on the right - hand sidebar will provide the API name and the local server IP address. Taking a translation software as an example, open the settings page, select "More translation services", "Add OpenAI compatible service", customize the service name, copy and paste the IP address, write any API Key, and then copy and paste the model name. Click "Verify service", and if a green "Successful" label appears, the setting is successful. If you don't want to use it anymore, it's easy to delete.

These two local AI tools have no complicated restrictions and are extremely free to use. Try them out quickly and start your new AI experience!


Friday, 17 January 2025

还在为科学上网发愁?eSIM 卡快安排上 - Struggling to Scientific Internet Access? Get eSIM Card Now

告别高价代理和建站折腾,一张eSIM卡,轻松稳定翻墙!- Say Goodbye to Expensive Proxies and Server Troubles, One eSIM, Easy Access, Stable as a Rock!

各位小伙伴,圣诞的钟声刚过,春节的脚步就近了。是不是已经开始盘算着回国和亲朋好友团聚了?但是,等等!回国之后,科学上网又成了老大难问题。别慌,今天就给大家安利一个超简单的翻墙神器——eSIM卡!


咱都知道,科学上网的法子五花八门,买代理吧,那价格贵,感觉钱包都在 “嗷嗷” 叫;自己建节点呢,虽说听起来挺酷,但没点技术功底,根本玩不转,搞不好还容易陷入各种麻烦事儿里。这时候,eSIM 卡就闪亮登场啦,妥妥的性价比之王,折衷的绝佳选择!用它来科学上网,费用亲民得很,一点也不用担心会让你的荷包大出血。而且信号稳稳当当的,刷视频、聊微信、查资料,干啥都流畅,就跟在本地网络环境似的。最让人省心的是,啥时候不需要了,手指轻轻一点,就能取消,简直不要太方便!


那这神奇的 eSIM 卡到底是啥玩意儿呢?其实它本质上就是个嵌入式的 SIM 卡,跟咱传统手机里插的物理 SIM 卡可不一样,人家根本不需要卡槽,简单来说,eSIM 卡就是个二维码。激活之后,嘿,科学上网的大门就敞开啦!它的好处啊,一只手都数不过来。首先,没卡槽,安装的时候不用费劲找卡针,也不用担心卡槽坏了,手机轻轻一扫,就能用,方便得很。其次,一台手机能同时加载好几个 eSIM 卡,出国旅游、回国探亲,不同地区的网络需求轻松切换,就像拥有好几个 “网络小助手”。再者,激活就能上网,不用眼巴巴地等运营商开通,那速度,杠杠的。最后,安全性超高,不想用的时候,一键取消,啥后顾之忧都没有。


想买 eSIM 卡也不难,roamless、felixmobile、Holafly、one NZ 这些网站都是靠谱的购买地。买的时候,准备好电子邮箱、手机号,还有驾照或者护照就行。操作步骤也简单,先在网站上买张空的 sim 卡,接着购买 eSIM 服务,等收到二维码,赶紧拿手机一扫,激活,齐活儿,就能愉快上网啦!不过要注意哦,这一套流程比较适合国外买的手机,而且手机得有 eSIM 功能,一般运营商都会贴心地列出支持的最低要求移动设备清单,买之前瞅一眼就行。要是你的手机是国内制造的,大概率没有 eSIM 功能,别着急,去淘宝花个 100 人民币左右买张 5ber 卡,这可是带有 eSIM 功能的物理 sim 卡,店家还会手把手教你咋用,有了它,国内手机也能顺利激活 eSIM 卡,不管这 eSIM 卡是从国内还是国外买的。对了,买 eSIM 卡的时候,记得看清楚,有的是全球包邮,有的可要自己掏运费哦。


还有个小细节得提醒大伙,一般 eSIM 卡都是 prepay 卡,得身份验证通过了才能激活,千万别马虎。另外,买的时候一定要确认有没有流量,有些 eSIM 卡是专门用来发短信用的,要是没流量,可没法实现科学上网,到时候干着急就不好啦。


总之呢,eSIM 卡就是咱回国上网的 “秘密武器”,不贵又好用,方便还灵活,有了它,科学上网再也不是难题!这个假期,不管是圣诞还是春节,让咱们轻松畅享网络,和家人朋友愉快畅聊,赶紧安排起来吧!



Hey folks, Christmas is over, and Chinese New Year is just around the corner. Are you already planning your trip back home to reunite with family and friends? But wait! After returning to PRC, the scientific internet access becomes challenge. Don't worry, today I'm recommending a super easy solution – the eSIM card!


We all know that there are various ways to access the Internet scientifically. Buying a proxy is ridiculously expensive, making your wallet cry. Building your own node sounds cool, but without technical skills, it's impossible to handle and might get you into trouble. At this time, the eSIM card comes to the rescue as the king of cost performance and the perfect compromise! Using it for scientific Internet access is affordable and won't drain your wallet. Moreover, the signal is stable. Whether you're watching videos, chatting on WeChat, or looking up information, everything runs smoothly as if you were in a local network environment. The most reassuring thing is that when you don't need it anymore, with a simple click, you can cancel it. It's incredibly convenient!


So, what on earth is this magical eSIM card? Essentially, it's an embedded SIM card, different from the physical SIM card we insert into our traditional mobile phones. It doesn't need a slot. Simply put, an eSIM card is like a QR code. Once activated, voila! The door to scientific Internet access opens wide! Its benefits are too numerous to count. Firstly, without a slot, installation is a breeze. No need to fumble for a SIM card ejector tool or worry about a broken slot. Just scan it with your phone and you're good to go. Secondly, a single phone can load multiple eSIM cards. When traveling abroad or visiting relatives back home, you can easily switch between different regional network requirements, like having several "network assistants". Thirdly, once activated, you can surf the Internet immediately without waiting for the operator to activate it. The speed is amazing! Lastly, it's highly secure. When you don't want to use it, just cancel it with one click and you have no worries.


It's not difficult to buy an eSIM card. Websites like roamless, felixmobile, Holafly, and one NZ are reliable purchase platforms. When buying, just prepare your email address, phone number, and driver's license or passport. The operation steps are as easy as "1 + 1". First, buy an empty SIM card on the website. Then, purchase the eSIM service. Once you receive the QR code, quickly scan it with your phone, activate it, and you're all set to surf the Internet happily! However, note that this process is more suitable for mobile phones purchased overseas and the phone must have eSIM functionality. Generally, operators will kindly list the minimum requirements for supported mobile devices. Just take a look before buying. If your phone is made in China, it probably doesn't have eSIM functionality. Don't worry. Spend about 100 RMB on Taobao to buy a 5ber card. This is a physical SIM card with eSIM functionality and the shopkeeper will teach you how to use it. With it, domestic mobile phones can also activate eSIM cards smoothly, regardless of whether the eSIM card is purchased domestically or overseas. By the way, when buying an eSIM card, remember to check carefully. Some are globally free shipping, while some require you to pay for the shipping cost.


There's one more small detail to remind everyone. Generally, eSIM cards are prepay cards and need to pass identity verification before activation. Don't be careless. Also, when buying, make sure there is traffic. Some eSIM cards are specifically for sending text messages. If there is no traffic, you won't be able to achieve scientific Internet access and you'll be in a hurry.


In conclusion, the eSIM card is our "secret weapon" for accessing the Internet back home. It's inexpensive, easy to use, convenient, and flexible. With it, scientific Internet access is no longer a problem! This holiday season, whether it's Christmas or the Spring Festival, let's enjoy the Internet easily and chat happily with our families and friends. Hurry up and get it!


Tuesday, 14 January 2025

Win Bat 批处理带货切片


有的小伙伴需要把我之前一个视频切片的批处理文件变成windows可用的bat文件。文件名字qiepian.bat,代码如下:

```

@echo off


:: Define variable

set SOME_VAR=C:\cygwin\path


:: Remove directory if it exists

if exist "%SOME_VAR%" (

    rd /s /q "%SOME_VAR%"

) else (

    echo "file not found"

)


:: Copy a file

copy /y "C:\some\file" "C:\to\another\file"


:: Check if variable is empty

if "%SOME_VAR%"=="" (

    echo "SOME_VAR is empty"

) else (

    echo "SOME_VAR not empty"

)


:: Define a function

call :my_function

call :my_function "some param"

goto :eof


:my_function

echo hello from my_function: %~1

goto :eof

```

运行也简单,这样就好: qiepian.bat 

Sunday, 12 January 2025

ffmpeg一键切片,带货切片视频so easy - ffmpeg One-Click Slicing, E-commerce Videos So Easy

手残党福音!一行命令搞定带货切片,躺着也能赚!- For the Clumsy! One Command to Create Product Clips, Earn While You Relax!

还在苦哈哈地手动剪辑带货视频?还在对着冗长的直播录像抓耳挠腮,不知道哪段能成爆款?别愁了!ffmpeg来拯救你!这可是个免费又强大的神器,能帮你一键切片,快速生成带货短视频,简直不要太爽!


为啥要用ffmpeg切片?因为咱普通人做带货,爆款这玩意儿,说白了就是撞大运。与其花大把时间在那儿精雕细琢,不如广撒网多捞鱼,多切几个视频上传,说不定哪个就火了呢?用ffmpeg切片,效率高到飞起,省下来的时间可以用来刷剧、带娃、甚至发呆,岂不美哉?(土豪请随意,咱比不了~)


想用ffmpeg切片,就得用到它的“segment”功能。中庸之道,截弯取直,直接上命令:

```

ffmpeg -i {theVideoName}.mp4 -c copy -map 0 -f segment -segment_time {how_many_seconds} -segment_list video-list.txt -reset_timestamps 1 {theVideoName}-%03d.mp4
```

看不懂?没关系,我来给你掰开了揉碎了讲:


{theVideoName}.mp4:就是你的原视频文件名。

{how_many_seconds}:你想切成多长的视频,单位是秒。比如15秒就填15,4分钟就填240。

-c copy:这是重点!直接复制视频流,不重新编码,速度快到你怀疑人生,而且画质无损!

-map 0:确保视频里的声音也一起切进去。

-segment_time:设置切片时长。

-segment_list video-list.txt:生成一个文件,记录切片信息,以后想合并视频就靠它。

-reset_timestamps 1:让每个切片的时间都从0开始。

运行完命令,你会得到一堆 {theVideoName}-000.mp4、{theVideoName}-001.mp4 这样的文件,还有个 video-list.txt。


嫌命令行麻烦?没问题!咱还可以做个批处理文件(Mac → .sh, Windows → .bat)。


新建一个 qiepian.sh 文件:touch qiepian.sh

用 Vim 打开:vi qiepian.sh

把这段代码复制粘贴进去···

#!/bin/bash


echo "Please drag and drop the video file here, then press Enter:"

read videoFile


videoFile="${videoFile//\"/}"


if [[ ! -f "$videoFile" ]]; then

  echo "Error: File not found. Please ensure the file path is correct."

  exit 1

fi


echo "Enter the segment duration in seconds (e.g., 15):"

read segmentDuration


if ! [[ "$segmentDuration" =~ ^[0-9]+$ ]]; then

  echo "Error: Invalid duration. Please enter a valid number."

  exit 1

fi


baseName=$(basename "$videoFile" .mp4)


# Run the FFmpeg command

ffmpeg -i "$videoFile" -c copy -map 0 -f segment -segment_time "$segmentDuration" -segment_list video-list.txt -reset_timestamps 1 "${baseName}-%03d.mp4"


echo "Video has been split into segments of $segmentDuration seconds. Check the output files in the current directory."

···,保存退出(按esc,输入:wq)。

给文件加个可执行权限:chmod +x qiepian.sh

以后想切片,直接在终端输入 ./qiepian.sh 就OK啦!是不是超简单?


有了ffmpeg这个免费又高效的利器,带货切片视频还不是分分钟搞定?赶紧试试吧!



Tired of painstakingly manually editing product promotion videos? Frustrated staring at lengthy live recordings, unsure which segment will become a hit? Worry no more! ffmpeg is here to save the day! This free and powerful tool helps you slice videos with one click, quickly generating short videos for e-commerce, it's simply awesome!


Why use ffmpeg for slicing? For us ordinary folks doing online sales, achieving a viral product is mostly a matter of luck. Instead of spending tons of time meticulously editing, why not cast a wide net? Slice more videos and upload them; who knows which one will take off? Using ffmpeg for slicing is super-efficient, and you can use the saved time to binge-watch shows, take care of your kids, or even just chill! (For the big spenders, do as you please, we can't compete~)


To use ffmpeg for slicing, you'll need its "segment" function. Let's get straight to the point with a practical command example:


ffmpeg -i {theVideoName}.mp4 -c copy -map 0 -f segment -segment_time {how_many_seconds} -segment_list video-list.txt -reset_timestamps 1 {theVideoName}-%03d.mp4

Don't understand it? No worries, I'll break it down for you:


{theVideoName}.mp4: This is your original video file name.

{how_many_seconds}: This is the desired length of each video segment in seconds. For example, enter 15 for 15 seconds, or 240 for 4 minutes (240 seconds).

-c copy: This is key! It directly copies the video stream without re-encoding, making it incredibly fast and preserving the original quality!

-map 0: Makes sure the audio is also included in the segments.

-segment_time: Sets the segment duration.

-segment_list video-list.txt: Generates a file recording segment information, useful if you want to merge videos later.

-reset_timestamps 1: Resets the timestamp of each segment to start from 0.

After running the command, you'll get a bunch of files like {theVideoName}-000.mp4, {theVideoName}-001.mp4, and a video-list.txt.


Don't like using the command line? No problem! We can also create a batch file (a .sh file on Mac).


Create a qiepian.sh file: touch qiepian.sh

Open it with Vim: vi qiepian.sh

Copy and paste the code ```

#!/bin/bash


echo "Please drag and drop the video file here, then press Enter:"

read videoFile


videoFile="${videoFile//\"/}"


if [[ ! -f "$videoFile" ]]; then

  echo "Error: File not found. Please ensure the file path is correct."

  exit 1

fi


echo "Enter the segment duration in seconds (e.g., 15):"

read segmentDuration


if ! [[ "$segmentDuration" =~ ^[0-9]+$ ]]; then

  echo "Error: Invalid duration. Please enter a valid number."

  exit 1

fi


baseName=$(basename "$videoFile" .mp4)


# Run the FFmpeg command

ffmpeg -i "$videoFile" -c copy -map 0 -f segment -segment_time "$segmentDuration" -segment_list video-list.txt -reset_timestamps 1 "${baseName}-%03d.mp4"


echo "Video has been split into segments of $segmentDuration seconds. Check the output files in the current directory."

```, then save and exit (press esc, type :wq).

Give the file execute permission: chmod +x qiepian.sh

Now, when you want to slice a video, just enter ./qiepian.sh in the terminal! Isn't it super easy?


With ffmpeg, this free and efficient tool, creating product video clips is a piece of cake! Go ahead and give it a try!


Saturday, 4 January 2025

视频处理不用愁,FFmpeg三招就够 - Video Processing Made Easy: Three FFmpeg Tricks You Need

格式转换、合并、去水印,FFmpeg一键搞定,效率翻倍!- Convert, Merge, Remove Watermarks—FFmpeg Does It All, Boosting Your Efficiency!


自媒体和视频剪辑的小伙伴们,是否经常头疼于视频格式不兼容、视频合并繁琐以及水印难以去除的问题?别急,FFmpeg来帮忙,轻松快速解决你的视频处理难题。

FFmpeg是啥?为啥说它对新手友好?

FFmpeg是一个强大的命令行工具,可以处理各种音视频任务。你可能会觉得命令行听起来很复杂,但其实用起来非常简单。就像学会用计算器一样,掌握几个基本命令,就能解决大部分问题。而且,FFmpeg是免费的!白嫖的快乐,谁用谁知道!

安装FFmpeg,简单!

FFmpeg可以在官网和Github上下载,如果你是Mac用户,并且安装了Homebrew,那就更方便了,一条命令搞定:brew install ffmpeg。安装完成后,打开终端(Windows用户需要配置环境变量),输入ffmpeg -h,就能看到各种帮助信息。

三招教你玩转FFmpeg!

为了方便演示,我们把输入文件统一命名为input.mp4,输出文件统一命名为output.mp4

第一招:闪电格式转换

格式转换是视频处理中最常见的需求之一。FFmpeg的强大之处在于,它可以在不重新编码的情况下进行格式转换,速度飞快,而且画质几乎没有损失!

命令如下:

ffmpeg -i input.mp4 output.mov


就这么简单!一行命令就把input.mp4转换成了output.mov

第二招:合并视频,井井有条

需要合并大量视频?别再手动拖拽了!FFmpeg帮你轻松搞定!首先,需要创建一个文本文件(例如concat.txt),在里面列出需要合并的视频文件:

file 'input1.mp4'

file 'input2.mp4'

file 'input3.mp4'

...


然后,使用以下命令:

ffmpeg -f concat -i concat.txt -c copy output.mp4


-c copy表示直接复制视频流和音频流,避免重新编码,速度更快。

第三招:去除水印,不费力

去除水印是个技术活,根据水印的类型和视频内容,方法各不相同。FFmpeg提供了delogo滤镜,可以简单去除一些静态水印。但对于复杂的水印,建议使用专业的去水印软件。

命令如下:

ffmpeg -i input.mp4 -vf delogo=x=100:y=100:w=200:h=100 output.mp4


其中,xy是水印左上角的坐标,wh是水印的宽度和高度。你需要根据实际情况调整这些参数。

总结:FFmpeg,新手也能轻松上手!

FFmpeg功能强大,用法灵活,绝对是自媒体和视频剪辑小伙伴的得力助手。别再为视频处理问题烦恼了,赶紧来试试FFmpeg吧!你会发现,原来视频处理可以这么简单!


Title: Video Processing Made Easy: Three FFmpeg Tricks You Need

Self-media and video editing folks, do you often get frustrated with incompatible video formats, the hassle of merging videos, and the difficulty of removing watermarks? Fear not, FFmpeg is here to help, easily and swiftly solving your video processing challenges.

What is FFmpeg? Why is it Beginner-Friendly?

FFmpeg is a powerful command-line tool that can handle various audio and video tasks. You might think command lines sound complicated, but they're actually very easy to use. Just like learning to use a calculator, mastering a few basic commands can solve most problems. Plus, FFmpeg is free! The joy of getting something for free, everyone who uses it knows!

Installing FFmpeg is Easier Than Drinking Water!

FFmpeg can be downloaded from the official website and Github. If you're a Mac user and have Homebrew installed, it's even more convenient, just one command: brew install ffmpeg. After installation, open your terminal (Windows users need to configure environment variables), type ffmpeg -h, and you'll see various help information. 

Three Tricks to Master FFmpeg!

For demonstration purposes, we'll name the input file input.mp4 and the output file output.mp4.

Trick 1: Format Conversion, Fast as Lightning!

Format conversion is one of the most common needs in video processing. FFmpeg's strength is that it can perform format conversion without re-encoding, which is super fast and results in almost no loss of quality!

The command is as follows:

ffmpeg -i input.mp4 output.mov


That's it! One line of command converts input.mp4 to output.mov.

Trick 2: Video Merging, Well Organized!

Need to merge a large number of videos? Stop dragging and dropping manually! FFmpeg can easily handle it for you! First, you need to create a text file (e.g., concat.txt) and list the video files to be merged:

file 'input1.mp4'

file 'input2.mp4'

file 'input3.mp4'

...


Then, use the following command:

ffmpeg -f concat -i concat.txt -c copy output.mp4


-c copy indicates directly copying the video and audio streams, avoiding re-encoding and making it faster.

Trick 3: Removing Watermarks, a Little Trick!

Removing watermarks is a technical task, and the method varies depending on the type of watermark and the video content. FFmpeg provides the delogo filter, which can simply remove some static watermarks. But for complex watermarks, it is recommended to use professional watermark removal software.

The command is as follows:

ffmpeg -i input.mp4 -vf delogo=x=100:y=100:w=200:h=100 output.mp4


Where x and y are the coordinates of the top-left corner of the watermark, and w and h are the width and height of the watermark. You need to adjust these parameters according to the actual situation.

Conclusion: FFmpeg, Easy to Use Even for Beginners!

FFmpeg is powerful, flexible, and definitely a great assistant for self-media creators and video editing enthusiasts. Stop worrying about video processing problems and try FFmpeg! You'll find that video processing can be so easy!