NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 236 237 238 239 240 … 433 Next »
Question: record and convert?

Question: record and convert?
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#11
2013-10-16, 12:27 PM
johnsonx42 Wrote:No, "%1" is correct. "%~1" is invalid, and %1 without the quotes would break due to the space in the path ("Manual Recordings").

There's a couple of possibilities: one, when NRecord runs a .bat file, it's running as Local System, not your normal user. It could be that Local System doesn't have the permissions it needs to write the file to C:\. Try making a directory for it, and make sure Local System has permissions. Google "command prompt as local system" and you'll find a way to manually launch a command prompt with local system permissions so that you can test your batch file.

two, when NRecord runs a script the starting directory is not what you want it to be... I've forgotten what it is, might be c:\windows\system32 or something like that. you should start with a cd command to a valid directory, like "cd /d c:\temp" if you have a temp folder there, or "cd /d "%dp0"" if you want to run in the NPVR scripts directory.
I'm pretty sure the %1 parameter comes with qoutes.

"I'd rather have a bottle in front of me than a frontal lobotomy"
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#12
2013-10-16, 12:45 PM
Reddwarf Wrote:I'm pretty sure the %1 parameter comes with qoutes.
Yes, you're right, NPVR does pass the quotes along. My bad, %1 is correct with no quotes. Also had a typo in my cd examples, the last should have been cd /d "%~dp0".
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
haste18
Offline

Junior Member

Posts: 19
Threads: 7
Joined: Oct 2013
#13
2013-11-12, 10:00 AM
Thanks guys for the help. I've got it all working now.

Just wondering about something else. I'm recording radio and tv. Is it possible to check after recording if the .TS contains a video stream? If so then execute ffmpeg to convert audio + video to MP4.. if not then execute ffmpeg to convert audio with a still image.
I need to upload radio recordings to YouTube. They don't accept audio without video. So i need to attach a still image so it looks lika a video.

Any examples how this can be fixed within a batch file?

Thanks!
Zeb
Offline

Senior Member

U.S.A.
Posts: 596
Threads: 2
Joined: Dec 2012
#14
2013-11-13, 03:03 AM (This post was last modified: 2013-11-13, 03:15 AM by Zeb.)
The usual way of creating "slide shows" with still image(s) and a soundtrack is with video-editing software. I have some slide show music videos on YouTube, however I did not use NextPVR to record the audio. I used Audacity (which is free) to record, edit and export audio as WAV; then used Adobe Premiere Elements 4 (not free, older version and does not support .ts files) to add JPEG images and export as Flash video for uploading to YouTube. Good luck coming up with a batch file that can do that. [Edit] Oh yeah, also used Photoshop Elements to crop and resize images.
vintdiesel
Offline

Member

Posts: 114
Threads: 23
Joined: Jan 2012
#15
2013-11-13, 04:27 AM
Reddwarf wrote:
Quote:I used ffmpeg to convert recordings in PostProcessing.bat for a while, got the size down to 1/3 without losing any visible quality, but the drawback is that ffmpeg tends to crash if there is a glitch in the recording, so I wouldn't recommend it.

Agreed, I used to have that problem over a year ago, however an update to ffmpeg made that problem go away for me. Yes there was a glitch and some pixelation that clears in a few seconds, but still very watchable.

Due to the ffmpeg running the CPU at 100% making the fans in my PC go hard, I schedule to run after midnight. IIRC Handbrake has an inbuilt facility to do just that, but I had already created a script using solely ffmpeg.
Win Server: ASRock P67 Pro3 B3, i5 2500K 4.0Ghz, 16GB, Nvidia GT430 HDMI, Win 10 Pro 64bit, Win-TV Quad HD, Win-TV Nova-T USB.
UnRaid NAS Server: Gigabyte i7 2600 3.4Ghz, 16GB, S3 Trio VGA PCI Video, DVB LibreElec for DVB-T tuner drivers, Hauppage Win-TV 2210 Dual DVB-T.
Win Client: Intel NUC i3 Broadwell, 4GB Ram, 128GB SSD, Win 10 Pro 64bit.
Linux Client: Raspberry Pi 3+, OSMC + Kodi
haste18
Offline

Junior Member

Posts: 19
Threads: 7
Joined: Oct 2013
#16
2013-11-13, 07:30 AM
Zeb Wrote:The usual way of creating "slide shows" with still image(s) and a soundtrack is with video-editing software. I have some slide show music videos on YouTube, however I did not use NextPVR to record the audio. I used Audacity (which is free) to record, edit and export audio as WAV; then used Adobe Premiere Elements 4 (not free, older version and does not support .ts files) to add JPEG images and export as Flash video for uploading to YouTube. Good luck coming up with a batch file that can do that. [Edit] Oh yeah, also used Photoshop Elements to crop and resize images.

Hmm.. this is not what I'm asking. The ffmpeg supports converting audio + image = video. That's not the problem. The problem is the way to detect if NPVR recorded audio (radio) or video + audio (tv). If audio only is recorded, I need to add a still image, so it becomes a video with audio and can be uploaded to YouTube.

I'm looking for a way to detect if a file contains a video stream. If it does, then convert audio + video to MP4 if it doens't, then convert audio + still image (video.jpg) to MP4.

Anybody any idea?
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#17
2013-11-13, 10:14 AM
One of the items passed to postprocessing.bat is the channel number.
I guess you could use this to determine if a recording is radio or not???

http://www.nextpvr.com/nwiki/pmwiki.php?...Files#toc5
haste18
Offline

Junior Member

Posts: 19
Threads: 7
Joined: Oct 2013
#18
2013-11-13, 12:53 PM
martint123 Wrote:One of the items passed to postprocessing.bat is the channel number.
I guess you could use this to determine if a recording is radio or not???

http://www.nextpvr.com/nwiki/pmwiki.php?...Files#toc5

Thanks, i've found the solution:

Code:
IF %2 LEQ 4 (
C:\ffmpeg\bin\ffmpeg.exe -y -i %1 -codec:v libx264 -profile:v high -flags +cgop -preset slow -b:v 5000k -maxrate 5000k -bufsize 1000k -r 25 -c:a aac -strict experimental "%~dpn1.mp4"
) else (
C:\ffmpeg\bin\ffmpeg.exe -loop 1 -i c:\audio.jpg -i %1 -shortest -c:v libx264 -preset medium -tune stillimage -c:a aac -strict experimental -b:a 192k -pix_fmt yuv420p -crf 18 "%~dpn1.mp4"
)

So if the channel number is less then or equals 4, then it's a video otherwise it's audio! Great!!
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't watch certain channels on live tv (but can record) tvwatcher 4 2,124 2021-05-05, 06:23 AM
Last Post: tvwatcher
  Recordings with Next PVR 4.2.5 (CL0116) have background music but no voice in record DavidF 4 2,077 2021-01-07, 08:47 AM
Last Post: sub
  Possible to record in different format than .ts files? gadgetgaz 29 12,716 2020-10-04, 03:05 PM
Last Post: Ehrlichia
  Can't record repeating programs dave22 2 1,815 2020-04-20, 04:27 PM
Last Post: sub
  Windows 10 Record Issues Captain Jack 11 5,423 2020-02-02, 09:11 PM
Last Post: Captain Jack
  changing channels in guide - stupid user question mt900spg 2 1,589 2019-12-19, 01:30 PM
Last Post: mvallevand
  Record direct from live tv? rv0987 3 1,945 2019-11-01, 12:29 PM
Last Post: rv0987
  Won't Record with Windows 10 v. 1903 GWCowling323 5 3,459 2019-10-15, 03:51 PM
Last Post: mvallevand
  NextPVR - black screen when watching and can't record XC-3730C 5 2,976 2019-10-14, 05:08 PM
Last Post: sub
  Question about Channel Changing hdpvr-doug8796 6 2,420 2019-10-09, 06:24 PM
Last Post: hdpvr-doug8796

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

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

Linear Mode
Threaded Mode