Record videos with OG PP trough GUI interface today
#1
Hi all!

When reading this (thanks Peter):
https://linmob.net/weekly-update-39-2023/
My attention was caught to this:
https://www.youtube.com/watch?v=XvI6Qp5qXN8

And that triggers an idea that has been in my mind for a long time.
Why we do not have simple way to record videos with PP because first video recording scripts have been available for a long time?

Well now we have (no video preview because PP will choke to that but it is really fast and enjoyable to use - even child can use it)
https://gitlab.com/Alaraajavamma/pinepho...-recording

I put some thing together with ducktape and glue but biggest work for that repo is done by luigi311 and in general, really many other than me xD.

But now it works.

TLDR: Run this command in terminal:
git clone https://gitlab.com/Alaraajavamma/pinepho...-recording && cd pinephone-gui-for-video-recording && sudo chmod +x install.sh && ./install.sh
And start recording videos with your PP.

Issues etc. are welcome - I have tested this with pmos Phosh but it should work with most distros.
  Reply
#2
Installed on manjaro phosh and most of the install went fine, and after
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...

it complained (in serbian) about ("error: target not found:")
грешка: циљ није нађен: wlr-randr

I now have a new icon on the ikonostas, saying "0.1 VideoRec", and when I launch it I get a blank image, as if waiting for the splash screen, but it stays so, nothing comes up.

What's the command to run it in terminal, so I may see what it reports when launching?

OK, found that it's missing yad... now to find how to get that.
  Reply
#3
Now you got me running in all directions. I did a full pacman -Syu, which didn't work the last few time because of one file clash; this time I did the homework and renamed one WebKitSomething file to .old and reran the whole thing. Now I have yad, and the scripts do run, but video doesn't get saved.

I cd'd into the pinephone-gui-for-video-recording folder, ran  ./video.sh and I got the gui as advertised on the screenshots, more or less (there weren't duplicate horizontal/vertical buttons, but other than that they were there). Since I didn't see what was going on when I ran it from the desktop icon, this time it seems to have been something banal.

One by one:

- when running sudo ./video.sh, I get

Gtk- **: 18:49:51.913: cannot open display:

- without sudo, it runs with

Code:
/opt/VideoRec/capture.sh: ред 8: amixer: нема такве наредбе [row 8, no such command]
landscape clockwise
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.1.0 (GCC)
  configuration: --prefix=/usr -... etc etc.
...  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100

Now when I try to save a video, it complains that

bash: ред 1: /sys/class/leds/white:flash/brightness: Овлашћење је одбијено (row 1, authorization refused)

When trying to save a 2nd video, it complains that

/home/manjaro/Videos/.temp.понедељак-09-10-2023_18_45_28.mp4: No such file or directory

No .mp4 files found in the folder.

There really aren't no files there, but at least I know it composed the filename properly (понедељак is monday, and the date is in proper locale too).

This is as far as I got.
  Reply
#4
(10-09-2023, 11:06 AM)Eugo Wrote: - without sudo, it runs with

Code:
/opt/VideoRec/capture.sh: ред 8: amixer: нема такве наредбе [row 8, no such command]
landscape clockwise
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.1.0 (GCC)
  configuration: --prefix=/usr -... etc etc.
...  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100

Now when I try to save a video, it complains that

bash: ред 1: /sys/class/leds/white:flash/brightness: Овлашћење је одбијено (row 1, authorization refused)

When trying to save a 2nd video, it complains that

/home/manjaro/Videos/.temp.понедељак-09-10-2023_18_45_28.mp4: No such file or directory

No .mp4 files found in the folder.

There really aren't no files there, but at least I know it composed the filename properly (понедељак is monday, and the date is in proper locale too).

This is as far as I got.

Yes this does not work with sudo privileges so run without sudo all the time Smile.

Can you delete the current installation:
sudo rm -rf /opt/VideoRec && echo /opt/VideoRec folder removed && rm ${HOME}/.local/share/applications/videorec.desktop && echo desktop file removed && cd ${HOME} && rm -rf pinephone-gui-for-video-recording && echo git folder deleted

And then re-install:
git clone https://gitlab.com/Alaraajavamma/pinepho...-recording && cd pinephone-gui-for-video-recording && sudo chmod +x install.sh && ./install.sh

luigi311 did make front camera working and invented smarter way to rotate video output so screenshots in gitlab are bit outdated. I try to refresh them today.

btw this error indicates that manjaro has some issues to turn torch off:
bash: ред 1: /sys/class/leds/white:flash/brightness: Овлашћење је одбијено (row 1, authorization refused)
Can you try what happens if you run these commands as regular user:
Code:
echo 1 > /sys/class/leds/white:flash/brightness
Code:
echo 0 > /sys/class/leds/white:flash/brightness
First one should start torch and second one turn it off
  Reply
#5
I installed this today on Mobian to try it out. Where is the video saved and in what format?

So after installation I ran the program and hit the "Record rear" button. The notification LED turns red, presumably meaning that recording has started. Then I hit "Stop and save" and the red light turns off - recording has stopped. However not much else seems to happen. The program didn't ask for a filename and I don't see anything new in ~/Videos. The "Open latest video file" and "Rename latest video file" buttons don't do anything.
  Reply
#6
(10-09-2023, 01:52 PM)Zebulon Walton Wrote: I installed this today on Mobian to try it out. Where is the video saved and in what format?

So after installation I ran the program and hit the "Record rear" button. The notification LED turns red, presumably meaning that recording has started. Then I hit "Stop and save" and the red light turns off - recording has stopped. However not much else seems to happen. The program didn't ask for a filename and I don't see anything new in ~/Videos. The "Open latest video file" and "Rename latest video file" buttons don't do anything.

Damn xD.
It should save the file to ~/Videos - correct and using mp4 format. And yes notification led turning red is indicating that recording started - how ever at the moment it just toggles it on, it does not check does the recording actually start.
Do you hear small "click" sound after you press "Record rear" ? If not the camera did not start at all. If you did hear the click sound the error might be ffmpeg.

And it acts like all other video recorders (afaik) and does not ask the file name - it just saves them with date information. That is why I added "Rename latest video file" button because I think it is quite handy.

It uses mp4 format and it also search only mp4 files in ~/Videos folder. So if there are none "Open latest video file" or "Rename latest video file" or "Delete lates video file" buttons do not work - maybe there should be feedback for it? It is easy to add

Related issue is this:
https://gitlab.com/Alaraajavamma/pinepho...-/issues/4
It might help us if you write your findings here.
  Reply
#7
(10-09-2023, 02:02 PM)alaraajavamma Wrote: Damn xD.
It should save the file to ~/Videos - correct and using mp4 format. And yes notification led turning red is indicating that recording started - how ever at the moment it just toggles it on, it does not check does the recording actually start.
Do you hear small "click" sound after you press "Record rear" ? If not the camera did not start at all. If you did hear the click sound the error might be ffmpeg.

I don't recall a click when starting the recording but wasn't listening for it either so will have to try it again and pay attention to that.
  Reply
#8
I finally got the chance to try again (I don't use the phone much) and there is no click sound when attempting to record a video. So it seems it is not successfully activating the camera.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I record video on a Pinephone? kk22 8 3,813 01-22-2023, 06:45 AM
Last Post: linmob
  watching videos on pinephone Galad 6 3,387 12-13-2022, 02:38 PM
Last Post: Fish
  Poll: What is your favorite distro/interface for the PinePhone? amosbatto 8 11,076 02-01-2022, 07:47 AM
Last Post: amosbatto
  Poll 2: What is your favorite distro/interface for the PinePhone? amosbatto 3 3,611 12-01-2021, 04:36 PM
Last Post: bcnaz
  Which interface was pre-installed on the PinePhone CE: Manjaro? amosbatto 4 4,866 08-17-2021, 12:40 PM
Last Post: marcih
  Poll 4: What is your favorite distro/interface for the PinePhone? amosbatto 7 6,512 02-11-2021, 09:58 AM
Last Post: amosbatto
  Poll 3: What is your favorite distro/interface for the PinePhone? amosbatto 0 1,566 02-01-2021, 07:57 AM
Last Post: amosbatto
  Poll: Interface used on the PinePhone amosbatto 11 14,781 09-13-2020, 02:56 PM
Last Post: fsflover
Big Grin Received my PinePhone today. tigerforce 12 13,529 09-05-2020, 06:34 PM
Last Post: LazLong
  Compareing my PP with PP on videos harvey186 2 3,020 03-05-2020, 05:18 PM
Last Post: tllim

Forum Jump:


Users browsing this thread: 1 Guest(s)