Post by PaulPost by Carlos E.R.Post by TJPost by Lawrence D'OliveiroPost by Carlos E.R.On the other hand, I find that TV sets support for playing media is
terrible.
Get something like a Kodi box.
Well, the laptop I already have, and would be gathering dust otherwise. Actually, sometimes I run kodi on it.
It is funny, some videos barely run on the laptop using VLC; however, they run fine using kodi.
Even if I recode those videos using ffmpeg, VLC can't play them. Sound is good, video stalls.
Have you tried recoding with Handbrake? It has worked for me in the past.
I haven't, but most tools use the same codec libraries.
time ffmpeg -i Source\ x265\ .mkv \
-map 0 -vf scale=1920:-1 -c:v libx264 -preset slow -crf 22 -tune fastdecode -profile:v baseline -c:a copy -c:s copy \
Dest\ baseline.mkv
time ffmpeg -i Source\ x265\ .mkv \
-map 0 -vf scale=1920:-1 -c:v libx264 -preset slow -crf 22 -tune fastdecode -profile:v main -c:a copy -c:s copy \
Dest\ -\ main.mkv
time ffmpeg -i Source\ x265\ .mkv \
-map 0 -vf scale=1920:-1 -c:v mpeg4 -vtag xvid -qscale:v 3 -c:a copy -c:s copy \
Dest\ xvid.mkv
I have trouble when the video uses x265. x264 is fine, so I was trying to encode to x264. VLC on that laptop has trouble with those (I do the recoding in another machine that is powerful).
But if kodi can display the video, it is less effort and resources to watch the movies in kodi. It is just curious, as both vlc and kodi link the same libx265.so libraries.
Take it all the way back to RAW, then re-code it. Then you can
do bidirectional encoding if you want (for better random seek
behavior). Or for that matter, re-code with only keyframes,
high bitrate, and (almost no) compression :-)
One way to go back to a RAW format, is to store the video frames
as individual pictures in a folder. I've done that before, as
part of experimenting with video.
But don't expect the sound track to stay synchronized. Sound
only remains synced, if the video track and the audio track
have the original timestamps. What you will find on practical
videos, is the sound track speeds up or slows down at random.
If you use a video editor and attempt to "slide" the
sound track with respect to the video track, yes, you can
align the sound at a selected point on the video, but other
parts of the video are then improperly aligned.
Too much work... If kodi can play them, I'm happy.
Some movies have been encoded for 4K and are huge, though.
Post by Paul*******
You can tell the FFMPEG library to use the hardware decoder
in the iGPU, like the Intel QuickSync encoder/decoder or
the like. You don't always have to use the software decoder
for this.
When you re-code using FFMPEG, you can spec hardware decoding
on input of the video, then software re-encode with the rest
of the FFMPEG command. You can even do the entire job
in hardware (about 10x speedup over software method).
But since NVENC and NVDEC are not switched on in the
Linux FFMPEG, you can recompile from source and
use ./configure to add back NVENC and NVDEC.
The CPU in the desktop machine is AMD, and so is the GPU as well.
If you are curious:
Telcontar:~ # inxi -C -GSaz --za --vs
inxi 3.3.31-00 (2023-11-02)
System:
Kernel: 6.4.0-150600.23.42-default arch: x86_64 bits: 64 compiler: gcc
v: 7.5.0 clocksource: tsc available: hpet,acpi_pm
parameters: BOOT_IMAGE=/vmlinuz-6.4.0-150600.23.42-default
root=UUID=<filter> resume=/dev/disk/by-label/nvme-swap splash=verbose
verbose
Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.43 info: xfce4-panel wm: xfwm
v: 4.20.0 dm: 1: GDM v: 45.0.1 2: SDDM note: stopped
Distro: openSUSE Leap 15.6
CPU:
Info: model: AMD Ryzen 5 3600X socket: AM4 bits: 64 type: MT MCP arch: Zen 2
gen: 3 level: v3 note: check built: 2020-22 process: TSMC n7 (7nm)
family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701034
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
L3: 32 MiB desc: 2x16 MiB
Speed (MHz): avg: 2350 high: 2800 min/max: 2200/4409 boost: enabled
base/boost: 3800/4400 scaling: driver: acpi-cpufreq governor: ondemand
volts: 1.1 V ext-clock: 100 MHz cores: 1: 2800 2: 2800 3: 2200 4: 2800
5: 2200 6: 2200 7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2200
bogomips: 91203
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities: <filter>
Graphics:
Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: Micro-Star MSI driver: amdgpu v: kernel arch: GCN-4
code: Arctic Islands process: GF 14nm built: 2016-20 pcie: gen: 3
speed: 8 GT/s lanes: 16 ports: active: DVI-D-1 empty: DP-1, DP-2,
HDMI-A-1, HDMI-A-2 bus-ID: 27:00.0 chip-ID: 1002:67df class-ID: 0300
temp: 37.0 C
Display: unspecified server: X.Org v: 1.21.1.11 with: Xwayland v: 24.1.1
compositor: xfwm v: 4.20.0 driver: X: loaded: amdgpu
unloaded: fbdev,modesetting,vesa dri: radeonsi gpu: amdgpu
display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26")
s-diag: 584mm (22.99")
Monitor-1: DVI-D-1 mapped: DVI-D-0 model: Acer H243HX serial: <filter>
built: 2009 res: 1920x1080 hz: 60 dpi: 92 gamma: 1.2
size: 531x298mm (20.91x11.73") diag: 604mm (23.8") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
API: OpenGL v: 4.6 vendor: amd mesa v: 23.3.4 glx-v: 1.4 es-v: 3.2
direct-render: yes renderer: AMD Radeon RX 580 Series (radeonsi polaris10
LLVM 17.0.6 DRM 3.57 6.4.0-150600.23.42-default) device-ID: 1002:67df
memory: 7.81 GiB unified: no
API: Vulkan v: 1.3.275 layers: 1 device: 0 type: discrete-gpu name: AMD
Radeon RX 580 Series (RADV POLARIS10) driver: N/A device-ID: 1002:67df
surfaces: xcb,xlib
API: EGL Message: EGL data requires eglinfo. Check --recommends.
Telcontar:~ #
Post by PaulDoing this stuff, is more of a "hobby" than a ten minute
project :-) All I wanted to learn, is how long would it
take me to fix a video. My answer to that is
"book two weeks of your time for it".
Argh!
--
Cheers, Carlos.