NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) v
« Previous 1 2 3 4 5 6 … 125 Next »
Automated Cutting and Transcoding Guide Using Mencoder

 
  • 0 Vote(s) - 0 Average
Automated Cutting and Transcoding Guide Using Mencoder
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#461
2007-12-21, 08:16 PM
fantastic news!

Removing the black bars should also greatly improve the encoding efficiency.

can you perform calculations inside the script so that the final picture size you encode is a multiple of 16 (in both width and height).

http://www.mplayerhq.hu/DOCS/HTML/en/men...mpeg4-crop
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
-stattik-
Offline

Posting Freak

Posts: 924
Threads: 26
Joined: Mar 2005
#462
2007-12-21, 10:34 PM (This post was last modified: 2007-12-22, 06:34 PM by -stattik-.)
Ok, here's 0.5.5. Test it out. The autocrop is only a few hours old and it required a number of other changes to accommodate it so any feedback would be great.

The default resolutions are already divisible by 16. The script will calculate crop resolutions that are divisible by 16 as well.

Once the bugs are worked out I'll post it to the wiki.


What's new:

0.5.5
* Added support for multi-core CPU's. (mencoder needs to be compiled with xvid 1.2)
* Added the ability to set what time range transcoding will occur during the day
* Added the ability to set how old the source files need to be before being transcoded
* Added the ability to set the threshold of free space before transcoding begins
* Added the ability to move the source files to a temp directory after transcoding
* Added the ability to set the threshold of free space before deleting files in the MOVE directory.(First in, first out)
* Added support for MP4 and MKV containers (mencoder builds after Oct 7th support this)
* Added the ability to automatically determine if cropping is needed. (Need to edit you comskip.ini file. verbose=10)
* x264 encoding speed increased by about 60%. (Changed some encoding settings that didn't have a good speed/quality ratio.
* Added the ability to manually update the GBPVR database with the new extension if you're running in client/server mode. (works for files with ?'s in the name as well.)
* Added logic that allows the script to verify if a source file is being transcoded by another script/computer.
* Added option to re-index source file if needed before running comskip.
* The script should automatically disable IVTC if the source is PAL.
* The script will encode subtitles of DVDrips if set.

NOTE: There is one oddity when running the script with time_check/file_move enabled. Sometimes the script beeps and shows a message similar to this:

Code:
The system cannot find the file T.
The system cannot find the file ?.

This does NOT affect the transcoding or the files and can be ignored. I'm not sure what's causing it. Perhaps a script guru can shed some light on it. Wink


EDIT: I re-uploaded the file with the debugging taken out.

EDIT: The new version has update_db set to disabled. I also set time_check and file moving to disable.
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#463
2007-12-22, 04:24 PM
I changed debug=null to "yes" at top of script to prevent the pause before every encoding.

changed all referenced to d:\program..... to c:\progra..

update_db defualt is yes. This resulted in the following error when trying to update a show that is not in the db

Updating GBPVR database with new extension--"S:\Archive\History\The World at War
\The World at War - 02. Distant War.avi"
.
The device is not ready.
The device is not ready.
File Not Found
( was unexpected at this time.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
-stattik-
Offline

Posting Freak

Posts: 924
Threads: 26
Joined: Mar 2005
#464
2007-12-22, 06:30 PM
gEd Wrote:I changed debug=null to "yes" at top of script to prevent the pause before every encoding.

changed all referenced to d:\program..... to c:\progra..

update_db defualt is yes. This resulted in the following error when trying to update a show that is not in the db

Updating GBPVR database with new extension--"S:\Archive\History\The World at War
\The World at War - 02. Distant War.avi"
.
The device is not ready.
The device is not ready.
File Not Found
( was unexpected at this time.

Thanks for taking a look at it.

I uploaded a fixed version that shouldn't pause and I turned off db_update, file moving, and time_check. You can re-enable them if you like.

For the DB update, what were your settings?
vmq
Offline

Member

Posts: 128
Threads: 27
Joined: Dec 2007
#465
2007-12-23, 12:06 AM
-stattik- Wrote:Ok, here's 0.5.5. Test it out. The autocrop is only a few hours old and it required a number of other changes to accommodate it so any feedback would be great.
...

Thank you, works great!

But I already have a request for enhancement Wink. My analog recordings show a thin black border, see here for an example, and I use the following patch to get rid of them:

Code:
--- stattik_transcode_0.5.5.bat.org    2007-12-22 12:23:52.000000000 -0500
+++ stattik_transcode_0.5.5.bat    2007-12-22 17:06:47.937500000 -0500
@@ -178,6 +178,7 @@
SET deinterlace=auto
SET output_gmc=no
SET croptop=no
+SET ltrcrop=yes
SET DVD_format=ntsc
SET hr-edl-seek=no
SET use_edl=yes
@@ -1041,6 +1042,10 @@
                IF %ID_VIDEO_HEIGHT%==480 SET crop=crop=720:476:0:4,
                IF %ID_VIDEO_HEIGHT%==576 SET crop=crop=720:572:0:4,
        )
+        IF %ltrcrop%==yes (
+                IF %ID_VIDEO_HEIGHT%==480 SET crop=crop=700:468:10:12,
+                IF %ID_VIDEO_HEIGHT%==576 SET crop=crop=700:564:10:12,
+        )
        ECHO Flagged as Standard
)
IF /I %hdtv_pro%==yes (

Maybe something like this could become a standard feature, possibly even with separately configurable numbers of pixels to crop for left, top, right and bottom? Wink

Actually I have a question regarding cropping. The mencoder page says that horizontal crop width and offset should be even and vertical width and offset should be multiples of four. Is this still true? I briefly tried odd numbers for vertical/horizontal cropping and mencoder did not complain. Is the quality really that much worse?

Volker
[SIZE="2"]PVR: Phenom 9150e / 4GB / XP / ATI HD 4200 / HVR-1600 / ATI HD 650 TV WOnder / NextPVR 3.9.2
PVR2: i7-6700k / Win10Pro / 32 GB / GeForce 1070 / WinTV-dualHD / NPVR 3.9.2 / 4TB NAS[/SIZE]
vmq
Offline

Member

Posts: 128
Threads: 27
Joined: Dec 2007
#466
2007-12-23, 04:15 AM
Sorry for the cryptic title, I played with your script a little more and I found that the twopass_30_min_size is only evaluated in integer multiples - what I mean is a 40min show is reduced to the twopass_30_min_size value and not to something like 40/30*twopass_30_min_size.

The following patch fixes this more or less for me:

Code:
--- stattik_transcode_0.5.5.bat.org     2007-12-22 18:28:22.234375000 -0500
+++ stattik_transcode_0.5.5.bat 2007-12-22 21:25:04.546875000 -0500
@@ -796,10 +796,11 @@

IF "%~x1" EQU ".vob" SET ID_LENGTH=%vob_length:~0,-1%

-SET /a twopass_multiplier=(%ID_LENGTH:~0,-4% + 100) / 1800
-REM twopass_multiplier is %twopass_multiplier%
-SET /a twopass_size_pre=(%twopass_multiplier% * %twopass_30_min_size%) * 1024
-IF %twopass_multiplier% EQU 0 SET /a twopass_size_pre=(%twopass_30_min_size% /
2) * 1024
+REM Use 3 min accuracy
+SET /a twopass_multiplier=(%ID_LENGTH:~0,-4% + 100) / 180
+REM twopass_multiplier is %twopass_multiplier% / 10
+SET /a twopass_size_pre=(%twopass_multiplier% * %twopass_30_min_size%) * 1024 /
10
+IF %twopass_multiplier% EQU 0 SET /a twopass_size_pre=(%twopass_30_min_size%) *
1024 / 10
REM twopass_size_pre is %twopass_size_pre% KB
::     Comskip EDL file parser
SET comskip_segment=0

I say more or less because my 40min test episode transcoded with: "xvid/mpeg2 -Two Pass", "No IVTC" and "Automatic" produced an avi with a length of 437881064 bytes. The twopass_30_min_size value is 300, so I would expect something like 300*41/30*1024*1024 = 429916160, but that's close Wink


While looking for the time discrepancy I created a logfile and found something you might also look into. The following is the end of that logfile:

Code:
...
C:\Program Files\devnz\gbpvr\Third Party>IF /I no EQU yes D:\Progra~1\devnz\gbpvr\ThirdP~1\sqlite3.exe -separator "," "D:\Progra~1\devnz\gbpvr\gbpvr.db3" "UPDATE RECORDING_SCHEDULE SET filename = '~0,-18question_mark_check2:~-22question_mark_check3:~0,-18question_mark_check4:~-22';"

C:\Program Files\devnz\gbpvr\Third Party>IF /I move == move CALL :move

C:\Program Files\devnz\gbpvr\Third Party>SET move_date_oldest=9999

C:\Program Files\devnz\gbpvr\Third Party>CALL :check_space T:\video\move\ move

C:\Program Files\devnz\gbpvr\Third Party>dir /-C T:\video\move\ 1>"C:\DOCUME~1\q\LOCALS~1\Temp\stattik.transcode.space"
The system cannot find the path specified.

C:\Program Files\devnz\gbpvr\Third Party>FOR /F "usebackq tokens=1,2,3,4 delims= " %i in ("C:\DOCUME~1\q\LOCALS~1\Temp\stattik.transcode.space") do SET freespace=%k

C:\Program Files\devnz\gbpvr\Third Party>SET /a freespace=(~0,-6 / 107) * 100

C:\Program Files\devnz\gbpvr\Third Party>IF 0 EQU move GOTO :EOF
move was unexpected at this time.

C:\Program Files\devnz\gbpvr\Third Party>IF  LEQ move (

The
Code:
C:\Program Files\devnz\gbpvr\Third Party>IF /I move == move CALL :move

Code:
CALL :check_space T:\video\move\ move

and

Code:
C:\Program Files\devnz\gbpvr\Third Party>IF 0 EQU move GOTO :EOF
move was unexpected at this time.

C:\Program Files\devnz\gbpvr\Third Party>IF  LEQ move (

lines look pretty suspicious. If you need it I can attach the full logfile.
[SIZE="2"]PVR: Phenom 9150e / 4GB / XP / ATI HD 4200 / HVR-1600 / ATI HD 650 TV WOnder / NextPVR 3.9.2
PVR2: i7-6700k / Win10Pro / 32 GB / GeForce 1070 / WinTV-dualHD / NPVR 3.9.2 / 4TB NAS[/SIZE]
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#467
2007-12-23, 04:45 PM
-stattik- Wrote:Thanks for taking a look at it.

I uploaded a fixed version that shouldn't pause and I turned off db_update, file moving, and time_check. You can re-enable them if you like.

For the DB update, what were your settings?

ah....

SET gbpvr_db_path=D:\Progra~1\devnz\gbpvr\gbpvr.db3

oops

another D: I didn;t spot.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
linfor
Offline

Member

Posts: 157
Threads: 42
Joined: Jun 2005
#468
2007-12-23, 09:20 PM (This post was last modified: 2007-12-23, 09:38 PM by linfor.)
I just cannot get this to work. I have read all the posts with no luck.
My recordings are in the folder F:\Recordings. Files to be scanned are in the folder F:\Recordings\waiting I would like to convert them to avi and then move them to the folder F:\Recordings\AVIs and keep the originals appened with _original.mpg so they are not reprocessed or they can be moved to the AVIs folder as well. I do not use comskip as I have vodeoredo take out the commerials. The shows are normally 45 minutes long and I want them in file size of around 300MB

I set the location of the mplayer and encoder
SET mencoder_path=F:\Progra~1\mplayer\MPlayer-mingw32-1.0pre8\mencoder.exe
SET mplayer_path=F:\Progra~1\mplayer\MPlayer-mingw32-1.0pre8\mplayer.exe
SET comskip_path=D:\Progra~1\devnz\gbpvr\comskip.exe
SET recordings_path=F:\Recordings\
SET guide_mode=yes

and changed thse 2 of Auto Transcaode Settings
SET individual_transcode_directories="waiting"
SET recursive_transcode_directory=F:\Recordings\

In General Settings comskipmode is set to no and I made this change
SET move_dir=F:\Ready\

I still cannot get this work work. It produces an empty info file and a text file with the shows title. Can anyone help please?

I put it in debug mode and when it got to these areas is says missing operand
SET /a pre_pre_crop_height= *75833 / 100000
SET / a pre_crop_height = /16
SET /a pre_crop_height= (*16) +16
SET /a crop_border= < > / 2
SET /a h_multiplier= /336
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#469
2007-12-23, 09:54 PM
Did someone check if you need to enable the aspect_ratio method in Comskip?
I did not as I always have aspect_ratio enabled
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
vmq
Offline

Member

Posts: 128
Threads: 27
Joined: Dec 2007
#470
2007-12-23, 10:50 PM
linfor Wrote:I just cannot get this to work. I have read all the posts with no luck.
My recordings are in the folder F:\Recordings. Files to be scanned are in the folder F:\Recordings\waiting I would like to convert them to avi and then move them to the folder F:\Recordings\AVIs and keep the originals appened with _original.mpg so they are not reprocessed or they can be moved to the AVIs folder as well. I do not use comskip as I have vodeoredo take out the commerials. The shows are normally 45 minutes long and I want them in file size of around 300MB

I set the location of the mplayer and encoder
SET mencoder_path=F:\Progra~1\mplayer\MPlayer-mingw32-1.0pre8\mencoder.exe
SET mplayer_path=F:\Progra~1\mplayer\MPlayer-mingw32-1.0pre8\mplayer.exe
(snip)

It looks like the ":: Parse ID_ Variables" part of the script fails to set the %ID_VIDEO_WIDTH% variable. Can you check that your mplayer_path is correct? Just start a cmd.exe and run:

F:\Progra~1\mplayer\MPlayer-mingw32-1.0pre8\mplayer.exe
[SIZE="2"]PVR: Phenom 9150e / 4GB / XP / ATI HD 4200 / HVR-1600 / ATI HD 650 TV WOnder / NextPVR 3.9.2
PVR2: i7-6700k / Win10Pro / 32 GB / GeForce 1070 / WinTV-dualHD / NPVR 3.9.2 / 4TB NAS[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (89): « Previous 1 … 45 46 47 48 49 … 89 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Yet another guide enhancer :0) carpeVideo 18 10,403 2010-04-07, 03:39 PM
Last Post: carpeVideo
  Guide Questions native 6 4,285 2010-02-10, 01:23 PM
Last Post: native
  Mencoder with multiple TS audio streams lanmat 2 4,628 2009-11-09, 12:15 PM
Last Post: lanmat
  mencoder error messages fvfv 3 2,869 2009-10-19, 08:07 PM
Last Post: -stattik-
  TV guide table colour Pob 3 2,506 2009-09-21, 10:55 PM
Last Post: Snooze
  Searching Guide Contents skycyclepilot 1 2,035 2009-08-23, 03:30 PM
Last Post: McBainUK
  Search for Movies in TV Guide spdrac1 1 2,045 2009-05-23, 03:37 PM
Last Post: JavaWiz
  MPEG2 transcoding to Xvid/AAC -which plug-in/tool are best fit? blizard 6 5,146 2009-03-01, 05:43 PM
Last Post: Deusxmachina
  Warning: Mencoder and large MPEG2 files can fail jam_zhou 1 1,708 2008-07-26, 01:39 AM
Last Post: sgilani
  Comskip, Comclean, Rename Recording, and Transcoding heath11 18 10,776 2008-03-27, 11:45 PM
Last Post: _Dude_

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode