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 … 376 377 378 379 380 … 433 Next »
postprocessing.bat / ffmpeg sync issues

postprocessing.bat / ffmpeg sync issues
FNM
Offline

Member

Posts: 53
Threads: 6
Joined: Nov 2008
#1
2011-02-16, 03:37 PM
Hey all,

Not a problem with NPVR - happily using that without issue. I've been trying for a month now to sort out conversion as I can't dl too many 2 gig files at a time. I need a batch solution as I have daily recordings. My divx conversion in GBPVR worked seamlessly.

Think from what I've seen in general if I want to do this the best option is to convert to mpeg4 with TS files however I can't get the damn thing to stay in sync.

The TS is perfect though the recording is 2/3 seconds out. Has anyone had any luck converting ts files using postprocessing.bat and if so could you paste your ffmpeg or whatever you use command lines from the bat so I could try?

I'm using this at the moment - any suggestions would be warmly received:

Quote:REM Encode to mp4 changing file extension
"C:\Users\Public\NPVR\Scripts\ffmpeg.exe" -y -i %1 -f mp4 -vcodec mpeg4 -deinterlace -r 25 -aspect 16:9 -acodec libfaac -qscale 6 -ar 48000 -async 100000 -ac 2 "%~dpn1.mp4"
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#2
2011-02-16, 06:04 PM
don't use -r 25 unless you absolutely must, [ffmpeg will figure out the correct one] deinterlace shouldn't be needed unless it's interlaced material converted to progressive, same with aspect,ffmpeg will use same aspect as original... just maybe add '-fflags +genpts'...
i think max -async is 200 or so..

what sort of input material are you converting? npvr recordings? hd? formats? [1080i? 720p? 480i?] mixed interlaced and progressive? [only progressive tv is 720p]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
FNM
Offline

Member

Posts: 53
Threads: 6
Joined: Nov 2008
#3
2011-02-16, 07:06 PM
thanks for the great advice. Will try these tonight and report back.

I'm trying to convert TS from NPVR only (non HD). In GBPVR I had the auto divx feature rolling for me but the TS files in NPVR are getting too much to download. I record from the UK and watch day after in the US and my laptop is filling up fast.
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#4
2011-02-16, 07:54 PM
most all sd is interlaced,but it looks good with these params..
if you have plenty of time for encodes, you could make 264 codec in mp4 just as easily and looks better..Smile
Code:
ffmpeg.exe" -ss 2 -y -i %1 -flags +alt+ilme+ildct -bf 2 -crf 28 -acodec libfaac -ac 2 -ab 96k -vcodec libx264 -fpre libx264-fastfirstpass.ffpreset -level 40  -threads 0 "%~dpn1.mp4"
not that much slower [16fps] it uses -crf to control compression [like qscale] and aac sounds great at 96k..Smile
you need the ffpreset files tho [-fpre]..let me know if you don't have them..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
FNM
Offline

Member

Posts: 53
Threads: 6
Joined: Nov 2008
#5
2011-02-16, 08:21 PM
again thanks so much! Will give them all a try tonight. Yeah I can leave the encoders going - used to start them at midnight Smile

Will let you know how it pans out. Appreciate your input - this has been driving me nuts. I'll send you some Connectict snow in a bucket as thanks Wink
FNM
Offline

Member

Posts: 53
Threads: 6
Joined: Nov 2008
#6
2011-02-17, 01:59 PM
ok - reporting back. I used the following code taking out your suggestions and it was much better however it's gone from 2-3 seconds to 1 second like an echo Smile

I used this
Quote:"C:\Users\Public\NPVR\Scripts\ffmpeg.exe" -y -i %1 -f mp4 -vcodec mpeg4 -aspect 16:9 -acodec libfaac -qscale 6 -ar 48000 -async 200 -ac 2 "%~dpn1.mp4"

I tried the flags etc but dos kept saying it didn't recognize them. I also tried the code below but as you suspected it couldn't find ffpreset. Would be interested in trying your code you posted.
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#7
2011-02-17, 11:25 PM
hmmm,try -async 1 [just aligns start of file] and try without the -ar 48000 unless you really need it..
oh, and i use ffmpeg .5 version...

here's the -fpre file for second one..but probably only work for newer ffmpeg...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
FNM
Offline

Member

Posts: 53
Threads: 6
Joined: Nov 2008
#8
2011-02-17, 11:41 PM
hehe thanks will try. Think i'm on 0.9 or whatever I downloaded Smile

Trying those settings Cool
FNM
Offline

Member

Posts: 53
Threads: 6
Joined: Nov 2008
#9
2011-02-19, 01:25 AM (This post was last modified: 2011-02-19, 01:39 AM by FNM.)
Hey,

Took some of the changes out you suggested and got it down to about 1/2 second out of sync! So close

Quote:"C:\Users\Public\NPVR\Scripts\ffmpeg.exe" -y -i %1 -f mp4 -vcodec mpeg4 -deinterlace -aspect 16:9 -acodec libfaac -qscale 6 -ar 48000 -async 1 -ac 2 "%~dpn1.mp4"

Going to try the script now, see if that does it! Fingers x'd! :p

Question - where do I put the preset file - I threw it in the same dir as ffmpeg (C:\Users\Public\NPVR\Scripts) but got this output

C:\Users\Public\NPVR\Scripts>"C:\Users\Public\NPVR\Scripts\ffmpeg.exe" -ss 2 -y
-i c:\temp\time\test.ts -flags +alt+ilme+ildct -bf 2 -crf 28 -acodec libfaac -ac
2 -ab 96k -vcodec libx264 -fpre libx264-fastfirstpass.ffpreset -level 40 -thre
ads 0 "c:\Temp\Time\test.mp4"
FFmpeg version SVN-r18639, Copyright © 2000-2009 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --enable-postproc --enable-gpl --enable-
libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libvorbis
--enable-libtheora --enable-libx264 --enable-libxvid --disable-ffserver --enable
-avisynth --enable-pthreads
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 21 2009 13:44:38, gcc: 4.2.4 (TDM-1 for MinGW)

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 25.00 (25/1)
Input #0, mpegts, from 'c:\temp\time\test.ts':
Duration: 01:09:54.89, start: 4940.051756, bitrate: 3612 kb/s
Program 8384
Stream #0.0[0x230]: Video: mpeg2video, yuv420p, 704x576 [PAR 16:11 DAR 16:9]
, 15000 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x231](eng): Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.2[0x232](eng): Audio: mp3, 0 channels, s16
Stream #0.3[0x233](eng): Subtitle: dvbsub
C:\Users\Public\NPVR\Scripts\ffmpeg.exe: unrecognized option '-fpre'
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#10
2011-02-19, 02:18 AM
hmmm,that versions doesn't understand the -fpre option....must be old [april 2009] you need a newer one, there's compiled nightly snapshots available somewhere..
at least v .5 or better should do it...then just place that file in same dir..Smile
glad it's showing progress...keep in mind order of opts is very important, relative to input specially, so sometimes just re-ordering them makes a difference..
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
Information Audio Video Sync Fixed with AC3Filter! gearsofwoe 0 1,028 2022-11-18, 04:36 AM
Last Post: gearsofwoe
  tsreader4 skipping issues dlindyds 63 13,657 2021-09-05, 03:23 AM
Last Post: rizarefaldi
  Fast-forward and comskip issues manic_biker 11 3,659 2021-07-12, 02:17 AM
Last Post: Robazz
  Issues with Signal? Tularis 6 2,261 2021-05-01, 11:09 AM
Last Post: shspvr
  Recurring recording major issues djsinfl 31 6,608 2020-04-27, 02:52 AM
Last Post: djsinfl
  Schedules Direct issues artmetz 4 1,895 2020-04-22, 12:13 AM
Last Post: artmetz
  Windows 10 Record Issues Captain Jack 11 5,264 2020-02-02, 09:11 PM
Last Post: Captain Jack
  Issues launching NextPVR filosad 3 2,094 2019-12-31, 01:11 AM
Last Post: sub
  Audio/video sync problem on playback and program freeze when resuming zer 34 12,792 2019-12-21, 02:49 PM
Last Post: HarryH3
  postprocessing batch to escape special characters donbrew 3 1,687 2019-11-06, 11:29 PM
Last Post: JavaWiz

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

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

Linear Mode
Threaded Mode