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 … 41 42 43 44 45 … 1231 Next »
ffmpeg mpeg4 codec problem VBR TS file

 
  • 0 Vote(s) - 0 Average
ffmpeg mpeg4 codec problem VBR TS file
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#1
2010-02-01, 11:30 PM (This post was last modified: 2010-02-06, 08:01 PM by luttrell1962.)
I have a batch file to run on a ts file that is 1080p, but says file is 60fps according ffmpeg. Looks like mpeg4 codec only supports 30fps. (I think this is my problem)

During the first pass I get a average of bitrate of 2200 but the second pass the mpeg4 codec complains that the bitrate is to low for the codec and errors out. codec below.

Code:
"D:\Program Files (x86)\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -y -i %1 -ab 128k -ac 2 -acodec libmp3lame -ar 44100 -deinterlace -f avi -threads 8 -pass 1 -b 5000k -minrate 0 -maxrate 10000k -bufsize 300k  -vcodec mpeg4 -vtag xvid nul
"D:\Program Files (x86)\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -y -i %1 -ab 128k -ac 2 -acodec libmp3lame -ar 44100 -deinterlace -f avi -threads 8 -pass 2 -b 5000 -minratek 0 -maxrate 10000k -bufsize 300k  -vcodec mpeg4 -vtag xvid %2

I might need to convert the file to 30fps first and this may fix the problem.
DMO Mpeg4 Decoder DMO MPG4, mpg4, mp42, MP42 MPG4DECD.dll


VBR can really compress this file and still have good quality if I can get it to work. Do I need a different mpeg4 codec?

Whats a mpeg4s codec?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,947
Threads: 956
Joined: May 2006
#2
2010-02-01, 11:58 PM
mp4 is just a container and 60 (59.94) fps is not a problem. The problem is likely a transcoding problem 1080p 60 fps is higher than broadcast quality so often it is already compressed or some format like avchd or mjpeg from a camera that needs better tools than the old ffmpeg distributed with gbpvr.

Martin
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#3
2010-02-02, 01:41 PM
I'm loaded the lame ACM codec but I don't know what the codec name is in ffmpeg. I've looked everywhere but can't seem to find the name. The test file has two audio channels.

If I put -ar 44100 in the batch file I don't get the error

This works with the mp3 codec but I get no audio in playback

Code:
"D:\Program Files (x86)\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -y -i %1 -an -f avi -threads 8 -pass 1 -b 5000k -minrate 0k -maxrate 10000k -vcodec mpeg4 -bufsize 4500k -vtag divx nul
"D:\Program Files (x86)\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -y -i %1 -ab 224k -acodec mp3 -ac 2 -ar 44100 -f avi -threads 8 -pass 2 -b 5000k -minrate 0k -maxrate 10000k -vcodec mpeg4 -bufsize 4500k

When I look at the file with avi utility there is no audio in the file.
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#4
2010-02-02, 08:45 PM (This post was last modified: 2010-02-02, 09:22 PM by luttrell1962.)
I tried another recording and it works except the audio is slightly out-of-sync. I preprocess the file with tsremux. I thought that fixed the problem. More research. It might be that I need to put a offset on the audio. I found this site http://howto-pages.org/ffmpeg/ that list information on how to offset the audio. But it is for linux. I don't know if the audio offset option works with ffmpeg for windows yet.
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#5
2010-02-03, 04:14 PM
in first example you have -b 5000k on first line, and -b 5000 on second...
that's why it was erroring out...[-b 5000 = 5k]

use "libmp3lame" for lame codec..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#6
2010-02-04, 12:08 AM
I can't get lame to install in windows 7 x64 I heard there is a special version. I've tried all the suggestions on the net copy the file to windows\system32. I did get it to install once but had version 3.98.2 but had a problem with it. I wanted to load 3.97. I don't know how I got 3.98.2 to install. Then I installed lame 64bit ACM driver finally got it to load but ffmpeg complains codec not found. Is the ACM codec another name?

I completely reloaded windows 7 x64 the other day thinking something was messed up. I had loaded about a million codecs and other junk like ATI media center that I could not get to uninstall.
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#7
2010-02-04, 07:57 AM
Well I figured somethings out. I downloaded a bunch of different versions of ffmpeg and found version 18695.7 worked the best and has libmp3lame built in. Encoding vbr was about 6x faster than the supplied ffmpeg with GB-PVR. I run the file through txmuxer because I'm on an antenna and sometimes get frame errors, but it does not fix everything mpeg4 still reports errors and a bad file. Audio still gets off on a severely damaged file. The vbr quality seems greatly increased @ 1080p I was going to 720p but with the new ffmpeg I will go back to the higher resolution.

You can get the update ffmpeg from here
http://sourceforge.net/projects/mplayer-...es/FFmpeg/

I also found the -async command helps some but not sure of the parameters. I put -async 44100 in.
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#8
2010-02-05, 09:03 PM (This post was last modified: 2010-02-05, 09:41 PM by luttrell1962.)
Projectx works from the command line and splits out the video and audio files. You have to install java sdk to use it. It corrects errors in the video file and realigns the audio.

You also need to set the JAVA_HOME environment variable and add a path to the java bin directory. Note that Java with GB-PVR won't work until you reboot after adding the bin directory to the path. Google setting system environment variables for your operating system.

Config.xml entry
Code:
<Conversion name="HD Divx 2-pass" exe="Divx2pass.bat" cmd="{SOURCE_FILE} {DEST_FILE}" targetExtension=".avi" />

Batch file loaded into the third party directory. Divx2pass.bat
Code:
d:
cd \projectx
copy %1 d:\projectx\temp.ts
java.exe -jar projectX.jar temp.ts
"D:\Program Files (x86)\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -y -i d:\projectx\temp.m2v -an -f avi -threads 8 -pass 1 -s 1280x720 -b 3500k -minrate 0k -maxrate 10000k -vcodec mpeg4 -bufsize 1000k -vtag divx nul
"D:\Program Files (x86)\Devnz\GBPVR\Third Party\ffmpeg\ffmpeg.exe" -y -i d:\projectx\temp.m2v -i d:\projectx\temp.ac3 -ab 128k -acodec libmp3lame -ac 2 -async 1 -ar 44100 -f avi -threads 8 -pass 2 -s 1280x720 -b 3500k -minrate 0k -maxrate 10000k -vcodec mpeg4 -bufsize 1000k -vtag divx %2
del temp.m2v
del *.ac3
del temp.ts
del *.log
del ffmpeg*.log
rem restore path
cd "\program files (x86)\Devnz\GBPVR"
IF EXIST "%~dp1%~n1.avi" DEL %1
EXIT

I use 720p 1280x720, to save space, ffmpeg does not do that well with 1080p for some reason. Maybe uping the -b bitrate option to 8000k-10000k would make it better. But I'm happy with the filesize and quality.

Each pass on my machine was about 60fps. So it takes just as long to re encode the file as it did to record it. I have a fast machine though X4@3.6ghz
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#9
2010-02-06, 06:04 PM
I'm having problem with the java not running. It was working then it stopped. It's jave x64. It always works from the cmd32 prompt running it manually. Just does not work when the batch file is called from Pvrx2. It could be because it is 64 bit java. Will try downloading 32 bit java.

This is the only program that I found that works good for correctly fixing antenna feed errors. I always get a few dropped frames. So during conversion the audio gets messed up. Frustrating....:eek:
Computer AMD 550 X4 unlocked @ 3.6ghz. 4 gigs ddr2 1066. 3 Samsung F3 500gb drives raid 0. HD 4870 Video. 2 ATI HD 650 PCie video capture cards. Scythe automatic temp/fan controller. 28" Hanns-G Monitor. Windows 7 x64
luttrell1962
Offline

Member

Posts: 157
Threads: 28
Joined: Jan 2010
#10
2010-02-06, 06:41 PM
Strange seems if you change something via config.exe it changes something in the environment when running a batch from pvrx2. I also noticed that the java did not exit task manager. But I changed the batch file while it was running so that might have affected it.

will see if it runs more than once. I changed java to javaw
Computer AMD 550 X4 unlocked @ 3.6ghz. 4 gigs ddr2 1066. 3 Samsung F3 500gb drives raid 0. HD 4870 Video. 2 ATI HD 650 PCie video capture cards. Scythe automatic temp/fan controller. 28" Hanns-G Monitor. Windows 7 x64
« 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,676 2012-09-30, 05:20 PM
Last Post: sub
  Composite channel configuration problem. seymoria 6 4,578 2012-01-15, 10:15 PM
Last Post: seymoria
  Recording problem with Hauppauge Nova-S USB2 ... softfoot 4 3,381 2011-06-27, 02:06 AM
Last Post: sub
  Problem with GB-PVR - Cannot Watch Channels and Administrator Problem Greg Smith 10 4,430 2011-05-22, 05:09 PM
Last Post: sub
  Problem with switch to DST next 4 2,303 2011-03-29, 08:42 PM
Last Post: darag2358
  Huge database (+27GB) - is it a problem? pme 7 2,991 2011-01-24, 12:37 AM
Last Post: gEd
  MCE 2005 IR Blaster problem persim 6 3,440 2010-12-29, 01:28 AM
Last Post: persim
  Another pause problem fleapower 10 3,774 2010-12-15, 09:33 PM
Last Post: fleapower
  remote problem in GBPVR Zacken 5 2,599 2010-12-08, 09:00 PM
Last Post: Zacken
  Transcode Problem axeman91 7 3,303 2010-11-22, 09:02 AM
Last Post: goelectric

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

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

Linear Mode
Threaded Mode