LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Deepin
User Name
Password
Linux Deepin This forum is for the discussion of Linux Deepin.

Notices


Reply
  Search this Thread
Old 12-24-2019, 02:22 PM   #1
hodak
Member
 
Registered: Dec 2019
Posts: 54

Rep: Reputation: Disabled
PVR for Deepin OS


Hi has anyone successfully set up a PVR set up in Deepin OS for Live TV and more importantly recording? If so was it dependable i.e were recordings there/not skipped/no errors? What backend did you guys use? Alternatively has anyone managed to run Windows guest as VM inside a Deepin OS host by any chance?
 
Old 12-24-2019, 04:11 PM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
I have used MythTV on Debian in the past. The backend server ran for over 5 years before I stopped cable service and went streaming only.
Configuring the backend to detect the video capture card and to get TV schedules is not intuitive, but once it is setup it is rock solid.
 
Old 12-25-2019, 12:30 PM   #3
hodak
Member
 
Registered: Dec 2019
Posts: 54

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by uteck View Post
I have used MythTV on Debian in the past. The backend server ran for over 5 years before I stopped cable service and went streaming only.
Configuring the backend to detect the video capture card and to get TV schedules is not intuitive, but once it is setup it is rock solid.
well i've tried TVHeadend - is MythTV easier to set up relative to TVHeadend cos i can't get that one done
 
Old 12-25-2019, 02:20 PM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
To record live TV, all you need is a tv tuner that works. You'll have to have firmware support in the kernel for your hardware or build it.
That would be step 1. Does dmesg show firmware loading for it?

Once you have that you have it made. Install v4l-utils. Don't know what your distro calls it.
Code:
pacman -Si v4l-utils
Repository      : extra
Name            : v4l-utils
Version         : 1.16.7-1
Description     : Userspace tools and conversion library for Video 4 Linux
Architecture    : x86_64
URL             : https://linuxtv.org/
Licenses        : LGPL
...
Provides        : libv4l=1.16.7
Depends On      : hicolor-icon-theme  gcc-libs  sysfsutils  libjpeg-turbo
Optional Deps   : qt5-base
                  alsa-lib
...
Download Size   : 1063.72 KiB
Installed Size  : 4322.00 KiB
...
Then all you need is a channels.conf file for your tv stations.
Looks like this
Code:
14.1]
	VCHANNEL = 14.1
	SERVICE_ID = 1
	VIDEO_PID = 49
	AUDIO_PID = 52
	FREQUENCY = 479028615
	MODULATION = VSB/8
	DELIVERY_SYSTEM = ATSC

[14.2]
	VCHANNEL = 14.2
	SERVICE_ID = 2
	VIDEO_PID = 65
	AUDIO_PID = 68
	FREQUENCY = 479028615
	MODULATION = VSB/8
	DELIVERY_SYSTEM = ATSC

[14.3]
	VCHANNEL = 14.3
	SERVICE_ID = 3
	VIDEO_PID = 81
	AUDIO_PID = 84
	FREQUENCY = 479028615
	MODULATION = VSB/8
	DELIVERY_SYSTEM = ATSC
...
You can make that with dvbv5-zap, or just make one with your channel center frequencies.
https://en.wikipedia.org/wiki/Televi...el_frequencies

You can then play/record a tv channel with mplayer, mpv, ffplay etc.
Record 14.1 example:
Code:
conf="$HOME/.mplayer/dvb_channel.conf"
dvbv5-zap -ssrc "$conf" 14.1 -o tv14_1.ts
Play 14.1 examples:
Code:
dvbv5-zap -ssrc "$conf" 14.1
mplayer -vf scale=768:432 -cache 4096 -cache-min 80 /dev/dvb/adapter0/dvr0
mpv --vf=scale=720:480 /dev/dvb/adapter0/dvr0
ffplay /dev/dvb/adapter0/dvr0
You zap a channel out of your conf file and play it or dump it to file.ts

And of course you can make a little bash script to do all of the with a menu.
You don't need a heavy suite to play TV channels. A media player will do it.

https://linuxtv.org/
https://www.linuxtv.org/wiki/index.php/Main_Page
https://www.linuxtv.org/wiki/index.php/Special:AllPages

Look at
mplayer
mpv
ffplay
vlc
tvtime
kaffeine
kodi

Search this forum. I've posted on this before.

Last edited by teckk; 12-25-2019 at 02:21 PM.
 
1 members found this post helpful.
Old 12-25-2019, 02:37 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
And that does indeed work fine.
https://0x0.st/zGda.jpg
Code:
curl -F'file=@tv.jpg' https://0x0.st
https://0x0.st/zGda.jpg
 
Old 12-25-2019, 09:54 PM   #6
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Quote:
Originally Posted by hodak View Post
well i've tried TVHeadend - is MythTV easier to set up relative to TVHeadend cos i can't get that one done
I have never tried TVHeadend, so don't know if MythTV is easier. It has been years since I used it, so I hope they made it more intuitive.
 
