UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Script to convert videos for viewing on Ubuntu Touch

    Scheduled Pinned Locked Moved General
    2 Posts 2 Posters 207 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • BollyB Offline
        Bolly
        last edited by

        Hello I share this script to run it on the PC if anyone can use it.

        The script in this case converts all mp4 and mkv files in the folder where you run it to an Ubuntu Touch readable mp4. The script does not delete the originals, it will put them in the Converted_videos folder at the same level.

        #!/bin/bash
         
        mkdir Converted_videos
         
        for i in *.mp4
        do
            withoutExtension=$(echo "$i" | cut -f 1 -d '.')
            ffmpeg -i "$i" Converted_videos/"$withoutExtension".mp4
        done
         
        for i in *.mkv
        do
            withoutExtension=$(echo "$i" | cut -f 1 -d '.')
            ffmpeg -i "$i" Converted_videos/"$withoutExtension".mp4
        done
        

        I also share the original entry in Spanish
        https://elcondonrotodegnu.wordpress.com/2024/05/28/my-scripts-v-convertir-videos-para-poder-verlos-en-ubuntu-touch-o-en-reproductores-no-compatibles/

        2015-Now (Daily use) : BQ Aquaris E4.5 Ubuntu edition
        2016-Now (Daily use) : BQ Aquaris M10 FHD Betatester

        2020-Now : PinePhone Braveheart & CE UBports
        2020-Now (Family/Daily use): Vollaphone Xenial
        2022-Now (Family/Daily use): Vollaphone 22 Focal

        * 1 Reply Last reply Reply Quote 2
        • * Offline
          *Kasey009* Banned @Bolly
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post