VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Hi to everyone,
    I'm trying to encode m2t video in other formats (mp4 or mpeg2 or webm..) giving importance to the perfect balance of quality/weight. I'm working to a server for storage and I have to archive many many many many videos!but i want not to be "excellent" quality because will big size byte ok?
    Actually my parameters are simply and i start to study for know of ffmpeg:
    ffmpeg -i input.m2t -c:v h264 -f mp4 -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 8000k -deinterlace output.mp4
    ffmpeg -i input.m2t -c:v libvpx -f webm -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 8000k -deinterlace output.webm
    ffmpeg -i input.m2t -c:v mpeg2video -f mpeg2 -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 8000k -deinterlace output.mpeg2
    are right this parameters?

    other ask:
    When ffmpeg starts to encode gives me this:

    PES packet size mismatch
    Last message repeated 22 times
    [mpegts @ 0x22290c0] Stream #2: not enough frames to estimate rate; consider increasing probesize
    [mpegts @ 0x22290c0] Stream #3: not enough frames to estimate rate; consider increasing probesize
    [NULL @ 0x221c8e0] start time is not set in estimate_timings_from_pts
    [NULL @ 0x221d340] start time is not set in estimate_timings_from_pts
    [mpegts @ 0x22290c0] PES packet size mismatch
    [mpegts @ 0x22290c0] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    [mpegts @ 0x22290c0] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Is this normal or there is an error parameter?

    Last question:
    If I want to archive a video more quality I have to increase bit-rate or can I maintain this bit-rate improving quality adding others parameters? (2 pass, profile, gop...)
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Post the details from the m2t video. Use for example mediainfo, open video, view->text.
    Quote Quote  
  3. General
    ID : 255 (0xFF)
    Complete name : /home/issr-linux-nle-1/dvgrab-001.m2t
    Format : MPEG-TS
    Commercial name : HDV 1080i
    File size : 438 MiB
    Duration : 2mn 21s
    Start time : UTC 2014-01-29 15:48:27
    End time : UTC 2014-01-29 15:50:42
    Overall bit rate mode : Variable
    Overall bit rate : 26.0 Mbps
    Maximum Overall bit rate : 33.0 Mbps
    Encoded date : UTC 2014-01-29 15:48:27

    Video
    ID : 2064 (0x810)
    Menu ID : 100 (0x64)
    Format : MPEG Video
    Commercial name : HDV 1080i
    Format version : Version 2
    Format profile : Main@High 1440
    Format settings, BVOP : Yes
    Format settings, Matrix : Default
    Format settings, GOP : M=3, N=12
    Codec ID : 2
    Duration : 2mn 21s
    Bit rate : 24.3 Mbps
    Maximum bit rate : 25.0 Mbps
    Width : 1 440 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 fps
    Standard : Component
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Top Field First
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.626
    Stream size : 409 MiB (93%)
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 2068 (0x814)
    Menu ID : 100 (0x64)
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 2
    Codec ID : 3
    Duration : 2mn 20s
    Bit rate mode : Constant
    Bit rate : 384 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Delay relative to video : -80ms
    Stream size : 6.41 MiB (1%)

    Menu
    ID : 129 (0x81)
    Menu ID : 100 (0x64)
    List : 2064 (0x810) (MPEG Video) / 2068 (0x814) (MPEG Audio) / 2069 (0x815) () / 2065 (0x811) ()
    Quote Quote  
  4. Consider increasing the value for the 'analyzeduration' and 'probesize' options
    -> try adding "-analyzeduration 100M -probesize 100M" (before the '-i ....')
    Quote Quote  
  5. I just tried, it is the same.
    Quote Quote  
  6. Sound like the transportstream is buggy,...
    you could:
    a. try to remux the stream using mmg, check if the mkv file created still plays fine and reencode the mkv file
    b. try to run some tool which is designed to find and fix errors in transport streams over the file

    If I want to archive a video more quality I have to increase bit-rate or can I maintain this bit-rate improving quality adding others parameters? (2 pass, profile, gop...)
    Since cbr (= constant bitrate) is one of the worst methods quality/bitrate-wise: yes, using 2pass encoding and some settings other than the defaults should produce better quality.

    Cu Selur

    Ps.: depending how old your ffmpeg version is updating to the latest version might also help with the transportstream input
    Quote Quote  
  7. All right,
    thank you
    Quote Quote  
  8. Do you have to stick with ffmpeg to run it on your server as a part of some program or you encode it on your PC?
    Quote Quote  
  9. I use ffmpeg on my PC, from the bash command
    Quote Quote  
  10. ok, you can avoid ffmpeg using DGindex+Avisynth+x264+MP4Box workflow for m2t files even using batch modes to encode lots of files at once,
    it is not that straight forward but nevertheless possible, download that M2T to MP4.zip, unzip it, using Avisynth has its advantages for resizing and possible other tweaks, like best deinterlacers etc.., but the way it is set you do not need to know anything about Avisynth, those BAT programs do it all automatically, you do not need to download and install anything else, just that Avisynth, .., DGindex, x264, mp4box all is that zip used automaticaly

    just drag and drop your m2t files onto desired BAT icon, read info.txt, all you need to do before is just download and install Avisynth, but use that link in info.txt for Avisynth 2.5.8

    choose CRF in settings to make it to your liking, but to obtain bitrates around 8000kbps and lower, I'd recommend using those 720p batch encoding as you can see in there,
    encoding mode is always CRF not CBR, as it was mentioned CBR it is not effective at all
    Image Attached Files
    Last edited by _Al_; 4th Mar 2014 at 01:23.
    Quote Quote  
  11. @_Al_: not sure if francpal wants to install Windows or Wine on his Linux system,...
    ("Complete name : /home/issr-linux-nle-1/dvgrab-001.m2t" looks like a Linux file path)
    Quote Quote  
  12. ah, thanks,..., I knew it then when I asked him a week ago , thinking he needs it to run on some NAS with linux etc, but forgot it since I guess I just saw word PC and not that word bash ....
    Quote Quote  
  13. Originally Posted by francpal View Post
    Hi to everyone,
    I'm trying to encode m2t video in other formats (mp4 or mpeg2 or webm..) giving importance to the perfect balance of quality/weight. I'm working to a server for storage and I have to archive many many many many videos!but i want not to be "excellent" quality because will big size byte ok?
    Actually my parameters are simply and i start to study for know of ffmpeg:
    ffmpeg -i input.m2t -c:v h264 -f mp4 -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 8000k -deinterlace output.mp4
    ffmpeg -i input.m2t -c:v libvpx -f webm -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 8000k -deinterlace output.webm
    ffmpeg -i input.m2t -c:v mpeg2video -f mpeg2 -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 8000k -deinterlace output.mpeg2
    are right this parameters?
    Are this parameters right yes or not?
    Quote Quote  
  14. Originally Posted by francpal View Post
    giving importance to the perfect balance of quality/weight.
    It is contradictory to syntax proposed by you as high quality imply use of VBR especially for quality/size assumption.

    Originally Posted by francpal View Post
    ffmpeg -i input.m2t -c:v mpeg2video -f mpeg2 -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 8000k -deinterlace output.mpeg2
    Originally Posted by francpal View Post
    Are this parameters right yes or not?
    AFAIR

    ffmpeg -i input.m2t -c:v mpeg2video -f mpeg2 -b:v 8000k -minrate 8000k -maxrate 8000k -bufsize 1835k -deinterlace output.mpeg2

    However CBR is generally not recommended especially for offline usage.

    Can you for example explain what is wrong in:

    ffmpeg -i input.m2t -c:v mpeg2video -f mpeg2 -b:v 8000k -minrate 1000k -maxrate 14999k -bufsize 1835k -deinterlace output.mpeg2 for MP@ML

    or where DVD compatibility is goal then perhaps

    ffmpeg -i input.m2t -c:v mpeg2video -f mpeg2 -b:v 8000k -minrate 1000k -maxrate 8500k -bufsize 1835k -deinterlace output.mpeg2

    But there is many more settings to use to provide particular functionality (improve for example compatibility or quality or both or other things) it is not clear what is your intention.
    Quote Quote  
  15. x264 library and CRF encoding could be perhaps handy, roughly something like this, you'd need to more specify audio specs in there:

    Code:
    ffmpeg -i input.m2t -vcodec libx264 -crf 20 -x264opts vbv-bufsize=18000:vbv-maxrate=8000 -deinterlace output.mp4
    but simple deinterlace will ruin your footage, for archiving you need to encode interlace or use some bob deinterlacer, simple deinterlace is only good for web purposes
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!