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) GB-PVR Support (legacy) v
« Previous 1 … 466 467 468 469 470 … 1231 Next »
batch file help

 
  • 0 Vote(s) - 0 Average
batch file help
bigC
Offline

Member

Posts: 63
Threads: 10
Joined: Feb 2007
#1
2007-09-20, 09:31 PM
I'm trying to convert a custom ffmpeg conversion thing in my config.xml to a string I can use in a .bat file. I just can't figure it out. Heres the bit I want to use,
Code:
<Conversion name="Make DVD ready" cmd=" -y -i {SOURCE_FILE} -sc_threshold 1000000000  -flags +cgop+ildct -target ntsc-dvd -f dvd -b 3000k -vcodec mpeg2video -acodec mp2 -ab 128 {DEST_FILE}" targetExtension=".new.mpg" />
I pieced together some code I found in the wiki and on this forum and came up with this,
Code:
@echo off

cd “C:\Program Files\devnz\gbpvr\Third Party”
FFmpeg\ffmpeg.exe -y -i “%~dpn1.mpg” -sc_threshold 1000000000 -flags +cgop+ildct -target ntsc-dvd -f dvd -b 3000k -vcodec mpeg2video -acodec mp2 -ab 128 “%~dpn1.new.mpg"
It doesn't work. Sad What am I doing wrong? Can someone help? This is my first attempt at creating a batch file so I'm rather clueless at the moment. I hope to improve.Big Grin

Thanks
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#2
2007-09-20, 09:42 PM
bigC Wrote:I'm trying to convert a custom ffmpeg conversion thing in my config.xml to a string I can use in a .bat file. I just can't figure it out. Heres the bit I want to use,
Code:
<Conversion name="Make DVD ready" cmd=" -y -i {SOURCE_FILE} -sc_threshold 1000000000  -flags +cgop+ildct -target ntsc-dvd -f dvd -b 3000k -vcodec mpeg2video -acodec mp2 -ab 128 {DEST_FILE}" targetExtension=".new.mpg" />
I pieced together some code I found in the wiki and on this forum and came up with this,
Code:
@echo off

cd “C:\Program Files\devnz\gbpvr\Third Party”
FFmpeg\ffmpeg.exe -y -i “%~dpn1.mpg” -sc_threshold 1000000000 -flags +cgop+ildct -target ntsc-dvd -f dvd -b 3000k -vcodec mpeg2video -acodec mp2 -ab 128 “%~dpn1.new.mpg"
It doesn't work. Sad What am I doing wrong? Can someone help? This is my first attempt at creating a batch file so I'm rather clueless at the moment. I hope to improve.Big Grin

Thanks

What is failing exactly? Are you getting any error messages?
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#3
2007-09-20, 09:51 PM
put the quotes all the way to the end of the .exe

Like this “C:\Program Files\devnz\gbpvr\Third Party\ffmpeg.exe"

also just specifying -target ntsc-dvd and an output file might be enough.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#4
2007-09-20, 10:02 PM
I found this on my pc:

"C:\Program Files\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe" -i %1 -target ntsc-dvd -acodec copy "%~dpn1_mvp.mpg"

I used this as a one line batch file to downconvert HD streams to play on my MVP.

Copy this to a new text file name it something like convert.bat and then drag the video to it. The command window should open and you'll see ffmpeg running and running and running.....

Actually you would need to change the acodec to mp2 if you're downconverting since most HDTV is AC3.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
bigC
Offline

Member

Posts: 63
Threads: 10
Joined: Feb 2007
#5
2007-09-20, 10:07 PM
dgeezer Wrote:put the quotes all the way to the end of the .exe

Like this “C:\Program Files\devnz\gbpvr\Third Party\ffmpeg.exe"
You mean “C:\Program Files\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe"

I tried that originaly.

The error I get is,

The file name, directory name, or volume label syntax is incorrect.
The system cannot find the path specified.
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#6
2007-09-20, 10:15 PM
You might try:

Code:
@echo off
Echo Changing to Utility Directory...
pushd C:\Program Files\devnz\gbpvr\Third Party
Echo.
Echo Attempting to convert %1
FFmpeg\ffmpeg.exe -y -i "%1" -sc_threshold 1000000000 -flags +cgop+ildct -target ntsc-dvd -f dvd -b 3000k -vcodec mpeg2video -acodec mp2 -ab 128 "%~dpn1.new.mpg"
Echo.
Echo Conversion Complete.  %ERRORLEVEL%
popd
Echo.
This should output some messages along the way so you can determine where the error is occuring. I can't tell you if the command parameters are exactly correct, but it should find the program and attempt to execute.

Note that i changed the hard coded -i “%~dpn1.mpg” to -i "%1". The orginal version would only work if the input file had an .mpg extension.
bigC
Offline

Member

Posts: 63
Threads: 10
Joined: Feb 2007
#7
2007-09-20, 10:23 PM
dgeezer Wrote:I found this on my pc:

"C:\Program Files\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe" -i %1 -target ntsc-dvd -acodec copy "%~dpn1_mvp.mpg"

I used this as a one line batch file to downconvert HD streams to play on my MVP.

Copy this to a new text file name it something like convert.bat and then drag the video to it. The command window should open and you'll see ffmpeg running and running and running.....

Actually you would need to change the acodec to mp2 if you're downconverting since most HDTV is AC3.
OK, that created a file of 0 bytes?

I'll try yours next javawiz.

My tuner card doesn't record to dvd ready mpgs so before I can burn a show I must do this conversion.
bigC
Offline

Member

Posts: 63
Threads: 10
Joined: Feb 2007
#8
2007-09-20, 10:38 PM (This post was last modified: 2007-09-20, 10:57 PM by bigC.)
Javawiz, I just tried yours and got this error,

C:\Documents: I/O error occured
Usually that means the input file is truncated and/or corrupted.

Edit: It seems to be getting hung up on spaces in the path to my mpg. If I put in a top level folder and remove all spaces it works. Like c:\shows\myshow.mpg works but c:\my shows\my show.mpg does not. How do I fix that?
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#9
2007-09-20, 10:59 PM
Ok, sorry missed some quotes...

should be

pushd "C:\Program Files\devnz\gbpvr\Third Party"

And, the echo statement "attempting to convert...."
does it list the correct filename? (ie it's not truncated)?
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#10
2007-09-20, 11:12 PM (This post was last modified: 2007-09-21, 07:45 AM by pBS.)
try this...
Code:
@echo off
Echo.
Echo Attempting to convert %1
"c:\program files\devnz\gbpvr\third party\ffmpeg\ffmpeg.exe" -y -i "%~1" -sc_threshold 1000000000 -flags +cgop+ildct -target ntsc-dvd -f dvd -b 3000k -vcodec mpeg2video -acodec mp2 -ab 128 "%~dpn1.new.mpg"
Echo.
Echo Conversion Complete.  %ERRORLEVEL%
Echo.
it will work whether incoming file has quotes or not, and doesn't need to change any directories...

just adjust the cmd line for your ffmpeg's location.
%~1 removes any quotes, and "%~1" removes any if found, and adds some..
[to avoid double-double quotes]

oh and use quotes around the input filename! Big Grin
like: convert.bat "c:\some dir\some file.mpg"
otherwise the batch file sees it as %1 %2 %3 instead of just %1 cuz of the spaces..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  file types of recorded TV paul1 3 3,758 2012-09-30, 05:20 PM
Last Post: sub
  No Data In the Recorded File zb1 5 2,348 2010-08-24, 01:08 AM
Last Post: zb1
  Path to file being recorded. brianj 5 2,412 2010-08-08, 10:58 PM
Last Post: brianj
  error: failure playing back file yonu 4 2,113 2010-07-12, 12:52 AM
Last Post: yonu
  UK Freesat Scan.cache File jeffers 3 2,124 2010-05-25, 10:34 PM
Last Post: jeffers
  3 AC3Filter instances when playing back a still recording TS file? jksmurf 3 1,981 2010-05-17, 12:30 AM
Last Post: jksmurf
  Recording stops at 4gb file size experiencebliss 5 2,468 2010-05-04, 02:54 AM
Last Post: pBS
  Hauppage HVR-950q, no file created when recording, no pause. donbrowne 5 2,101 2010-04-08, 04:03 PM
Last Post: sub
  ffdshow postprocessing on .ts file playback alibert 2 1,739 2010-04-05, 05:33 AM
Last Post: alibert
  ATI Mux / mpeg file recordings playback issues topperdude 10 4,388 2010-03-29, 11:44 PM
Last Post: ww4397

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

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

Linear Mode
Threaded Mode