Old 12-26-2019, 05:26 PM   #7
hodak
Member
 
Registered: Dec 2019
Posts: 54

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
You don't need a heavy suite to play TV channels. A media player will do it.

https://linuxtv.org/
https://www.linuxtv.org/wiki/index.php/Main_Page
https://www.linuxtv.org/wiki/index.php/Special:AllPages

Look at
mplayer
mpv
ffplay
vlc
tvtime
kaffeine
kodi

Search this forum. I've posted on this before.
Hi teckk i've managed to get Kaffeine set up and it scanned and shows all the DVB-T2 channels where i'm at perfectly About daily recording : am i correct to say once i set it up in Kaffeeine it would start up itself and shut down or do i have to tell linux to manually start it up upon boot up? the earlier content you posted looked way over my head am a linux newbie and only got into it earlier this month haha I got excited about learning how to set up NPVR (my fav PVR in windows) in linux and failed miserably if anyone could write an idiot's guide to setting up NPVR on any linux distro that would be a godsend for new linux converts like myself haha

Last edited by hodak; 12-26-2019 at 05:28 PM.
 
Old 12-27-2019, 08:24 AM   #8
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Code:
if anyone could write an idiot's guide to setting up NPVR on any linux distro
You first have to have a working tv tuner with kernel firmware support.

Daily recording TV.
If the machine is asleep, then wake it up with cron or at.

Example, record for 1 hour, go to sleep:
Code:
#! /usr/bin/env bash

#dvb:// recorder. Requires dvbv5-zap and a dvb_channel.conf 

#Path for output file
cd $HOME/tv

#Path to channels.conf
conf="$HOME/.mplayer/dvb_channel.conf"

#Get channels ID's from conf
channels=$(grep -oP '(?<=\[).*(?=\])' < "$conf")

#Recording time seconds
t=3600

PS3="
Enter channel number: "

#If mobile antenna, allow antenna adjust
message="
Select channel then adjust antenna for best signal quality 
while watching signal output. Press (enter) to record that
channel once good signal is acquired. (enter) again to stop.
-----------------------------------------------------
Select a channel.   Ctrl C to exit.
"

#Main loop
while :; do
    clear
    echo "$message"
    select opt in $channels; do
    
        #No Overwrite of .ts files
        num=1
        until [ ! -e tv$num.ts ]; do
            num=$(( $num + 1 ))
        done
        
        #Output to tv"$num".ts
        dvbv5-zap -ssrc "$conf" "$opt" -o tv"$num".ts &

        sleep "$t"
        pkill dvbv5-zap
        
        #Go to sleep
        sudo systemctl suspend
        break
    done
done
See:
man bash
man systemctl
man cron
man at
man dvbv5-zap

It's a mpeg2 transport stream
Code:
ffprobe -hide_banner tv1.ts
[mpeg2video @ 0x55d87ccf6440] Invalid frame dimensions 0x0.
    Last message repeated 34 times
[mpegts @ 0x55d87ccf2700] PES packet size mismatch
Input #0, mpegts, from 'tv1.ts':
  Duration: 00:00:18.78, start: 58238.524667, bitrate: 2756 kb/s
    Stream #0:0[0x41]: Video: mpeg2video (Main), yuv420p(tv, top first), 704x480 [SAR 40:33 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x44]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
I would run that through ffmpeg if I was going to keep it.
Code:
ffmpeg -i tv1.ts -c:a copy -c:v copy tv1.mp4
Or re encode it into x264/mp4.

From the desktop as I write this.
Code:
curl -F'file=@rtv1.jpg' https://0x0.st
https://0x0.st/zD91.jpg

curl -F'file=@rtv2.jpg' https://0x0.st
https://0x0.st/zD9j.jpg
https://0x0.st/zD91.jpg
https://0x0.st/zD9j.jpg

Use kaffeine or whatever player that you wish.

Last edited by teckk; 12-27-2019 at 08:29 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deepin 2014 Alpha – Be ready to embrace the New Deepin cxbii Linux Deepin 6 11-17-2014 08:06 PM
LXer: Linux Deepin needs your help with the Deepin Localization Project LXer Syndicated Linux News 0 12-02-2013 10:41 PM
LXer: Use Linux Deepin Screenshot Tool "Deepin Scrot" In Other Linux Distributions LXer Syndicated Linux News 0 03-13-2012 05:50 AM
VCR recording w/PVR-250 (or: a guide to the PVR-250) dashcloud Linux - Software 1 03-04-2008 01:30 PM
PVR-500 & PVR-150 not working properly srairman76 Linux - Hardware 3 01-02-2007 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Deepin

All times are GMT -5. The time now is 09:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration