Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  TMPEGEnc template for MPEGs on Sansa E200 series
« previous next »
  • Print
Pages: [1]

Author Topic: TMPEGEnc template for MPEGs on Sansa E200 series  (Read 1793 times)

Offline RowaN

  • Member
  • *
  • Posts: 90
TMPEGEnc template for MPEGs on Sansa E200 series
« on: April 01, 2007, 01:49:55 PM »
Might be useful to someone.. my first stab at a template for encoding Sansa E200 friendly MPEGs using TMPEGEnc (www.tmpgenc.net). Correct video size, aspect ratio, full screen etc. Feel free to alter the quality setting (changes encoding time). At present videos dont play perfect, and end up badly losing sync (even with todays build), but I guess thats down to Rockbox not the file this template produces. If anyone feels they can do better or can suggest an improvement, why not post it here?

Save this code block as a file called sansa.mcf:
Code: [Select]
object TMPEGConfigFile
 Â MPEG.WizardTargetMedia = MPEGConfig_TargetMediaType_Unknown
 Â MPEG.WizardAutoCalcVideoBitRate = False
 Â MPEG.WizardAutoChooseList.EnableVideoSize = False
 Â MPEG.WizardAutoChooseList.VideoSize = <>
 Â MPEG.WizardAutoChooseList.EnableVideoGOP = False
 Â MPEG.WizardAutoChooseList.VideoGOP = <>
 Â MPEG.OutputStreamType = MPEG_OutputStreamType_System_VideoAudio
 Â MPEG.OutputStreamType_ReadOnly = False
 Â MPEG.Video.StreamType = MPEGVideoEncoder_StreamType_MPEG1
 Â MPEG.Video.StreamType_ReadOnly = False
 Â MPEG.Video.Width = 224
 Â MPEG.Video.Width_ReadOnly = False
 Â MPEG.Video.Height = 176
 Â MPEG.Video.Height_ReadOnly = False
 Â MPEG.Video.YUVFormat = 1
 Â MPEG.Video.YUVFormat_ReadOnly = False
 Â MPEG.Video.DC_prec = 1
 Â MPEG.Video.DC_prec_ReadOnly = False
 Â MPEG.Video.VideoEncodeMode = MPEGVideoEncoder_VideoEncodeMode_Interlace
 Â MPEG.Video.VideoEncodeMode_ReadOnly = False
 Â MPEG.Video.FrameRate = 131076
 Â MPEG.Video.FrameRate_ReadOnly = False
 Â MPEG.Video.AspectRatio = 6
 Â MPEG.Video.AspectRatio_ReadOnly = False
 Â MPEG.Video.RateControlMode = MPEGVideoEncoder_RateControlMode_CQ
 Â MPEG.Video.RateControlMode_ReadOnly = False
 Â MPEG.Video.MaxBitRate = 0
 Â MPEG.Video.MaxBitRate_ReadOnly = False
 Â MPEG.Video.MinBitRate = 0
 Â MPEG.Video.MinBitRate_ReadOnly = False
 Â MPEG.Video.MinAvgBitRate = 0
 Â MPEG.Video.MinAvgBitRate_ReadOnly = False
 Â MPEG.Video.CBR_BitRate = 7000000
 Â MPEG.Video.VBR_MultipassVBRAlgorithm = MPEGVideoEncoder_MultipassVBRAlgorithm_MultipassCQ
 Â MPEG.Video.VBR_AvgBitRate = 7000000
 Â MPEG.Video.VBR_MaxBitRate = 8000000
 Â MPEG.Video.VBR_MinBitRate = 2000000
 Â MPEG.Video.VBR_MaxPassCount = 2
 Â MPEG.Video.VBR_EnablePadding = False
 Â MPEG.Video.MVBR_MaxBitRate = 8000000
 Â MPEG.Video.MVBR_MinBitRate = 2000000
 Â MPEG.Video.MVBR_EnablePadding = False
 Â MPEG.Video.AVBR_MaxBitRate = 8000000
 Â MPEG.Video.AVBR_MinBitRate = 2000000
 Â MPEG.Video.AVBR_EnablePadding = False
 Â MPEG.Video.CQ_MaxBitRate = 8000000
 Â MPEG.Video.CQ_MinBitRate = 2000000
 Â MPEG.Video.CQ_EnablePadding = False
 Â MPEG.Video.VBVBufferSize = 229376
 Â MPEG.Video.VBVBufferSize_ReadOnly = False
 Â MPEG.Video.GOP_SeqHeaderInterval = 1
 Â MPEG.Video.GOP_SeqHeaderInterval_ReadOnly = False
 Â MPEG.Video.GOP_I_FrameCount = 1
 Â MPEG.Video.GOP_I_FrameCount_ReadOnly = False
 Â MPEG.Video.GOP_P_FrameCount = 5
 Â MPEG.Video.GOP_P_FrameCount_ReadOnly = False
 Â MPEG.Video.GOP_B_FrameCount = 2
 Â MPEG.Video.GOP_B_FrameCount_ReadOnly = False
 Â MPEG.Video.GOP_BitStreamForEdit = True
 Â MPEG.Video.GOP_BitStreamForEdit_ReadOnly = False
 Â MPEG.Video.GOP_MaxFrameCount = 18
 Â MPEG.Video.GOP_MaxFrameCount_ReadOnly = False
 Â MPEG.Video.QuantizeMatrix_Intra_ReadOnly = False
 Â MPEG.Video.QuantizeMatrix_NonIntra_ReadOnly = False
 Â MPEG.Video.Profile = 4
 Â MPEG.Video.Profile_ReadOnly = False
 Â MPEG.Video.Level = 8
 Â MPEG.Video.Level_ReadOnly = False
 Â MPEG.Video.VideoFormat = 2
 Â MPEG.Video.VideoFormat_ReadOnly = False
 Â MPEG.Video.DisplayWidth = 0
 Â MPEG.Video.DisplayWidth_ReadOnly = True
 Â MPEG.Video.DisplayHeight = 0
 Â MPEG.Video.DisplayHeight_ReadOnly = True
 Â MPEG.Video.MotionSearchSpeed = MPEGVideoEncoder_MotionSearchSpeed_Normal
 Â MPEG.Video.MotionSearch_AlwaysHalfPel = False
 Â MPEG.Video.UseFloatDCT = False
 Â MPEG.Video.QuantizeMode = False
 Â MPEG.Video.QuantizeModeVal_Intra = 35
 Â MPEG.Video.QuantizeModeVal_NonIntra = 35
 Â MPEG.Video.YUVBasicYCbCr = False
 Â MPEG.Video.QuantizeMatrix_Intra = {
 Â   081013161A1B1D22101016181B1D222513161A1B1D22222616161A1B1D222528
 Â   161A1B1D202328301A1B1D202328303A1A1B1D22262E38451B1D23262E384553}
 Â MPEG.Video.QuantizeMatrix_NonIntra = {
 Â   1011121314151617111213141516171812131415161718191314151617181A1B
 Â   14151617191A1B1C151617181A1B1C1E1617181A1B1C1E1F1718191B1C1E1F21}
 Â MPEG.Video.VBR_Quality_P = 0.000000000000000000
 Â MPEG.Video.VBR_Quality_B = 20.000000000000000000
 Â MPEG.Video.MVBR_Quality_P = 0.000000000000000000
 Â MPEG.Video.MVBR_Quality_B = 20.000000000000000000
 Â MPEG.Video.AVBR_Quality = 50.000000000000000000
 Â MPEG.Video.CQ_Quality = 65.000000000000000000
 Â MPEG.Video.CQ_Quality_P = 0.000000000000000000
 Â MPEG.Video.CQ_Quality_B = 20.000000000000000000
 Â MPEG.Audio.StreamType = MPEGAudioEncoder_StreamType_MPEG1_Layer2
 Â MPEG.Audio.StreamType_ReadOnly = False
 Â MPEG.Audio.SamplingFrequency = 44100
 Â MPEG.Audio.SamplingFrequency_ReadOnly = False
 Â MPEG.Audio.ChannelMode = 0
 Â MPEG.Audio.ChannelMode_ReadOnly = False
 Â MPEG.Audio.CantUseMono = False
 Â MPEG.Audio.BitRate = 192000
 Â MPEG.Audio.BitRate_ReadOnly = False
 Â MPEG.Audio.CalcCRC = True
 Â MPEG.Audio.CalcCRC_ReadOnly = False
 Â MPEG.Audio.OriginalFlag = False
 Â MPEG.Audio.OriginalFlag_ReadOnly = False
 Â MPEG.Audio.CopyrightFlag = False
 Â MPEG.Audio.CopyrightFlag_ReadOnly = False
 Â MPEG.Audio.PrivateFlag = False
 Â MPEG.Audio.PrivateFlag_ReadOnly = False
 Â MPEG.Audio.EmphasisType = 0
 Â MPEG.Audio.EmphasisType_ReadOnly = False
 Â MPEG.System.StreamType = MPEGSystemEncoder_StreamType_MPEG1
 Â MPEG.System.StreamType_ReadOnly = False
 Â MPEG.System.EnableCommentText = False
end
« Last Edit: April 01, 2007, 01:52:36 PM by RowaN »
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: TMPEGEnc template for MPEGs on Sansa E200 series
« Reply #1 on: April 01, 2007, 03:10:12 PM »
Some comments on this config:
1- TMPEGEnc is only free (as in beer) for MPEG1, the encoders suggested in the wiki are free (speech and beer) for MPEG2.
2- TMPEGEnc (in my testing) won't create the 14.985 FPS file you are trying to make.  It will create a 29.97 FPS file with duplicate frames, as 14.985 is a non-standard frameratre.  ffmpeg in the wiki will create honest sub-23.976 FPS files, non-standard as they might be.
3- Under the "Video" tab, changing "Motion Search Precision" to "High quality" improves high-action scenes dramatically, but does slow encoding down.  
4- Your Max and Min bitrates of 8000 and 2000 kbps are about 20 times what I would expect to be adequate.  This and #2 are why your videos are falling out of sync.
5- Under the "Quantize matrix" tab, "Use floating point DCT" adds a little to compression time, but seems to be worth it.
6- You have the input file Aspect Ratio at 16:9, yet are exporting to a 4:3.  Not always a problem, but you should be aware of that.
7- TMPEGEnc's audio encoder is not the best.  The wiki encoders do a better job.  When I use TMPEGEnc as my encoder I only let it do the video, and have TooLAME do the audio, then mux with TMPEGEnc's MPEG tools.  But that's the smallest thing.

EDIT:
Just verified #2.  Using your .mcf config file, a 30.564 second long test sample has 916 frames, 29.97 FPS.

#4 is odd, as TMPEGEnc appears to be ignoring your constraints.  Still it is encoding the video stream at an average of 674kbps, which is still quite high for that size video.  431kbps would be the equivalent of the SVCD bitrate at that resolution, and 469kbps was the average bitrate of the wiki encodes of Elephant's Dream.
« Last Edit: April 01, 2007, 03:41:04 PM by soap »
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: TMPEGEnc template for MPEGs on Sansa E200 series
« Reply #2 on: April 01, 2007, 04:00:30 PM »
Last note: You should never post "permanent" or "static" information here. These are discussion forums, information that should be static should be attached to the wiki. You could've simply attached sansa.mcf to the wiki page and added a usage description in the encoders section for TMPGEnc (though I'm personally not fond of it when there are very adequate GPL alternatives).
Logged

Offline RowaN

  • Member
  • *
  • Posts: 90
Re: TMPEGEnc template for MPEGs on Sansa E200 series
« Reply #3 on: April 01, 2007, 05:28:02 PM »
Thanks very much for your tips soap. I might well abandon this now then - I couldnt get TMPEGenc to produce proper 14fps file either. I didnt know Rockbox could play mpeg2 files!
« Last Edit: April 01, 2007, 05:30:18 PM by RowaN »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  TMPEGEnc template for MPEGs on Sansa E200 series
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.079 seconds with 15 queries.