Opened 7 years ago

Closed 4 years ago

#6108 closed defect (fixed)

ffmpeg will not warn when putting random unsupported codecs in mpegts

Reported by: Neco Owned by:
Priority: minor Component: avformat
Version: git-master Keywords: mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

This is a bug report for ffmpeg version N-83243-g2080bc3
Windows static binary, v3.2.2 64-bit obtained from https://ffmpeg.zeranoe.com/builds/

I am attempting to remux files from an MP4 (also tested with MKV) container,
into an M2TS container however, the process fails silently with no warning issued
on the CLI.

The MP4 container typically contains an H264 stream and an AAC audio stream.
The target M2TS is meant to contain an H264 stream and a PCM audio stream.
Files are produced that have no audio, and upon inspection no audio streams
either when analyzed with MediaInfo, or what imported into applications such as
Sony Vegas, or when played back on applications such as MPC-HC, Windows Media Player, etc.

I can provide a sample file if needed but I do believe this can be replicated
with any file based on feedback from others I asked about the problem before writing
this report.

The command line was as follows (working with a game capture produced by OBS)

ffmpeg -i "2017-01-09 21-52-42.mp4" -c:v copy -c:a pcm_s16le "Dirt Rally.m2ts"

A file "lacking" an audio track is always produced. I don't know if the data isn't there, or if its actually there but something got corrupted or something like that. I've also tried with pcm_s16be

I do know that changing the audio format to AC3 produced a proper file. This only seems to affect PCM audio tracks. I was also unable to create an M2TS by muxing separate files in directly

Change History (6)

comment:1 by Neco, 7 years ago

Sorry just wanted to clarify my ffmpeg version is the nightly build mentioned, not 3.2.2, I verified that by the filename for my binary downloads

ffmpeg-20170125-2080bc3-win64-static.zip

comment:2 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedavformat
Keywords: mpegts added; m2ts missing audio PCM removed
Priority: normalminor
Status: newopen
Summary: ffmpeg will not produce an M2TS file with PCM audioffmpeg will not warn when putting random unsupported codecs in mpegts

I was sure this is a duplicate but couldn't find a related ticket.

comment:3 by Neco, 7 years ago

Just what is a "random unsupported codec" in this context? ffmpeg can produce the PCM stream, and its certainly capable of muxing a PCM stream, and M2TS containers can legally carry PCM streams.

The way this is worded seems to imply "user error".

in reply to:  3 comment:4 by Carl Eugen Hoyos, 7 years ago

Replying to Neco:

Just what is a "random unsupported codec" in this context?

Anything not supported by the mpegts muxer (which is nearly everything).

ffmpeg can produce the PCM stream, and its certainly capable of muxing a PCM stream, and M2TS containers can legally carry PCM streams.

No.

comment:5 by Neco, 7 years ago

Blu Ray spec says otherwise?

I've inquired in other parts of the internet as to whether I was unaware of any special flags I need to call and apparently I need an encoder to output a "bluray_pcm" stream and then use a flag with ffmpeg.

comment:6 by Carl Eugen Hoyos, 4 years ago

Resolution: fixed
Status: openclosed

This ticket was at least partly fixed by Gyan Doshi in f0b3b55002b7ad024ef94f005cd718a14d85e485, see #2622 for improved m2ts support.

Note: See TracTickets for help on using tickets.