Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn the user if they try to put unsupported subtitle inside mp4 #700

Closed
benop923 opened this issue Mar 16, 2021 · 5 comments
Closed

warn the user if they try to put unsupported subtitle inside mp4 #700

benop923 opened this issue Mar 16, 2021 · 5 comments

Comments

@benop923
Copy link

Hi,
I have TS video files (from DVB-T recording) with usually one video track (h264), 3 audio tracks (eac3), and 2 sub (dvb_subtitles).
If I only export vid & audio, it works in mp4, mkv or TS.
If I export sub as well, it always fail in mp4.

error log:
Error: Command failed with exit code 1: C:\Users\AppData\Local\Temp\1o80eaIhaVpEobKXIAQFpeF4FHN\resources\node_modules\ffmpeg-ffprobe-static\ffmpeg.exe -hide_banner -i C:\Users\Videos\C8_DeuxSoeurs.ts -c copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map_metadata 0 -movflags +faststart -ignore_unknown -f mp4 -y C:\Users\Videos\C8_DeuxSoeurs-00.00.00.000-01.27.05.141.mp4
[h264 @ 000001db03d34140] mmco: unref short failure
Last message repeated 2 times
[h264 @ 000001db03d34140] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[mpegts @ 000001db03d2dd40] start time for stream 3 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'C:\Users\bencam\Videos\C8_DeuxSoeurs.ts':
Duration: 01:27:05.14, start: 1.400000, bitrate: 4296 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:10x101: Audio: eac3 ([135][0][0][0] / 0x0087), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:20x102: Audio: eac3 ([135][0][0][0] / 0x0087), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:30x103: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
[mp4 @ 000001db069304c0] track 1: codec frame size is not set
[mp4 @ 000001db069304c0] track 2: codec frame size is not set
[mp4 @ 000001db069304c0] Could not find tag for codec dvb_subtitle in stream #3, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Stream #0:3 -> #0:3 (copy)
Last message repeated 1 times
at makeError (C:\Users\AppData\Local\Temp\1o80eaIhaVpEobKXIAQFpeF4FHN\resources\app.asar\node_modules\execa\lib\error.js:58:11)
at handlePromise (C:\Users\AppData\Local\Temp\1o80eaIhaVpEobKXIAQFpeF4FHN\resources\app.asar\node_modules\execa\index.js:114:26)
at async R (file:///C:/Users/AppData/Local/Temp/1o80eaIhaVpEobKXIAQFpeF4FHN/resources/app.asar/build/static/js/main.3f15a09d.chunk.js:1:4715)
at async _ (file:///C:/Users/AppData/Local/Temp/1o80eaIhaVpEobKXIAQFpeF4FHN/resources/app.asar/build/static/js/main.3f15a09d.chunk.js:1:5240)
at async file:///C:/Users/AppData/Local/Temp/1o80eaIhaVpEobKXIAQFpeF4FHN/resources/app.asar/build/static/js/main.3f15a09d.chunk.js:1:166527

{
"err": {
"killed": false,
"failed": true,
"timedOut": false,
"isCanceled": false,
"exitCode": 1
},
"state": {
"filePath": "C:\Users\Videos\C8_DeuxSoeurs.ts",
"fileFormat": "mp4",
"externalStreamFiles": [],
"mainStreams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_time_base": "1/50",
"codec_tag_string": "[27][0][0][0]",
"codec_tag": "0x001b",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1088,
"closed_captions": 0,
"has_b_frames": 3,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 40,
"color_range": "tv",
"color_space": "bt709",
"color_transfer": "bt709",
"color_primaries": "bt709",
"chroma_location": "left",
"field_order": "tt",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"id": "0x100",
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/90000",
"start_pts": 192760,
"start_time": "2.141778",
"duration_ts": 470196000,
"duration": "5224.400000",
"bits_per_raw_sample": "8",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
}
},
{
"index": 1,
"codec_name": "eac3",
"codec_long_name": "ATSC A/52B (AC-3, E-AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[135][0][0][0]",
"codec_tag": "0x0087",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"dmix_mode": "-1",
"ltrt_cmixlev": "-1.000000",
"ltrt_surmixlev": "-1.000000",
"loro_cmixlev": "-1.000000",
"loro_surmixlev": "-1.000000",
"id": "0x101",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 126000,
"start_time": "1.400000",
"duration_ts": 470232000,
"duration": "5224.800000",
"bit_rate": "128000",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fra"
}
},
{
"index": 2,
"codec_name": "eac3",
"codec_long_name": "ATSC A/52B (AC-3, E-AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[135][0][0][0]",
"codec_tag": "0x0087",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"dmix_mode": "-1",
"ltrt_cmixlev": "-1.000000",
"ltrt_surmixlev": "-1.000000",
"loro_cmixlev": "-1.000000",
"loro_surmixlev": "-1.000000",
"id": "0x102",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 126000,
"start_time": "1.400000",
"duration_ts": 470232000,
"duration": "5224.800000",
"bit_rate": "128000",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "qaa"
}
},
{
"index": 3,
"codec_name": "dvb_subtitle",
"codec_long_name": "DVB subtitles",
"codec_type": "subtitle",
"codec_time_base": "0/1",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"id": "0x103",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 126000,
"start_time": "1.400000",
"duration_ts": 470262760,
"duration": "5225.141778",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fra"
}
}
],
"copyStreamIdsByFile": {
"C:\Users\bencam\Videos\C8_DeuxSoeurs.ts": {
"0": true,
"1": true,
"2": true,
"3": true
}
},
"cutSegments": [
{}
],
"fileFormatData": {
"filename": "C:\Users\bencam\Videos\C8_DeuxSoeurs.ts",
"nb_streams": 4,
"nb_programs": 1,
"format_name": "mpegts",
"format_long_name": "MPEG-TS (MPEG-2 Transport Stream)",
"start_time": "1.400000",
"duration": "5225.141778",
"size": "2806227496",
"bit_rate": "4296499",
"probe_score": 50
},
"rotation": 360,
"shortestFlag": false
},
"platform": "win32",
"version": "3.32.0"
}

@MrBrax
Copy link

MrBrax commented Mar 16, 2021

[mp4 @ 000001db069304c0] Could not find tag for codec dvb_subtitle in stream 3, codec not currently supported in container

mp4 usually does not support subtitles

@mifi
Copy link
Owner

mifi commented Mar 25, 2021

Yea mp4 only supports a specific subtitle format i think, so it needs to be converted first. #418
See https://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles

maybe we xcould warn the user if they try to put unsupported subtitle inside mp4 (or default disable the track)

@mifi mifi changed the title cannot exporrt to mp4 if subtitles selected warn the user if they try to put unsupported subtitle inside mp4 Mar 25, 2021
@Piggestpog
Copy link

@mifi
I've met similar failures while adding a subtitle file (.srt) to a video (.mp4)
However, if I change the output format from MP4 to MVK, the export will succeed.
I wonder if this process is lossless or not, both with video and audio. Thanks!!

@mifi
Copy link
Owner

mifi commented Apr 2, 2021

I wonder if this process is lossless or not, both with video and audio. Thanks!!

changing output format from mp4 to mkv is lossless

@mifi
Copy link
Owner

mifi commented Aug 25, 2021

Closing in favor of #547

@mifi mifi closed this as completed Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants