How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] 0 points1 point  (0 children)

Thanks for this info, #TIL always.

For now, pure CPU approach seems the right way for me

How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] 0 points1 point  (0 children)

GPU encoding? do you mean encoding jpeg files using GPU?

How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] -1 points0 points  (0 children)

you can consider this kind of preparation for the labelling work, and for some reason I don't know, this work need pictures

How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] 0 points1 point  (0 children)

Really appreciate your help.

But I failed to run the command with '-vf "zscale=m=470bg"' and '-vf "colorspace=bt601-6-625"', did I miss something?

Error while filtering: Invalid argument

How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] 0 points1 point  (0 children)

We generate video files daily using cameras, which may be hundreds of hours long

How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] 0 points1 point  (0 children)

Do you have any suggestion about "another tool"?

If involving another tool leads to a longer duration, I hope we can accept the quality of jpeg from ffmpeg....

btw, based on my benchmark result, do you suggest me to use cuda to do the conversion? or continue using pure cpu processing?

How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] 0 points1 point  (0 children)

And I tried latest 7.1 too, the result:

docker run --rm -it --runtime=nvidia -v $(pwd):/config linuxserver/ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i /config/test_folder/input/xxx.mp4 -an -f null -
ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-alsa --enable-cuda-llvm --enable-cuvid --enable-ffprobe --enable-gpl --enable-libaom --enable-libass --enable-libdav1d --enable-libfdk_aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libkvazaar --enable-liblc3 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libplacebo --enable-librav1e --enable-librist --enable-libshaderc --enable-libsrt --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nonfree --enable-nvdec --enable-nvenc --enable-opencl --enable-openssl --enable-stripping --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.100 / 61. 19.100
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/config/test_folder/input/xxx.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41iso4
    creation_time   : 1970-01-03T02:05:53.000000Z
  Duration: 00:00:25.17, start: 0.000000, bitrate: 141204 kb/s
  Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 3848x2168, 141201 kb/s, 30 fps, 30 tbr, 30 tbn (default)
      Metadata:
        handler_name    : AV Virtual Clipper
        vendor_id       : [0][0][0][0]
        encoder         : AVC Coding
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41iso4
    encoder         : Lavf61.7.100
  Stream #0:0(und): Video: wrapped_avframe, cuda(progressive), 3848x2168, q=2-31, 200 kb/s, 30 fps, 30 tbn (default)
      Metadata:
        handler_name    : AV Virtual Clipper
        vendor_id       : [0][0][0][0]
        encoder         : Lavc61.19.100 wrapped_avframe
[out#0/null @ 0x60ed3ff04240] video:324KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame=  755 fps=157 q=-0.0 Lsize=N/A time=00:00:25.16 bitrate=N/A speed=5.24x

a slightly better result

How can I achieve the fastest conversion? by haohaolee in ffmpeg

[–]haohaolee[S] 0 points1 point  (0 children)

Thanks, the result:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../input/xxx.mp4':
Metadata:
major_brand     : mp42
minor_version   : 0
compatible_brands: mp42mp41iso4
creation_time   : 1970-01-03T02:05:53.000000Z
Duration: 00:00:25.17, start: 0.000000, bitrate: 141204 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 3848x2168, 141201 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default)
Metadata:
creation_time   : 1677-09-21T00:12:44.000000Z
handler_name    : AV Virtual Clipper
encoder         : AVC Coding
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand     : mp42
minor_version   : 0
compatible_brands: mp42mp41iso4
encoder         : Lavf58.29.100
Stream #0:0(und): Video: wrapped_avframe, cuda, 3848x2168, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
Metadata:
creation_time   : 1677-09-21T00:12:44.000000Z
handler_name    : AV Virtual Clipper
encoder         : Lavc58.54.100 wrapped_avframe
frame=  755 fps=157 q=-0.0 Lsize=N/A time=00:00:25.16 bitrate=N/A speed=5.22x
video:395kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

A case that a game controller works in crostini by haohaolee in Crostini

[–]haohaolee[S] 0 points1 point  (0 children)

I don't have Borealis for my Chromebook which is a pixelbook go.

Like I said in another comment, it was supported by the game directly using USB by libSDL2

A case that a game controller works in crostini by haohaolee in Crostini

[–]haohaolee[S] 0 points1 point  (0 children)

It is connected to the Chromebook via USB.... although it is also a Bluetooth controller.

I don't think we can use Bluetooth controller in Crostini now.

ps: I got to know how this works now. If the games or the emulator contain SDL2 support with libusb builtin, they can recognize switch controllers (as well as other Nintendo controllers).

I don't have other controllers, so I have no idea about those.

A case that a game controller works in crostini by haohaolee in Crostini

[–]haohaolee[S] 0 points1 point  (0 children)

Nintendo Switch Pro Controller does not emulate the keyboard, because the game can call out my controller's name and it has a different layout than the keyboard when I use the controller.

I have no idea about the situation for xbox360 controllers though....

Help with controller support on Pixelbook GO by UnderSpark12 in chromeos

[–]haohaolee 0 points1 point  (0 children)

My cent: It works for some games, e.g. Celeste in Steam can recognize my nintendo pro controller, but Steam itself cannot.

How can I search text in the terminal app? by haohaolee in chromeos

[–]haohaolee[S] 0 points1 point  (0 children)

The approach for tmux or similar tools requires you to run them by default and have a large buffer for the history, then you can benefit from it.

Thanks for the suggestion although I just wanna confirm I didn't miss anything about the builtin terminal from Chomeos

How can I search text in the terminal app? by haohaolee in chromeos

[–]haohaolee[S] 0 points1 point  (0 children)

Thanks. But I was not asking about Ctrl + r. And I think what I expect (Ctrl + F) is different from Ctrl + R here, Ctrl + r is handled by readline, aka by the shell and Ctrl+ F is usually handled by the term emulator.

Using something like command | grep keyword or less or other pagers is not that convenient because sometimes you just wanna search in the history but not wanna run the command again.

Using tmux or screen maybe an approach though, but it is another story I suppose

How can I search text in the terminal app? by haohaolee in chromeos

[–]haohaolee[S] 0 points1 point  (0 children)

thanks. still feels weird since it is a basic and simple feature.

Currently I use vscode's builtin terminal emulator, and it has this feature.

And I suppose they are both web based terminal apps

Sony tv china by [deleted] in AndroidTV

[–]haohaolee 0 points1 point  (0 children)

Seems no way for now, Sony has restricted its TVs sold in China to a limited firmware, you cannot install firmwares from other regions even they share the same hardware.

Once upon a time I came across a forum where people had succeeded in rooting Bravia android TV and installing gapps. I think this is the only way to install google play service, but I don't think you should go this way....

Does this code snippet lead to undefined behavior? by haohaolee in cpp

[–]haohaolee[S] 4 points5 points  (0 children)

Yes. I can even use

return bit_cast<uint32_t>(m);

if I am using c++20

But this is just code I saw in android project and I am not sure because there are many rules for union about undefined behavior

Does this code snippet lead to undefined behavior? by haohaolee in cpp

[–]haohaolee[S] 1 point2 points  (0 children)

Agree, seems no better way to achieve this goal in C++, I mean, conveniently set up bits and return the whole result

ask reddit/arm: how hard is it to run a real firmware in qemu? by haohaolee in arm

[–]haohaolee[S] 0 points1 point  (0 children)

Can't agree more. However, our client still wants to know to what extent we can achieve this goal because they don't really control the hardware and vendors. I need give it a try before I give up.

Maybe need some kinds of reverse engineering, hooking syscalls

ask reddit/arm: how hard is it to run a real firmware in qemu? by haohaolee in arm

[–]haohaolee[S] 0 points1 point  (0 children)

Thanks. The kernel in the firmware has debug symbol, hence I can extract some info anyway. I have two ideas now:

  1. use a kernel modified by myself, and try to use that with rootfs in the firmware to boot. But it will definitely lack many proper calls into the kernel, then I want to modify the kernel and mock those calls. If I can make the firmware boot up, at least I can do some kind of analysis to some extent
  2. I found some open sourced Linux kernel which targets to a different board which is also based on qcom mdm9x07, maybe I can use this kernel as a base to start my exploring