Sort and move hevc videos

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
rsmehdi
Posts: 7
Joined: 15 Jun 2021, 21:34

Sort and move hevc videos

Post by rsmehdi »

Hi all
I have a folder under Ubuntu server with hundreds of videos (mkv, mp4) which are in h264 and h265 (hevc) format.
I would like to find 1 solution to sort and move all the hevc videos to a separate folder and leave the h264 in the same place.

Each video is placed in 1 separate folder, this way:

Code: Select all

/home/files/videos/charlie2020/charlie2020.mkv
thank you
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort and move hevc videos

Post by rednoah »

e.g. you can use Plain File Mode for organizing files based on MediaInfo properties:

Code: Select all

filebot -rename -r /home/files/videos --db file --output /home/files/by/codec --format "{video[0].Format}/{fn}"

:idea: You can add the --filter option to select HEVC files only:

Code: Select all

--filter "video[0].Format =~ /HEVC/"

:idea: Use --action TEST for testing.
:idea: Please read the FAQ and How to Request Help.
rsmehdi
Posts: 7
Joined: 15 Jun 2021, 21:34

Re: Sort and move hevc videos

Post by rsmehdi »

Thanks for your help
I'm a beginner and don't know where to start.
Can you give me the steps to use this command.
My files are on an ubuntu 20.10 server without gui.
I installed filebot as well .
But I don't know where to start moving the hevc movies to 1 other folder.
Thank you in advance for your help
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort and move hevc videos

Post by rednoah »

  1. Log-in via SSH
  2. Copy and paste the command above:

    Code: Select all

    filebot -rename -r /home/files/videos --db file --output /home/files/by/codec --format "{video[0].Format}/{fn}" --filter "video[0].Format =~ /HEVC/" --action TEST
  3. (optionally) Adjust input / output path as desired
:idea: Please read the FAQ and How to Request Help.
rsmehdi
Posts: 7
Joined: 15 Jun 2021, 21:34

Re: Sort and move hevc videos

Post by rsmehdi »

Code: Select all

root@ubuntu:~# filebot -rename -r /raid5data/testHEVC/HEVCH264/ --db file --output /raid5data/testHEVC/HEVCMOVED/ --format "{video[0].Format}/{fn}" --filter "video[0].Format =~ /HEVC/" --action TEST
Initialize UserHome folder: /root/snap/filebot/42/data
Initialize Cache folder: /root/snap/filebot/42/data/cache
Initialize Logs folder: /root/snap/filebot/42/data/logs
Initialize TemporaryFiles folder: /root/snap/filebot/42/data/tmp
Initialize new disk cache: /root/snap/filebot/42/data/cache/0
Bad system encoding: ISO-8859-1
* Please configure your locale with LANG=C.UTF-8
* Consider using --mode interactive to enable interactive mode
File does not exist: /raid5data/testHEVC/HEVCH264/
No files selected: [/raid5data/testHEVC/HEVCH264/]
* This process is running within a confined sandbox. Access to the host file system may be restricted.
Rename files using [Plain File]
Failed to identify or process any files
Failure (×_×)⌒☆
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort and move hevc videos

Post by rednoah »

The input folder path you have passed in does not exist:

Code: Select all

File does not exist: /raid5data/testHEVC/HEVCH264/
or appears to not exist due to permissions or sandboxing:

Code: Select all

* This process is running within a confined sandbox. Access to the host file system may be restricted.

:arrow: If you are using snap to install and run software, then you must follow the instructions, otherwise snap confinement will default to restricting file system access:
https://www.filebot.net/linux/snap.html
:idea: Please read the FAQ and How to Request Help.
rsmehdi
Posts: 7
Joined: 15 Jun 2021, 21:34

Re: Sort and move hevc videos

Post by rsmehdi »

my videos are in subfolders.
1 video per folder, which gives this:

Code: Select all

/ raid5data / testHEVC / HEVCH264 / Godzilla HEVC / Godzilla.HEVC.mkv
Image

Image
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort and move hevc videos

Post by rednoah »

rednoah wrote: 16 Jun 2021, 13:57 If you are using snap to install and run software, then you must follow the instructions, otherwise snap confinement will default to restricting file system access:
https://www.filebot.net/linux/snap.html
Please click on the link, and then read the page. If you install filebot via snap install filebot (i.e. without --devmode) then filebot cannot access /raid5data. That's just how snap works.
:idea: Please read the FAQ and How to Request Help.
rsmehdi
Posts: 7
Joined: 15 Jun 2021, 21:34

Re: Sort and move hevc videos

Post by rsmehdi »

Thank you very much it works perfectly.
I was able to move everything to 1 new folder.
Now I find myself with hevc 4k and hevc 1080p movies in the same folder.
I would like to separate them in 1 different folder.
Is that possible?
Thank you
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort and move hevc videos

Post by rednoah »

Yes, same thing, with --format adjusted slightly for your new use case:

Code: Select all

filebot -rename -r /home/files/videos --db file --output /home/files/by/codec --format "{video[0].Format}/{vf}/{fn}" --filter "video[0].Format =~ /HEVC/" --action TEST
:idea: Please read the FAQ and How to Request Help.
rsmehdi
Posts: 7
Joined: 15 Jun 2021, 21:34

Re: Sort and move hevc videos

Post by rsmehdi »

you are a genius, it works perfectly.
I am missing one last thing to sort out and everything will be fine.

All the Series hevc files are mixed up and I wish I had found a way to organize everything neatly.
Each series and movies must be renamed with "year" "codec video" "resolution""codec audio",(series classified by folder and by season)

Code: Select all

Example serie :

"/ Lost / season1 / lost (2004) s01e01 1080p hevc ac3.mkv" 
"/ Lost / season1 / lost (2004) s01e01 1080p h264 aac.mkv" 
etc....

Example movie :

terminator (1984) 1080p Hevc ac3.mkv
terminator (1984) 1080p H264 aac.mkv
terminator (1984) 2160p Hevc aac.mkv
etc..
Thank you for what you are doing to help me make this great software work.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Sort and move hevc videos

Post by rednoah »

Please read the manual, and experiment with all the concepts you have learned:
* https://www.filebot.net/cli.html
* https://www.filebot.net/naming.html


e.g. match movie files and move / rename with custom format:

Code: Select all

filebot -rename -r /input/movies --db TheMovieDB --output /output/movies --format "{ny}/{ny} {vf} {vc} {ac}"

:!: Note that adding "movie / series identification" into the mix changes the original topic significantly, so previous advice may only be applicable partially.
:idea: Please read the FAQ and How to Request Help.
rsmehdi
Posts: 7
Joined: 15 Jun 2021, 21:34

Re: Sort and move hevc videos

Post by rsmehdi »

it works perfectly.

Thank you bro
Post Reply