Adding resume & navigational FF & FR function to TS files?

Moderators: Gully, peteru

Post Reply
User avatar
Videonut
Master
Posts: 245
Joined: Fri Jun 21, 2019 15:49
Location: Perth WA

Adding resume & navigational FF & FR function to TS files?

Post by Videonut » Tue Mar 31, 2020 17:39

Is there any way to add to TS files on USB stick so that the resume & navigational FF & FR buttons work?

A friend has given me a stick with heaps of TS files  that my T2 doesn't play very well when it comes to resume & navigational FF & FR functions.

Could the 'reconstructapsc' plug in or some other program do this & if so how?

Thanks in advance
Beyonwiz V2,TCL TV, Chromecast with Google TV, Samsung Blu-ray player, Harmony Remote,650.

prl
Wizard God
Posts: 32704
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Adding resume & navigational FF & FR function to TS files?

Post by prl » Tue Mar 31, 2020 17:51

Videonut wrote:
Tue Mar 31, 2020 17:39
Could the 'reconstructapsc' plug in or some other program do this & if so how?

Resume points are time markers, and reconstructapsc generates the time-to-file-location index file for the TS file. That may also help with FF, REW and skip.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
Videonut
Master
Posts: 245
Joined: Fri Jun 21, 2019 15:49
Location: Perth WA

Re: Adding resume & navigational FF & FR function to TS files?

Post by Videonut » Tue Mar 31, 2020 17:54

But how would I run reconstructapsc on a file that's on a USB stick?
Beyonwiz V2,TCL TV, Chromecast with Google TV, Samsung Blu-ray player, Harmony Remote,650.

prl
Wizard God
Posts: 32704
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Adding resume & navigational FF & FR function to TS files?

Post by prl » Tue Mar 31, 2020 18:30

In the same way as you'd run it on a file anywhere else, I imagine. I haven't used it.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Paul_oz53
Wizard
Posts: 2789
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Adding resume & navigational FF & FR function to TS files?

Post by Paul_oz53 » Tue Mar 31, 2020 18:37

Haven't checked lately but in the media player menu press YELLOW for other locations. Find the USB device.

Select the file and press MENU. Select reconstructapsc (after installation of course). It will run but there is no finished (edit: correction progress) message. Takes a couple of minutes typically so be patient.
Last edited by Paul_oz53 on Tue Mar 31, 2020 19:58, edited 1 time in total.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Adding resume & navigational FF & FR function to TS files?

Post by MrQuade » Tue Mar 31, 2020 18:54

Videonut wrote:
Tue Mar 31, 2020 17:54
But how would I run reconstructapsc on a file that's on a USB stick?
Exactly the same way you'd run it on a file that is on the Wiz's hard-disk.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Adding resume & navigational FF & FR function to TS files?

Post by Grumpy_Geoff » Tue Mar 31, 2020 19:02

Paul_oz53 wrote:
Tue Mar 31, 2020 18:37
It will run but there is no finished message. Takes a couple of minutes typically so be patient.

There is a 'Reconstruct AP/SC is finished !' popup.
It runs as a background job, so by pressing BLUE/Extensions menu from live TV the background jobs will be shown at the top of the resultant list. For this plugin, I don't think there's any "dynamic progress" other than 0% and 100%, but you can select a background job and press OK on the 'In progress' job entry to open the 'Job View' window of the task.
Obviously processor speed and recording length come into play, on my T4 a 90 min recording takes about 30 secs.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Adding resume & navigational FF & FR function to TS files?

Post by adoxa » Tue Mar 31, 2020 19:32

I could provide a Windows (command line) program to do it, which might be a bit more convenient and quicker (along the lines of createapsc e:\*.ts).

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Adding resume & navigational FF & FR function to TS files?

Post by Grumpy_Geoff » Tue Mar 31, 2020 20:25

If one is handy with command line access, then the .ap and .sc files (re)creation can be achieved with the createapscfiles program that is installed with the firmware (no plugin needed) -
/usr/lib/enigma2/python/Components/createapscfiles /path/to/recording_file.ts

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Adding resume & navigational FF & FR function to TS files?

Post by Grumpy_Geoff » Tue Mar 31, 2020 22:30

Videonut wrote:
Tue Mar 31, 2020 17:54
But how would I run reconstructapsc on a file that's on a USB stick?

How about shell script that'd reside on the USB thumb drive, and you'd execute via File Commander on the Wiz to iterate over the *.ts files present on the drive and "do the business"?
Something like -

Code: Select all

#!/bin/sh
dirname=$(realpath $(dirname $0))
cd $dirname
for REC in *.ts; do
    if [ ! -f "${REC}.ap" ]; then
        echo "$(date +'%T') - processing ${REC}"
        /usr/lib/enigma2/python/Components/createapscfiles "${REC}"
    fi
done
echo "$(date +'%T') - finished processing}"
echo -e "\nDon't forget to unmount the thumb drive once finished with it"


Attached as Recreate_APSC_batch.sh

Recreate_APSC_batch.sh
version #2
(358 Bytes) Downloaded 52 times

post edited for updating script
Last edited by Grumpy_Geoff on Wed Apr 01, 2020 11:26, edited 1 time in total.

prl
Wizard God
Posts: 32704
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Adding resume & navigational FF & FR function to TS files?

Post by prl » Wed Apr 01, 2020 08:31

it might be worth putting an if [ ! -f $REC.ap ] test in the loop, so that it can be run on a drive that has a mix of processed and unprocessed files on it.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Adding resume & navigational FF & FR function to TS files?

Post by Grumpy_Geoff » Wed Apr 01, 2020 10:00

prl wrote:
Wed Apr 01, 2020 08:31
it might be worth putting an if [ ! -f $REC.ap ] test in the loop, so that it can be run on a drive that has a mix of processed and unprocessed files on it.

Yeah, I thought about that almost straight after I posted it, and being a bit lazy at the time I thought I'd leave it for a version 2 :)

prl
Wizard God
Posts: 32704
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Adding resume & navigational FF & FR function to TS files?

Post by prl » Wed Apr 01, 2020 10:16

:D
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Adding resume & navigational FF & FR function to TS files?

Post by Grumpy_Geoff » Wed Apr 01, 2020 11:28

prl wrote:
Wed Apr 01, 2020 08:31
it might be worth putting an if [ ! -f $REC.ap ] test in the loop, so that it can be run on a drive that has a mix of processed and unprocessed files on it.

I updated the script as suggested, and re-posted the update in the original post.

User avatar
peteru
Uber Wizard
Posts: 9737
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: Adding resume & navigational FF & FR function to TS files?

Post by peteru » Wed Apr 01, 2020 19:29

I'm the type of person who would reach for the find command to provide a fully recursive solution. :wink:

"Beauty lies in the hands of the beer holder."
Blog.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Adding resume & navigational FF & FR function to TS files?

Post by adoxa » Thu Apr 02, 2020 23:21

FWIW here's the Windows (64-bit) version (the .c file is the source; it should compile on macOS/Linux).
Grumpy_Geoff wrote:
Tue Mar 31, 2020 19:02
Obviously processor speed and recording length come into play, on my T4 a 90 min recording takes about 30 secs.
My 3.4GHz Core i7 took 56s for an hour SD (1.6GiB) and 84s for HD (2.4GiB) on the NTFS USB (running again took only seconds, though); reconstructing on the T2 took about 1m50s and 4m20s, respectively.
Attachments
createapscfiles.zip
(11.25 KiB) Downloaded 22 times

Post Reply

Return to “General Topics”