SageTV Community  

Go Back   SageTV Community > SageTV BETA Release Products > SageTV Beta Test Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Beta Test Software Discussion related to BETA Releases of the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. regarding SageTV Beta Releases should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-19-2006, 11:58 AM
Wade Wade is offline
Sage User
 
Join Date: Feb 2006
Location: NoVA
Posts: 33
Help creating h.264 mp4 with SageTVTranscoder

I'm having a difficult time trying to get the SageTVTranscoder to create a h.264 mp4. As a test, I created a batch program so I could play with the settings until I get a successful transcode.

The command line I'm using is:

Code:
"c:\program files\sagetv\sagetv\sagetvtranscoder.exe" -i "e:\myvideos\input.mpg" -vcodec h264 -b 800000 -r 29.97 -s 320x240 -aspect 4:3 "e:\myvideos\output.mp4"
And the output is:

Code:
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --extra-libs=-lwsock32 --enable-faad --enable-x264 --enable-me
malign-hack --enable-a52 --enable-gpl --enable-xvid --enable-faac --enable-mp3la
me --disable-debug --enable-amr_wb --enable-amr_nb
  libavutil version: 49.0.1
  libavcodec version: 51.19.0
  libavformat version: 50.6.0
  built on Oct 31 2006 16:52:20, gcc: 3.2.3 (mingw special 20030504-1)
Input #0, mpeg, from 'e:\myvideos\input.mpg':
  Duration: 00:01:20.5, start: 0.311256, bitrate: 12806 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, AR: 4:3, interlaced,
12000 kb/s, 29.97 fps(r)
  Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s
Output #0, mp4, to 'e:\myvideos\output.mp4':
  Stream #0.0: Video: h264, yuv420p, 320x240, AR: 4:3, progressive, q=2-31, 800
kb/s, 29.97 fps(c)
  Stream #0.1: Audio: aac, 48000 Hz, stereo, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[h264 @ 009BD154]using SAR=1/1
[h264 @ 009BD154]using cpu capabilities MMX MMXEXT SSE SSE2
FFMPEG has crashed with signal 11 !!!
You'll notice from the output that it fails.

If I put the -vn (disable video) flag, it creates the mp4 with just the audio portion and successfully completes. So, it's definately failing on the video portion.

Am I missing something here or is h.264 not fully supported yet in the transcoder? Any input would be appreciated.

Thanks,
Wade
Reply With Quote
  #2  
Old 11-19-2006, 04:40 PM
Patilan Patilan is offline
Sage Advanced User
 
Join Date: Oct 2006
Location: Lake Forest, Illinois, USA
Posts: 237
Quote:
Originally Posted by Wade
The command line I'm using is:
Code:
"c:\program files\sagetv\sagetv\sagetvtranscoder.exe" -i "e:\myvideos\input.mpg" -vcodec h264 -b 800000 -r 29.97 -s 320x240 -aspect 4:3 "e:\myvideos\output.mp4"
I have a few ideas that might help.

First, try using avi container for your output. It has always worked for me rock solid.

Second, do you really want to scale? Get rid of the "-s 320x240". Unless you plan to transfer the video to some weird portable device, then you really don't want to scale, or you'll be seriously hurting the quality of the video. Just let the player worry about proper scaling at play time. The only thing you want to play with is the bitrate.

And don't worry about the frame rate either. Normally the transcoder will pick it up from your source.

Try simplifying your command line like this:
Code:
"...\sagetvtranscoder.exe" -i "x:\...\input.mpg" -vcodec h264 -acodec copy -b 900000 "x:\...\output.avi"
(By the way, with this particular build of sagetvtranscoder.exe I was never able to get the outpit close to the bitrate that I specify: I tell it 800kbs, it makes it 1184kbs; I tell it 1600kbs, it makes it 1749kbs. Whatever.)

So, see if the above works and let me know. Further help about the so called "sagetvtranscoder.exe" (aka: ffmpeg) you can find here. Also, some good advice about video conversions in general can be found here.

But if you really are going to do your transcodes with bat files and scripts, then I think you better not use sagetvtranscoder. Go for MEncoder instead. (the docs for mencoder are here, and the latest pc builds can be found here) I say this because, unlike ffmpeg, Mencoder has filters. And if your originals are mostly TV captures, then chances are you'll want to inverse-telecine. Let me know if you are interested and I can post a simple script that works.

Patilan
Reply With Quote
  #3  
Old 11-19-2006, 05:19 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
If you're open to trying SageMC (which I think everyone should; mlbdude and flachbar have worked incredibly hard to make an STV that's equal and/or better than the default STV in almost everyway), i've written a pretty nice plug-in that uses mencoder to compress SageTV recordings and includes some nice pre-made profiles for encoding with h.264.

@Patilan
You especially should check out my plug-in because in the last few weeks i've made a lot of adjustments to it based on your recent posts.
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #4  
Old 11-19-2006, 05:25 PM
Wade Wade is offline
Sage User
 
Join Date: Feb 2006
Location: NoVA
Posts: 33
Patilan, thanks for the feedback.

I've just picked up a Zune, which is my inspiration for delving into transcoding. From what I've gleened so far, MS is very restrictive as to the type/size of the video that the Zune can handle.

I would really like to get the SageTVTranscoder (ffmpeg) working from within Sage so I can set my transcodes as needed. I'm not worried about hard drive space, as I rarely keep shows for archive. I'm more interested in occasionally converting one for the Zune.

I did find a frontend to mplayer/ffmpeg/mencoder that creates a mp4 using h264/aac that appears to work well. It can be found at Super.

I'll give your tips a try after the games and report back.

Thanks,
Wade
Reply With Quote
  #5  
Old 11-19-2006, 05:43 PM
Patilan Patilan is offline
Sage Advanced User
 
Join Date: Oct 2006
Location: Lake Forest, Illinois, USA
Posts: 237
Quote:
Originally Posted by evilpenguin
i've written a pretty nice plug-in that uses mencoder...
OMG! WHY HVEN'T I HEARD ABOUT THIS???

Man, this is the nicest news I've heard i a long time! You are the best!

I'll get right to it!

Yours forever,
Patilan
Reply With Quote
  #6  
Old 11-19-2006, 06:17 PM
Patilan Patilan is offline
Sage Advanced User
 
Join Date: Oct 2006
Location: Lake Forest, Illinois, USA
Posts: 237
Quote:
Originally Posted by Wade
I've just picked up a Zune, which is my inspiration for delving into transcoding. From what I've gleened so far, MS is very restrictive as to the type/size of the video that the Zune can handle.
Do you have any URL where I can see what Zune can handle?

Quote:
Originally Posted by Wade
I would really like to get the SageTVTranscoder (ffmpeg) working from within Sage so I can set my transcodes as needed. I'm not worried about hard drive space, as I rarely keep shows for archive. I'm more interested in occasionally converting one for the Zune.
Well, if you don't keep shows for archive, and if you don't worry about hard drive space, and if it's only for occasionally converting one for the Zune, then why bother with H.264? DIVX will do just fine for this purpose. Just modify one of the "MPEG4" presets in sage.properties, add the resizing if Zune requires it, and you're done. Plus, you'll do the transcodings anywhere from 3 to 6 times faster than with H.264 depending on the settings.

Quote:
Originally Posted by Wade
I did find a frontend to mplayer/ffmpeg/mencoder...Super..
I tried that Super before and I didn't like it. A much nicer frontend (imho) is MEncoder264. It is interesting to watch it's debug window what the command line looks like after playing with its settings. But now that evilpenguin says that he's made a mencoder plugin for sage, we hopefully won't ever need any frontends or scripts!

Patilan
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.