can’t believe how long I’ve suffered through “Argument 'abc.mp4' provided as input filename, but 'xyz.mp4' was already specified” errors before writing this little function to support `ffprobe *.mp4`: https://github.com/lucaswerkmeister/home/commit/7592c816bd

#ffmpeg #ffprobe

Add ffprobe function that supports multiple files · lucaswerkmeister/home@7592c81

So I can conveniently probe multiple files at once, e.g. via a glob.

GitHub

Keeping kDrive Tidy Despite iOS

Reading Time: 3 minutes

One of the many iOS flaws is that if you download photos and videos it defaults to throwing them into your photo album, whether they're yours, and that's why it's good to tidy up. For the tidying up effort today I used ffprobe, find and the kDrive desktop drive, as well as terminal and a secure shell.

The premise is that as you're living your life, activity friends, family and apps like TikTok all post files, that you might or might not download intentionally. I'd recommend downloading them intentionally. We'll cover this shortly.

RSYNC

Due to having at least two phones over the years I had two folders with photos that needed to be consolidated. I used rsync to consolidate both folders and then deleted the 8plus folder that no longer had a reason to be.

FFProbe

I started the day with the premise that apple Photos took .mov videos and apps like Whatsapp, Signal and TikTok used mp4 files. I used find to clear up the mess of MP4 files, and got them sorted chronologically. I was pleasantly surprised to see that whatsapp and other files were sorted into their own folders.

It's with disappointment that I noticed that TikTok saves part of the messy files as .mov files. If I used exiftool then I could setup a filter "if video files do not mention iphone, add them to sorted, and leave the others as they are". The issue is that exiftool is slow.

I asked Euria for help and it suggested FFProbe so I experimented with it. I told it, find all non 1920,1080 videos and move them to sorted, so it wrote a shell script to do that. It worked well enough but I still double checked what it had moved. Eventually, when I got to videos that I shot in 4K I asked it to widen what it kept, so it re-wrote the shell script.

For once I sorted each year, one at a time, from 2023-2026. It was fast, and effective. In some cases I rescued files from the sorted folder that I wanted to keep.

My rational behind creating a "sorted" folder, per month, was so that I could then get a script to move the "sorted" video files chronologically into the "chaff" folder that I setup this morning.

If I had done this with exiftool or manually it would have taken ages. By getting a simple tool to do this task it took seconds per year.

Much Tidier

The photos backup folder that syncs from my phone to kDrive, and from kDrive to my desktop started the day without about 400gb of files. After some quick tidying this morning, thanks to shell scripts and the command line I got it down to 90GB.

The next step is to reconcile those 90GB of photos with the main photo library I have. Once the two are merged my kDrive phone photos backup folder could be nearly empty.

And Finally

One of the key advantages of using kDrive, rather than Google Photos, Apple Photos, Flickr and other cloud solutions is that you can tidy directly from the command line with a few practical prompts. Doing the same in a web browser takes hours. I know because I tried.

Having a local copy of what's in the cloud allows you to clean up within minutes, for free. No need for expensive apps. You're in full control. Once you're done it propagates back to the server.

TLDR

I mention kDrive but Google Drive, iCloud, One Drive and most other solutions offer the same flexibility. If you store photos within folders and files, rather than photos app, data migration is simplified.

#ffprobe #find #infomaniak #iOS #kdrive

File vs. #ffprobe auf Linux um Bitraten zu erkennen

https://guerda.de/posts/bitrate-file-vs-ffprobe/

Kontext: ich bin in eine Falle getappt, siehe https://ruhr.social/@guerda/115678839962164794

Bitrate file vs ffprobe

Bitrate mit file und ffprobe erkennen Ich habe in letzter Zeit versucht, MP3-Dateien mit schlechter Audioqualität zu finden. Hier ist meine Erfahrung, um euch vor Datenverlust zu bewahren. Ich habe file genutzt, um Dateien mit Bitraten von unter 90 kBit/s zu identifizieren. Ich habe mit einem schnellen Befehl einige Dateien gefunden und wollte sie schon löschen. file *.mp3 Leider zeigt file falsche Werte an, vor allem für Dateien mit variabler Bitrate (VBR). Bei diesen Dateien ist die von file angezeigte Bitrate deutlich niedriger als die korrekte Bitrate.

guerdas Sammlung
TIL ffprobe -show_frames can be quite a lot slower than ffmpeg ... -f null - etc because it sets thread count to 1 to get more reliable frame order (between streams i guess?). But you can do ffprobe -thread auto etc to go faster 🚀
#ffmpeg #ffprobe
🌘 運用 Python 偵測 AV1 編碼影片
➤ 從找出 AV1 影片到自動化測試,讓你的媒體庫保持流暢
https://alexwlchan.net/2025/detecting-av1-videos/
作者分享如何使用 Python 偵測 AV1 編碼的影片,以便將無法在舊裝置上播放的影片轉換為較舊的編碼格式。文章介紹了兩種方法:利用 `ffprobe` 命令列工具,以及更快速且直接的 `pymediainfo` Python 套件。最終,作者將這些方法整合到一個 pytest 測試中,用以掃描整個影片庫並找出所有 AV1 編碼的 MP4 檔案,確保所有影片都能順暢播放。
+ 這篇文章的實用性很高!我正好有類似的問題,不知道如何批量找出那些不相容的影片。ffprobe 的方法很詳細,不過 pymediainfo 聽起來確實更有效率。
+ 寫測試來解決問題是很棒的做法。作者很細心地解釋了 ffprobe 和 MediaInfo 的指令,以及為什麼 pymediainfo 的方法更快。最後的 pyt
#Python #影片編碼 #AV1 #ffprobe #MediaInfo
Detecting AV1-encoded videos with Python

I wrote a Python test to find videos that are encoded with AV1, so I can convert them to a codec my iPhone can play.

Using ffprobe -of json? protip when debugging: add -show_optional_fields always for less confusion.
#ffmpeg #ffprobe

To the #ffmpeg and #ffprobe users:

What 'interesting' data can be extracted from a single video frame? I'm toying with the idea of extracting a data from every frame of a video, exporting as CSV file and using that as input data for a synthesis or audio processing setup in Supercollider.

J'ai cassé mon instance #mastodon à cause d'une maj #debian et ce n'est pas la première fois. Une maj=un prog qui ne démarre plus. On va faire comme avec les médicaments, si #mastodon ne supporte pas son nouveau traitement #ruby donnez lui un générique. J'ai eu la même avec #PeerTube qui n'a pas aimé le #ffmpeg et #ffprobe remplacés par la maj #debian mais là c'était fourbe parce que je ne savais pas que mon instance refusait les uploads de vidéos jusqu'à que je teste et personne ne dit rien !🤬

@sundogplanets

For completeness:

To find out the dimensions of a video, use #ffprobe, part of the #ffmpeg suite:

$ ffprobe -v error -show_entries stream=width,height -of default=noprint_wrappers=1 source-video.mp4

To extract images from a movie, at 10 frames per second:

$ ffmpeg -i source-video.mp4 -vf fps=10 slice-%d.png

To cut a video from time 5 seconds to time 12 minutes and 20 seconds (12*60+20=740, minus 5 gives 735; -ss is the start, and -t the duration from that point onwards):

$ ffmpeg -ss 5 -t 735 -i source-video.mp4 -vcodec libx265 -strict -2 lecture- cropped.mp4

To scale a video down to half the area (50% of width and height), add this image filter to the arguments, where "iw" is the input video width, and "ih" the input video height:

-vf "scale=iw/2:ih/2"

To concatenate videos, create a text file with the file path to each of the videos, name it "cuts.txt", and then:

$ ffmpeg -f concat -i cuts.txt -c copy video-edited.mp4

FFmpeg stands for " Fast Forward MPEG."

MPEG stands for "Motion Picture Experts Group."

FFmpeg is designed for processing video and audio files on the command line. It is widely used for transcoding, basic editing like trimming and concatenation, video scaling and video post-production effects and standards compliance (SMPTE, ITU).

Included with FFmpeg is also FFplay and FFprobe.

FFplay is a simple media player.

FFprobe is a tool to display media information.

#ffmpeg #ffplay #ffprobe