How to avoid re-encoding video files during uploading? Dev solution need

Currently reading
How to avoid re-encoding video files during uploading? Dev solution need

2
1
Operating system
  1. Linux
Mobile operating system
  1. Android
Last edited:
hello everyone, I bought the synology Ds218, I need to upload 250gb of photos and videos to Photo Station, I realized that it will take weeks, because without me asking for it a process ffmpeg41 is launched that goes to re-encode the video to a lower resolution, this in addition to taking up more space, slows everything down for me. I would like to avoid this step, and just have one frame of the video as thumbs, in the gallery.
On my own I investigated and tried to figure out how it works, I backed up the postgres db to figure out the folder structure, discovered the @eaDir folder with the thumbs the symlinks and covers and the compressed video, and the /volume1/@appstore/CodecPack/pack/bin/ folder that contains the ffmpeg41 executables etc...

Have you investigated and already have a solution? Can you suggest how to do it if possible?
I'd like to know what process starts and maybe go and change that by preventing it from re-encoding the video and maybe making it copy the same one of very small size all the time, this is because so much when I see Photo Station I have it set to the maximum resolution.

SYNOINDEX_MEDIA_INFO
+++++++++++++++++
22 serialization::archive 17 0 0 0 0 2 1 1
0 0 0 0 60 /volume1/homes/Gerryr76/Photos/2019/Cefalonia/YI4k/YI003701.MP4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 1970-01-01 00:00:00 19 2021-08-05 22:50:28 19 2014-01-02 01:22:27 6.000000000e+00 128098 109263632 102051466 30000 1001 48000 2 3840 2160 85675212 0 0 0 0 4 h264 3 mp4 3 51 6 aac_lc 0 0 3 mp4 0 0 0 0 6 1 1
1 0 0 100 0 0 0 0 0 10 1 1
2 0 0 3840 2160 0 0 0.000000000e+00 0.000000000e+00 0.000000000e+00 0.000000000e+00
+++++++++++++++++

SYNOINDEX_VIDEO_METADATA
+++++++++++++++++
22 serialization::archive 17 0 0 0 0 2 1 1
0 0 0 100 0 0 0 0 0 6 1 1
1 0 0 1 1
+++++++++++++++++

SYNOPHOTO_FILM_H264.mp4 - symbolic link to:
1.SYNOINDEX_MEDIA_INFO
2.SYNOINDEX_VIDEO_METADATA

Thumbs

SYNOPHOTO_FILM_M.mp4 - compressed video
SYNOPHOTO_THUMB_M.jpg - cover
SYNOPHOTO_THUMB_SM.jpg - cover
SYNOPHOTO_THUMB_XL.jpg - cover

a.png


PS: load a video from the web browser, then run this command, you will find the command that is launched with the compression settings, I can't find the script from which it is launched!!!

Bash:
sudo -i
ps -axjf | grep ffmpeg41

Bash:
/var/packages/CodecPack/target/pack/bin/ffmpeg41 -threads 2 -i /volume1/homes/Gerryr76/Photos/2012/YI003501.MP4
 -threads 2 -y -vcodec libx264 -preset superfast -vprofile baseline -level 30 -b:v 2500k -bt 2500k -r 15 -pix_fmt yuv420p -f mp4 -acodec copy -s 1280x720 -aspect 1280:720
 /volume1/homes/Gerryr76/Photos/2012/@eaDir/YI003501.MP4/SYNOPHOTO_FILM_M.mp4.tmp
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Brilliant. Your step by step explanation on the setting of menu under Media Server made me in better...
Replies
6
Views
10,757

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top