in

andy vt's tools & blog

Automating lazy

OFFICIAL DTb mencoder profile thread

Last post 04-27-2008 8:52 PM by Inphoman. 89 replies.
Page 1 of 6 (90 items) 1 2 3 4 5 Next > ... Last »
Sort Posts: Previous Next
  • 04-17-2007 11:17 AM

    OFFICIAL DTb mencoder profile thread

    In the wake of a 22-page (and counting) thread started by jelwood and devoted to his effort to get mencoder working for DVR-MS files, this new thread will be devoted to compiling mencoder profiles for encoding the various DVR-MS sources to Mpeg-4, H.264, and WMV.

    Here is a quick explanation of what mencoder profiles are and where they are stored.  Here is how you would call one from the command-line:

    mencoder "input.dvr-ms" -quiet -profile PROFILENAME -o "output.avi"
    (note: you need to change the extension as appropriate)

    I don't recommend you use anything but the latest version.  However, I've included links to the older versions and to the changelog posts (if nothing else it will be a walk down memory lane for jelwood): 

    Please keep this thread dedicated to Mencoder profiles!  Please report any bugs to the “Help Testing Mencoder” thread.

    First, let me apologize for having no knowledge of sources other than ATSC/NTSC.  If someone more knowledgeable in non-U.S. broadcast formats can chime in, I will add a section for it.  Eventually this will all go in the Wiki.

      Starting with the basics, we are looking for profiles to cover the following scenarios:

      • Archiving
        • AVI: Mpeg-4 or H.264 video + MP3 audio
        • MP4: Mpeg-4 or H.264 video + AAC audio
        • WMV: WMV video + WMA audio
      • Portable
        • iPod
        • PSP
        • Zune
        • WM5 (Smartphone/Pocket PC)

      So, post your profiles here!  I'll add them into the chart below.  Be sure to include all information.  If you are posting a profile that is similar to a previously posted profile, please indicate what is different about it (e.g., "iPod profile - uses CBR for smaller file sizes").

      To get everyone started, here are a list of profiles that would probably find the most use.  If you have a profile for one of these, please post the text of it as a response in this thread.

      Target PlatformSourcesVideo FormatAudio FormatContainerExtensionLinkSpecial Notes
      ArchiveNTSC/ATSCMpeg-4MP3AVIAVIjelwood 
      ArchiveNTSC/ATSCH.264MP3AVIAVIjelwood 
      ArchiveNTSC/ATSCWMVWMAASFWMVjelwood 
      iPodNTSC/ATSCH.264AACMP4M4Vpending 
      PSPNTSC/ATSCH.264AACPSPMP4opafett
      Jim_IT
       
      ZuneNTSC/ATSCWMVWMAWMVWMVpending 
      WM5NTSC/ATSCWMVWMAWMVWMVjelwood 
      WM5NTSC/ATSCMpeg-4MP3AVIAVIonlydarksets Super-small size.
      AppleTV
      NTSC/ATSC
      H.264
      AAC
      MP4
      M4V
      pending
       
      AppleTV
      NTSC/ATSCMpeg-4
      AAC
      MP4
      M4V
      pending
       

       

    • 04-17-2007 5:03 PM In reply to

      • petej
      • Top 25 Contributor
      • Joined on 10-05-2006
      • Posts 79

      Re: OFFICIAL DTb mencoder profile thread

      Is there a new build? It would be good to get a howto and these profiles in the wiki at some point too.

    • 04-17-2007 5:43 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      Nope, still on Version 10, which appears to be pretty solid.  I have updated the original post to reflect that.  I believe jelwood is working on ffmpeg now, and mencoder development is more or less frozen.

      As for the HOWTO, I can incorporate that into the original post, but part of the goal of this is to get a series of baseline profiles so that people can "learn by tweaking".  Are you looking for something beyond that?
       

    • 04-17-2007 6:55 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      Version 10 is the latest.  Right now all of my time is dedicated to ffmpeg.  However, if you find a bug please let me know and I’ll try to fix it (to keep this thread dedicated to Mencoder profiles, please report any bugs to the “Help Testing Mencoder” thread). 

      One thing I learned while working on ffmpeg is the PSP has its own container (it has a psp extension).  I don’t know all the correct parameters to make it work correctly (actually I haven’t tried the psp container at all), but ffmpeg can support the psp container so it might work with Mencoder if you use the option –of lavf –lavfopts i_certify_that_my_video_stream_does_not_use_b_frames –o “output file.psp”.

    • 04-17-2007 7:09 PM In reply to

      I don't have a PSP, but if anyone does, here is a post detailing mencoder settings for the PSP container:

      http://inferno.slug.org/cgi-bin/wiki?action=browse&diff=1&id=AviToPsp 

      mencoder -oac lavc \
      -ovc lavc \
      -of lavf \
      -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac \
      -af lavcresample=24000 \
      -vf harddup \
      -lavfopts format=psp:i_certify_that_my_video_stream_does_not_use_b_frames \
      -ofps 30000/1001

      -vf scale=320:240 # 4:3
      -vf scale=368:208 # 16:9

      The video title will still unfotunately show up as "-" in the psp display because the "nam:" metadata atom is not set ;^( '-info name=' is reported to work.

      width * height must be <= 64000 and both must be multiplies of 16

      Notes:

      vcodec=mpeg4:vbitrate=250:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo

      Filenames must look like: M4V00001.mp4

    • 04-17-2007 7:17 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      jelwood:

      Version 10 is the latest.  Right now all of my time is dedicated to ffmpeg.  However, if you find a bug please let me know and I’ll try to fix it (to keep this thread dedicated to Mencoder profiles, please report any bugs to the “Help Testing Mencoder” thread). 

      One thing I learned while working on ffmpeg is the PSP has its own container (it has a psp extension).  I don’t know all the correct parameters to make it work correctly (actually I haven’t tried the psp container at all), but ffmpeg can support the psp container so it might work with Mencoder if you use the option –of lavf –lavfopts i_certify_that_my_video_stream_does_not_use_b_frames –o “output file.psp”.

      Good points!  I clarified that bugs go in the other thread, and I added an "extension" column to distinguish between the file extension and the actual container. 

    • 04-18-2007 2:04 PM In reply to

      Re: PSP

      I am happy to say that this finally works now on my psp.  I used the info that onlydarksets found with the version 10 mencoder and it worked great.  Important to note though for psp users is that I am using the 3.3 OE custom firmware.  I would imagine that these settings would work for all of the firmwares, but the 3.3 firmware no longer needs the custom file naming. (M4V00001.mp4)  Here's what I used.

      mencoder "d:\recorded tv\vertigo.dvr-ms" -oac lavc -ovc lavc -of lavf -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac -af lavcresample=24000 -vf harddup -lavfopts format=psp:i_certify_that_my_video_stream_does_not_use_b_frames -ofps 30000/1001 -vf scale=368:208 -o "d:\recorded tv\vertigo.mp4"

      I am still fighting with the correct settings for h264, but this is a start.  Also, is it possible to take a screen shot to use as a thumb at the end of the conversion?

      Filed under:
    • 04-18-2007 4:55 PM In reply to

      Re: PSP

      opafett:

      I am happy to say that this finally works now on my psp.  I used the info that onlydarksets found with the version 10 mencoder and it worked great.  Important to note though for psp users is that I am using the 3.3 OE custom firmware.  I would imagine that these settings would work for all of the firmwares, but the 3.3 firmware no longer needs the custom file naming. (M4V00001.mp4)  Here's what I used.

      mencoder "d:\recorded tv\vertigo.dvr-ms" -oac lavc -ovc lavc -of lavf -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac -af lavcresample=24000 -vf harddup -lavfopts format=psp:i_certify_that_my_video_stream_does_not_use_b_frames -ofps 30000/1001 -vf scale=368:208 -o "d:\recorded tv\vertigo.mp4"

      I am still fighting with the correct settings for h264, but this is a start.  Also, is it possible to take a screen shot to use as a thumb at the end of the conversion?

      I updated the original post with a link to your post for converting to PSP format.  Thanks!  If you are able to convert it to a profile and update your post to include that, too, that would be great!  Ideally it would have both the full command-line and the profile.
       

    • 04-18-2007 4:58 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      Here is what I used to archive to a Mpeg-4/MP3 AVI (full resolution):

      mencoder -lavdopts threads=2 -quiet "INPUTFILE.dvr-ms" -vf pp=lb -ovc xvid -xvidencopts fixed_quant=4:threads=2 -oac mp3lame -lameopts fast:preset=medium -o "OUTPUTFILE.avi"

      I shamelessly stole this from the original thread.

      Also, there is an existing profile to do the same:

      [Xvid-Good]
      profile-desc="Xvid/MP3 Good Quality"
      lavdopts=threads=2
      vf=pp=md,harddup
      ovc=xvid=yes
      xvidencopts=fixed_quant=4:threads=2
      # the next line sets the video to Divx 5 (more hardware players support Divx 5 than Xvid)
      ffourcc=DX50
      oac=mp3lame=yes
      lameopts=fast=yes:preset=medium
      #DtbExtension=avi

       

    • 04-18-2007 5:01 PM In reply to

      Re: PSP

      I also found this:

      http://www.mplayerhq.hu/DOCS/HTML-single/en/MPlayer.html 

      13.4. Encoding to Sony PSP video format

      MEncoder supports encoding to Sony PSP's video format, but, depending on the revision of the PSP software, the constraints may differ. You should be safe if you respect the following constraints:

      • Bitrate: it should not exceed 1500kbps, however, past versions supported pretty much any bitrate as long as the header claimed it was not too high.

      • Dimensions: the width and height of the PSP video should be multiples of 16, and the product width * height must be <= 64000. Under some circumstances, it may be possible for the PSP to play higher resolutions.

      • Audio: its samplerate should be 24kHz for MPEG-4 videos, and 48kHz for H.264.

       

      Example 13.4. encode for PSP

       

      mencoder -ofps 30000/1001 -af lavcresample=24000 -vf harddup -of lavf \
      -oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac \
      -lavfopts format=psp:i_certify_that_my_video_stream_does_not_use_b_frames \
      input.video -o output.psp

      Note that you can set the title of the video with -info name=MovieTitle.

       

    • 04-22-2007 10:33 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      The following profile creates a very small file (~150MB/hour) that is suitable for playback on a portable device.  It works great on my MotoQ and on other Smartphones.  The audio is encoded at a very low bitrate, but maintaining a high bitrate is complete overkill on these devices.

      [Xvid-small]
      profile-desc="Xvid/MP3 Small File Size"
      lavdopts=threads=2
      vf=pp=md,scale=320:-2,harddup
      ovc=xvid=yes
      xvidencopts=bitrate=264:threads=2
      # the next line sets the video to Divx 5 (more hardware players support Divx 5 than Xvid)
      ffourcc=DX50
      oac=mp3lame=yes
      lameopts=cbr=yes:fast=yes:br=48
      #DtbExtension=avi

    • 04-22-2007 11:01 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      Here is a modification of the WMV-Good profile for archiving to WMV.  However, while these files play properly on VMC, I can't get them to play on my Xbox 360 extender :(

      [WMV-Archive]
      profile-desc="WMV Good Quality"
      lavdopts=threads=2
      vf=pp=md,harddup
      ovc=lavc=yes
      oac=lavc=yes
      lavcopts=vcodec=wmv2:vqscale=4:acodec=wmav2:abitrate=128
      of=lavf=yes
      lavfopts=i_certify_that_my_video_stream_does_not_use_b_frames=yes
      #DtbExtension=wmv

    • 04-22-2007 11:02 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      Here is the default profile for WMV 320x240 resolution:

      [WMV-Good]
      profile-desc="WMV Good Quality"
      lavdopts=threads=2
      vf=pp=md,scale=320:-2,harddup
      ovc=lavc=yes
      oac=lavc=yes
      lavcopts=vcodec=wmv2:vqscale=4:acodec=wmav2:abitrate=128
      of=lavf=yes
      lavfopts=i_certify_that_my_video_stream_does_not_use_b_frames=yes
      #DtbExtension=wmv
       

    • 04-22-2007 11:04 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      And here is a modification of the default profile for H.264/MP3:


      [X264-MP3-Good]
      profile-desc="H.264/MP3 Good Quality"
      lavdopts=threads=2
      vf=pp=md,harddup
      ovc=x264=yes
      x264encopts=crf=23:subq=5:8x8dct:me=hex:frameref=3:bframes=3:b_pyramid:weight_b:threads=2
      ffourcc=H264
      oac=mp3lame=yes
      lameopts=fast=yes:preset=medium
      #DtbExtension=avi

    • 04-23-2007 11:13 PM In reply to

      Re: OFFICIAL DTb mencoder profile thread

      I don't have an AppleTV to help test, but I think it would be cool to have a profile for AppleTV.
    Page 1 of 6 (90 items) 1 2 3 4 5 Next > ... Last »
    @2008 andy vt
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems