Encoding .M2TS - "not in the correct format"
See original GitHub issueI have a bunch of files from some bluray ISOs that I wanna re-encode. The files are already H264 and with two audio tracks, DTS and AC3. I’ve used this awesome script to re-encode a bunch of my X264/H264 TV shows automagically but they’re usually MP4. These ones are in M2TS.
If I pass python /opt/mp4automator/manual.py -i “Matador_S02E03.m2ts” it simply throws me, in the log:
Manual processor started.
/usr/bin/python
Audio bitrate was invalid, defaulting to 256 per channel.
64bit Python.
File Matador_S02E03.m2ts is not in the correct format
The info.log file doesn’t contain anymore information.
I’ve tried with setting the audiocodec to AC3, disabling MOOV relocation, tried without my specific postopts settings, but nothing helps.
This is my config:
[MP4]
ffmpeg = /usr/bin/ffmpeg
ffprobe = /usr/bin/ffprobe
threads = auto
output_directory =
copy_to =
move_to =
output_extension = mp4
output_format = mp4
delete_original = False
relocate_moov = False
video-codec = h264
video-bitrate =
video-crf = 18
video-max-width =
h264-max-level =
use-qsv-decoder-with-encoder = True
use-hevc-qsv-decoder = False
enable_dxva2_gpu_decode = False
ios-audio = False
ios-first-track-only = False
ios-audio-filter =
ios-move-last = False
max-audio-channels =
audio-codec = copy
audio-language =
audio-default-language =
audio-channel-bitrate =
audio-filter =
audio-copy-original = True
subtitle-codec = srt
subtitle-language =
subtitle-default-language =
subtitle-encoding =
fullpathguess = True
convert-mp4 = True
tagfile = True
tag-language = en
download-artwork = False
download-subs = False
embed-subs = False
embed-only-internal-subs = False
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt =
aac_adtstoasc = False
postopts = -c:v,libx264,-preset,slow,-tune,film
preopts =
Is m2ts simply not supported, or?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
One frame missing when encoding from MT2S files ... - GitHub
I recently noticed that if you encode M2TS files (standalone files or from BDMV folder), one video frame will be missing in the...
Read more >Re-encoding M2TS to MKV - VideoHelp Forum
Hi, This will be my first try and I need some advise and guidance. My knowledge in software and hardware is not bad....
Read more >Error while encoding file: 00000.m2ts - VSO Software Forum
I was able to convert these files fine when using convertxtoHD on a different computer, I don't know why it's not working with...
Read more >How to Losslessly Convert M2TS to MP4 - VideoProc
This detailed guide will show you how to convert M2TS to MP4 easily, ... also allow you to remux M2TS files, not just...
Read more >Editing m2ts without re-encoding - Doom9's Forum
Hi, I have two copies of a same blu-ray movie (two different edition), but they both contain slightly different cuts and extra footage....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
M2TS hasn’t been tested at all, but theoretically if FFMPEG can unwrap it it should work If you want to try it out you just have to add m2ts to the extensions.py valid_input_extensions array and give it a shot
From: kocane Sent: Monday, April 2, 2018 11:21 AM To: mdhiggins/sickbeard_mp4_automator Cc: Subscribed Subject: [mdhiggins/sickbeard_mp4_automator] Encoding .M2TS - “not in thecorrect format” (#873)
I have a bunch of files from some bluray ISOs that I wanna re-encode. The files are already H264 and with two audio tracks, DTS and AC3. I’ve used this awesome script to re-encode a bunch of my X264/H264 TV shows automagically but they’re usually MP4. These ones are in M2TS. If I pass python /opt/mp4automator/manual.py -i “Matador_S02E03.m2ts” it simply throws me, in the log: Manual processor started. /usr/bin/python Audio bitrate was invalid, defaulting to 256 per channel. 64bit Python. File Matador_S02E03.m2ts is not in the correct format The info.log file doesn’t contain anymore information. I’ve tried with setting the audiocodec to AC3, disabling MOOV relocation, tried without my specific postopts settings, but nothing helps. This is my config: [MP4] ffmpeg = /usr/bin/ffmpeg ffprobe = /usr/bin/ffprobe threads = auto output_directory = copy_to = move_to = output_extension = mp4 output_format = mp4 delete_original = False relocate_moov = False video-codec = h264 video-bitrate = video-crf = 18 video-max-width = h264-max-level = use-qsv-decoder-with-encoder = True use-hevc-qsv-decoder = False enable_dxva2_gpu_decode = False ios-audio = False ios-first-track-only = False ios-audio-filter = ios-move-last = False max-audio-channels = audio-codec = copy audio-language = audio-default-language = audio-channel-bitrate = audio-filter = audio-copy-original = True subtitle-codec = srt subtitle-language = subtitle-default-language = subtitle-encoding = fullpathguess = True convert-mp4 = True tagfile = True tag-language = en download-artwork = False download-subs = False embed-subs = False embed-only-internal-subs = False sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles permissions = 0777 post-process = False pix-fmt = aac_adtstoasc = False postopts = -c:v,libx264,-preset,slow,-tune,film preopts = Is m2ts simply not supported, or? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@mdhiggins - I’m trying to remove the secondary audio track as it’s just some commentary of sorts, but isn’t tagged with this at all (non of the tracks or subtitles are tagged, apparently this info is lost when copying from bluray discs). As for the -ss and -t, I’ll give that a go again, I musta been doing something wrong.