in

andy vt's tools & blog

Automating lazy

Help testing MEncoder with DVR-MS support

Last post 10-08-2007 2:44 PM by onlydarksets. 358 replies.
Page 16 of 24 (359 items) « First ... < Previous 14 15 16 17 18 Next > ... Last »
Sort Posts: Previous Next
  • 03-28-2007 12:57 AM In reply to

    • Coyote
    • Top 10 Contributor
    • Joined on 10-11-2006
    • Maryland

    Re: Help testing MEncoder with DVR-MS support

    randyharris:

    I'm still not sure why the audio isn't working, but for an iPod to accept an h.264 video, I know that there are certain bits that must be present in the file otherwise you can't import them onto an iPod.

     Here is a page that talks about the UUID Atom, and some other iPod related video necesities, like a max width of 640.

     The UUID is only needed when the 640x480 1.5Mbit H.264 LC is used.

    Also, the original video iPods can't play these, but the newer "5.5G" iPods can.

    MPEG4 (320x240 up to 640x480, <2.5Mbit) and 320x240 <768k H.264 don't need the UUID.

  • 03-28-2007 6:54 AM In reply to

    • Hecks
    • Top 25 Contributor
    • Joined on 11-13-2006

    Re: Help testing MEncoder with DVR-MS support

    Keystone:
    I just did some quick experiments with a clip of a news broadcast with strolling text:
    • pp=md quite blocky text and a slightly larger file size
    • pp=lb smoother and clear text, quite close to the original's playback
    I then tried chaning the placement of the pp command.  If I placed it anywhere before the scale then I was returning this error while encoding:
    [swscaler @ 00A5E0A0]SwScaler: Warning: dstStride is not aligned![0:0]
    SwScaler:          ->cannot do aligned memory acesses anymore
    When placed back after the scale all was fine. Playback of either encoded file didn't present any apparent differences.

    Keystone, thanks that's really helpful.  It still remains the case though, that the consensus elsewhere in the mplayer community is that deinterlacing should come before scaling in the -vf line.  For example:

    http://lists.mplayerhq.hu/pipermail/mencoder-users/2006-January/002595.html

    And this from the documentation:

    2. Use a deinterlacing filter before encoding. There are several of these filters available to choose from, each with its own advantages and disadvantages. Consult mplayer -pphelp and mplayer -vf help to see what is available (grep for "deint"), read Michael's Niedermayer Deinterlacing filters comparison, and search the MPlayer mailing lists to find many discussions about the various filters. Again, the framerate is not changing, so no -ofps. Also, deinterlacing should be done after cropping [1] and before scaling.

    I'm not sure why you're getting that error, though.  As for mb or lb, or any of the other deinterlacers, that seems to be a matter of taste, speed, processing power, etc.  But pp=md is certainly used the most often, AFAIK.

    -Hecks 

  • 03-28-2007 7:03 AM In reply to

    Re: Help testing MEncoder with DVR-MS support

    randyharris:
    btw - any easy way to have the related EDL files be deleted when a DVR-MS file is deleted?

    I just run a batch file every night that deletes them.

    REM this will search all edl files and delete any that don't have coorosponding dvr-ms files.
    :parse_edllist
    for %%f in ("C:\Program Files\DVRMSToolbox\CommercialsXml\*.edl") do (call :clean-up_dvr-ms "D:\Recorded TV\%%~nf.dvr-ms" "%%f")
    goto :eof
    :clean-up_dvr-ms
    if NOT EXIST %1 del %2
    goto :eof

  • 03-28-2007 7:53 AM In reply to

    Re: Help testing MEncoder with DVR-MS support

    Is there a way from the command line to turn off "Packed Bitstream"? My DVD player and MP3 player have issues playing XVID's with this option enabled ...
  • 03-28-2007 8:35 AM In reply to

    • Hecks
    • Top 25 Contributor
    • Joined on 11-13-2006

    Re: Help testing MEncoder with DVR-MS support

    zepperdude:
    Is there a way from the command line to turn off "Packed Bitstream"? My DVD player and MP3 player have issues playing XVID's with this option enabled ...

    I believe you need to add "nopacked" (w/out quotes) to the -xvidencopts line.  

    It occurs to me, thinking of the discussion so far about standard encoding profiles, that it might be worth applying the actual XviD standardised profiles supported by mencoder, since each hardware player should state clearly which of these it supports.  This would help with compatability, and perhaps also simplicity.  

    There's a good discussion and table of settings here: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-xvid.html.

    and from the documentation:

    profile=<profile_name>

    Restricts options and VBV (peak bitrate over a short period) according to the Simple, Advanced Simple and DivX profiles. The resulting videos should be playable on standalone players adhering to these profile specifications.
       
    unrestricted
      no restrictions (default)
       
    sp0
      simple profile at level 0
       
    sp1
      simple profile at level 1
       
    sp2
      simple profile at level 2
       
    sp3
      simple profile at level 3
       
    asp0
      advanced simple profile at level 0
       
    asp1
      advanced simple profile at level 1
       
    asp2
      advanced simple profile at level 2
       
    asp3
      advanced simple profile at level 3
       
    asp4
      advanced simple profile at level 4
       
    asp5
      advanced simple profile at level 5
       
    dxnhandheld
      DXN handheld profile
       
    dxnportntsc
      DXN portable NTSC profile
       
    dxnportpal
      DXN portable PAL profile
       
    dxnhtntsc
      DXN home theater NTSC profile
       
    dxnhtpal
      DXN home theater PAL profile
       
    dxnhdtv
      DXN HDTV profile
       
    NOTE: These profiles should be used in conjunction with an appropriate −ffourcc. Generally DX50 is applicable, as some players do not recognize XviD but most recognize DivX.

     -Hecks
     

  • 03-28-2007 8:51 AM In reply to

    Re: Help testing MEncoder with DVR-MS support

    jelwood:

    randyharris:
    btw - any easy way to have the related EDL files be deleted when a DVR-MS file is deleted?

    I just run a batch file every night that deletes them.

     Perfect, thanks!

  • 03-28-2007 9:12 AM In reply to

    Re: Help testing MEncoder with DVR-MS support

    Hecks:

    zepperdude:
    Is there a way from the command line to turn off "Packed Bitstream"? My DVD player and MP3 player have issues playing XVID's with this option enabled ...

    I believe you need to add "nopacked" (w/out quotes) to the -xvidencopts line.  

     

    If I use packed or nopacked - fill size of encoded file remains the same - which leads me to believe it is not working.

    Any other ideas? 

  • 03-28-2007 12:42 PM In reply to

    Re: Help testing MEncoder with DVR-MS support

    http://www.megaupload.com/?d=G3FID3KC  Edit: babgvant just posted it on his web page.  Below is the link

    http://babgvant.com/files/folders/misc/entry3412.aspx

    Above is the latest version of Mencoder (Version 7).  All the improvements in this version are with the MPlayer demuxer (to use the MPlayer demuxer do NOT use the –demuxer 35 option).  One other word of warning; the changes I made to improve the fps logic probably broke the reading of wmv files (not the encoding of wmv files, just the ability to read them).  I would not suggest using this version of Mencoder to convert WMV files to Xvid or any other format (the purpose of this project is to read dvr-ms files, so this is an acceptable downside).  Again, this is only the ability to read WMV files, reading dvr-ms files and converting them to WMV works. 

    Improvements in this version are:

    1)     The error recovery logic around all the setting we are detecting “on the fly” has been improved (this should fix Keystone’s issue).

    2)     The fps logic has undergone a major change.  Now you aren’t required to set the output fps (so the –ofps switch is no longer required).  If you don’t specify the output fps, it will encode using the fps setting of the original video.  Because the fps logic is completely different, please look at the Audio/Video sync and let me know if you see any problems (in theory it should actually be better).

    Below are the updated command lines I used for testing:

    Xvid/MP3:

    mencoder –quiet -lavdopts threads=2 "input.dvr-ms" -vf scale=320:-2 -ovc lavc -lavcopts vcodec=mpeg4:vqscale=4:threads=2 -ffourcc XVID -oac mp3lame -lameopts fast:preset=medium -o "output.avi"

    WMV:

    mencoder –quiet -lavdopts threads=2 "input.dvr-ms" -vf scale=320:-2 -ovc lavc -oac lavc -lavcopts vcodec=wmv2:vqscale=4:acodec=wmav2:abitrate=128 -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -o "output.wmv"

    H.264/AAC: {These setting are probably incorrect.  We haven’t truly figured out the correct settings for H.264 and AAC}

    mencoder –quiet -lavdopts threads=2 "input.dvr-ms" -vf scale=320:-2 -ovc x264 -x264encopts crf=4:threads=4 -oac faac -faacopts br=128:object=2 -channels 2 -srate 48000 -of lavf -lavfopts format=mp4:i_certify_that_my_video_stream_does_not_use_b_frames -o "output.mp4"

  • 03-28-2007 12:44 PM In reply to

    Re: Help testing MEncoder with DVR-MS support

    jelwood:

    mrknockoff:
    But do you just want the source or do you want the source and the output?

    I just need a small dvr-ms file that shows the AV sync issues.  Once I can see the AV sync issue, it allows me to put debug statements in Mencoder and trace the problem.

    mrknockoff, are you still having AV sync issues?  If so, I just posted version 7 that may improve things for you.  If it doesn't, please upload a sample smaller than 500MB and I'll take a look at it.

  • 03-28-2007 12:50 PM In reply to

    Re: Help testing MEncoder with DVR-MS support

    what bitrate does this result in?

    -lameopts fast:preset=medium

  • 03-28-2007 1:03 PM In reply to

    Re: Help testing MEncoder with DVR-MS support

    randyharris:

    what bitrate does this result in?

    -lameopts fast:preset=medium

    It seems to be VBR.  In my testing it varied from 97kbps - 168kbps depending on the source.

  • 03-28-2007 1:15 PM In reply to

    Re: Help testing MEncoder with DVR-MS support

    For converting DVR-MS to my Meizu M6 MP3/Video player I use the following command line:

     mencoder %1.dvr-ms -idx -noodml -ofps 18 -vf scale=320:-2,expand=:240:::1,crop=320:240,rotate=1 -ovc lavc -ffourcc XVID -lavcopts vcodec=mpeg4:vbitrate=384:vmax_b_frames=0:vhq -sws 9 -srate 44100 -oac mp3lame -lameopts cbr:br=128:mode=0 -o %1.avi

    I would still like to get rid of packed bitstream if I could .... 

     

  • 03-28-2007 2:53 PM In reply to

    • Hecks
    • Top 25 Contributor
    • Joined on 11-13-2006

    Re: Help testing MEncoder with DVR-MS support

    zepperdude:
    Hecks:

    zepperdude:
    Is there a way from the command line to turn off "Packed Bitstream"? My DVD player and MP3 player have issues playing XVID's with this option enabled ...

    I believe you need to add "nopacked" (w/out quotes) to the -xvidencopts line.  

     

    If I use packed or nopacked - fill size of encoded file remains the same - which leads me to believe it is not working.

    Any other ideas? 

    I'm pretty sure it has nothing to do with file compression, but to ensure compatibility with programs like VirtualDub when editing.  Did it work on your player?

    Edit: actually, the mpeg4 codec shouldn't be producing packed bitstreams at all (you can check this on the file with a program like GSpot).   It's more likely that you need to add -ffourcc DX50 instead of -ffourcc XVID for the reasons already stated in this thread.

    -Hecks 

  • 03-28-2007 4:33 PM In reply to

    Re: Help testing MEncoder with DVR-MS support

    I haven't tried mencoder version 7 yet, but I've moved back to using
    -ovc xvid -xvidencopts fixed_quant=4:threads=2

    instead of any lavc -lavcopts options. The reason is my stand alone DVD player doesn't seem to like it when I do that. Even with all other settings like -ffourcc DX50. Reaaally unwatchable. Like you start a show and only see half of the screen and even that doesn't move. Just frozen. Reencoding again using -ovc xvid works great.

    Tonight I'll try lavc with version 7.

     

    Home Built Media Server | Windows 7 RC (x86) | HP MediaSmart Connect Extender | www.techlifeweb.com | @techlifeweb on Twitter
  • 03-29-2007 8:41 AM In reply to

    Re: Help testing MEncoder with DVR-MS support

    I was wondering about converting from DVR-MS to MPEG, does Dtb have a direct way to do this? If not what command line could we use with MEncoder to go directly to MPEG?

Page 16 of 24 (359 items) « First ... < Previous 14 15 16 17 18 Next > ... Last »
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems