1

I need some help I'm trying to convert HDV video 1440x1080p to MP4 and MKV

film.m2t Container and general information
MPEG2-TS: 883Mib
1 video streams: MPEG-2 Video
1440x1080 (16/9) , at 25.000 fps, MPEG-2 Video (Main@high-1440)
1 audio streams: MPEG-1 Audio Layer 2

First audio stream 384 Kbps, 48 KHz, 2 channels, MPEG-1 Audio Layer 2

original

after encode to m4

scripts: this one I tried first

ffmpeg -y -i "D:\Video\Luke\Late 07 - Early-08\Clip 1\film.m2t" -vcodec msmpeg4 -vf yadif -b 12000k -acodec libmp3lame -ab 128k -ar 44100 Clip3_H.264_MP3_DIVX.avi

assumed the ffmpeg was adding pillars:

ffmpeg -y -i "D:\Video\Luke\Late 07 - Early-08\Clip 1\film.m2t" -vcodec msmpeg4 -aspect 16:9 -vf "scale=1440:1080:force_original_aspect_ratio=increase,crop=1440:1080" -vf yadif -b 12000k -acodec libmp3lame -ab 128k -ar 44100 Clip3_H.264_MP3_DIVX.avi

ffmepg output

Input #0, mpegts, from 'D:\Video\Luke\Late 07 - Early-08\Clip
1\film.m2t': Duration: 00:04:27.60, start: 0.440000, bitrate: 26104
kb/s Program 100
Stream #0:0[0x810]: Video: mpeg2video (Main) (2[0][0][0] / 0x0002),
yuv420p(tv, bt709), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s,
25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x814]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, s16p, 384 kb/s
Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)
Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1) Please use
-b:a or -b:v, -b is ambiguous Output #0, avi, to
'Clip3_H.264_MP3_DIVX.avi': Metadata:
ISFT : Lavf57.28.100
Stream #0:0: Video: msmpeg4v3 (msmpeg4) (MP43 / 0x3334504D), yuv420p,
1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 12000 kb/s, 25 fps, 25
tbn, 25 tbc
Metadata:
encoder : Lavc57.27.101 msmpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/12000000 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 44100 Hz,
stereo, s16p, 128 kb/s
Metadata:
encoder : Lavc57.27.101 libmp3lame Stream mapping: Stream
#0:0 -> #0:0 (mpeg2video (native) -> msmpeg4v3 (msmpeg4))
Stream #0:1 -> #0:1 (mp2 (native) -> mp3 (libmp3lame))

side note: if I convert film.m2t to a film.m2ts, aspect ratio and no pillars, but don't want to have to r encode before using ffmpeg

is ffmpeg adding pillars? if I look at the output stream it says

Stream #0:0: Video: msmpeg4v3 (msmpeg4) (MP43 / 0x3334504D), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 12000 kb/s, 25 fps, 25 tbn, 25 tbc

which matches the input –

Stream #0:0[0x810]: Video: mpeg2video (Main) (2[0][0][0] / 0x0002), yuv420p(tv, bt709), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc

except for the video container of course

similar issue when converting to mkv using:

ffmpeg -y -i "D:\Video\Luke\Late 07 - Early-08\Clip 1\film.m2t" -f matroska -vf yadif -crf 25 -level 3.1 -preset slow -tune film -c:a libmp3lame -ab 128k -ar 44100 -vbr 5 Clip2_H.264_MP3.MKV

i don't think im changing the aspect ratio and not touching the videos frame size in my scripts when converting, so why the black bars after encoding? am i missing something?

i've just tried

ffmpeg -y -i "D:\Video\Luke\Late 07 - Early-08\Clip 1\film.m2t" -f matroska -vf yadif -crf 25 -level 3.1 -preset slow -tune film -c:a libmp3lame -ab 128k -ar 44100 -vbr 5 Clip2_H.264_MP3.MKV

vlc is now saying resolution is: 1440x1080p but it still has pillars

thanks Gordon

5
  • Is your question actually about avoiding a spurious conversion from 1440x1080 to 1400x1080? (From your screenshots.) Commented Jun 4, 2020 at 21:21
  • no i'm trying to convert 1440x1080 into mp4 and mkv
    – greymouse
    Commented Jun 4, 2020 at 21:28
  • okay now you got me thinking lol am i not converting to 1440x1080? typo in the script, 1400x1080 would explain the pillars
    – greymouse
    Commented Jun 4, 2020 at 21:30
  • i'll try ffmpeg -y -i "D:\Video\Luke\Late 07 - Early-08\Clip 1\film.m2t" -vcodec msmpeg4 -vf yadif -b 12000k -acodec libmp3lame -ab 128k -ar 44100 Clip3_H.264_MP3_DIVX.avi
    – greymouse
    Commented Jun 4, 2020 at 21:32
  • Stream #0:0: Video: msmpeg4v3 (msmpeg4) (MP43 / 0x3334504D), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 12000 kb/s, 25 fps, 25 tbn, 25 tbc
    – greymouse
    Commented Jun 4, 2020 at 21:33

1 Answer 1

0

To get either of those containers, just ffmpeg -i infile out.mkv or ffmpeg -i infile out.mp4. Not out.avi. The other parameters (resolution, bit rate, deinterlacing) make no difference to either container. Add those back in as you like.

2
  • fixed this morning t/y :)
    – greymouse
    Commented Jun 5, 2020 at 22:59
  • ffmpeg -y -i "D:\Video\Luke\Late 07 - Early-08\Clip 1\film.m2t" -vf yadif -acodec libmp3lame -ab 128k -ar 44100 clip3_H.264_MP3.MP4
    – greymouse
    Commented Jun 5, 2020 at 23:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .