Monday, February 24, 2025

How to watch USB traffic using Wireshark

 

macOS

Capturing USB traffic on macOS is possible since Wireshark 2.4.0, libpcap 1.9.0, and macOS High Sierra, using the XHC20 interface.

In order to capture on that interface, you will first have to run the command

ifconfig XHC20 up

as root, for example by running

sudo ifconfig XHC20 up

https://wiki.wireshark.org/CaptureSetup/USB

Thursday, February 6, 2025

How to convert a MOV file to a MP4 from a Mac terminal

 

download using python 

brew install yt-dlp ffmpeg

update .bash_profile with this function (remember to source)

convert_to_mp4() {
    if [ -z "$1" ]; then
        echo "Usage: convert_to_mp4 <input_file>"
        return 1
    fi

    input_file="$1"
    output_file="${input_file%.*}.mp4"

    ffmpeg -i "$input_file" -vcodec h264 -acodec aac "$output_file"
    echo "Converted: $input_file -> $output_file"
}

How to save YouTube to mp3

download using python 

brew install yt-dlp ffmpeg

command

yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" "YOUTUBE_URL"

save it to .bash_profile as a function (remember to source)


ytmp3() {
    yt-dlp -x --audio-format mp3 --audio-quality 0K -o "%(title)s.%(ext)s" "$1"
}