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

TS files with streams changing over time - DVBC Video (HD) #338

Closed
rskermit opened this issue May 3, 2020 · 12 comments
Closed

TS files with streams changing over time - DVBC Video (HD) #338

rskermit opened this issue May 3, 2020 · 12 comments
Labels
MPEG TS TS are quirky and they can change tracks throughout the duration of the file

Comments

@rskermit
Copy link

rskermit commented May 3, 2020

was just cutting a TS MP4 (recording from a DVB C TV HD stream) file which worked out pretty fine (and fast). When trying to export the file to MP4 (and not to TS) I did receive an error message: "Unable to export this file". The error happens with different recordings also withe less Audio tracks. What I am curious abou is that the TS file is always recognizes as MPEG2 Transport Stream and not as MPEG4 H264 file which is a standard format for DVBC... an MP4 file is egnerated but it is empty...

Error: Command failed with exit code 1: C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\node_modules\ffmpeg-static\ffmpeg.exe -hide_banner -ss 105.44000 -i D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts -t 7080.26000 -avoid_negative_ts make_zero -c copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:6 -map_metadata 0 -movflags use_metadata_tags -ignore_unknown -f mp4 -y D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet.mp4
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] decode_slice_header error
[h264 @ 0000027cf245fc40] no frame!
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] decode_slice_header error
[h264 @ 0000027cf245fc40] no frame!
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] decode_slice_header error
[h264 @ 0000027cf245fc40] no frame!
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] SPS unavailable in decode_picture_timing
[h264 @ 0000027cf245fc40] non-existing PPS 0 referenced
[h264 @ 0000027cf245fc40] decode_slice_header error
[h264 @ 0000027cf245fc40] no frame!
[mpegts @ 0000027cf245b240] start time for stream 0 is not set in estimate_timings_from_pts
[mpegts @ 0000027cf245b240] start time for stream 1 is not set in estimate_timings_from_pts
[mpegts @ 0000027cf245b240] PES packet size mismatch
[mpegts @ 0000027cf245b240] Packet corrupt (stream = 3, dts = 5819896935).
[mpegts @ 0000027cf245b240] PES packet size mismatch
[mpegts @ 0000027cf245b240] Packet corrupt (stream = 4, dts = 5819903944).
[mpegts @ 0000027cf245b240] PES packet size mismatch
[mpegts @ 0000027cf245b240] Packet corrupt (stream = 7, dts = 5819898184).
[mpegts @ 0000027cf245b240] Could not find codec parameters for stream 6 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts':
Duration: 01:59:52.15, start: 57474.471667, bitrate: 6451 kb/s
Program 11150
Stream #0:10x1a22: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:2[0x1a23]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:30x1a24: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 448 kb/s
Stream #0:40x1a25: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired) (descriptions)
Stream #0:50x1a26: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:6[0x1a28]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:70x1a29: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s
No Program
Stream #0:0[0x12]: Data: epg
Cannot map stream #0:6 - unsupported type.
[mp4 @ 0000027cf2ac00c0] Could not find tag for codec epg in stream #0, 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)
Stream #0:4 -> #0:4 (copy)
Last message repeated 1 times
at makeError (C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\app.asar\node_modules\execa\lib\error.js:58:11)
at handlePromise (C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\app.asar\node_modules\execa\index.js:114:26)
at async R (file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:4175)
at async I (file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:4836)
at async file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:124457

{
"err": {
"killed": false,
"failed": true,
"timedOut": false,
"isCanceled": false,
"exitCode": 1
},
"state": {
"filePath": "D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts",
"fileFormat": "mp4",
"externalStreamFiles": [],
"mainStreams": [
{
"index": 0,
"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": "0x1a22",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172700650,
"start_time": "57474.451667",
"duration_ts": 647295409,
"duration": "7192.171211",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 1,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "deu"
}
},
{
"index": 1,
"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/100",
"codec_tag_string": "[27][0][0][0]",
"codec_tag": "0x001b",
"width": 1280,
"height": 720,
"coded_width": 1280,
"coded_height": 720,
"has_b_frames": 2,
"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": "progressive",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"id": "0x1a23",
"r_frame_rate": "50/1",
"avg_frame_rate": "50/1",
"time_base": "1/90000",
"start_pts": 5172786493,
"start_time": "57475.405478",
"duration_ts": 647209566,
"duration": "7191.217400",
"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": 2,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"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": "0x1a24",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172703569,
"start_time": "57474.484100",
"duration_ts": 647196246,
"duration": "7191.069400",
"bit_rate": "448000",
"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": "deu"
}
},
{
"index": 3,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"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": "0x1a25",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172710578,
"start_time": "57474.561978",
"duration_ts": 647196246,
"duration": "7191.069400",
"bit_rate": "192000",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 1,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "deu"
}
},
{
"index": 4,
"codec_name": "dvb_teletext",
"codec_long_name": "DVB teletext",
"codec_type": "subtitle",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"id": "0x1a26",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172700650,
"start_time": "57474.451667",
"duration_ts": 647202504,
"duration": "7191.138933",
"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": "deu"
}
},
{
"index": 5,
"codec_tag_string": "[5][0][0][0]",
"codec_tag": "0x0005",
"id": "0x1a28",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172700650,
"start_time": "57474.451667",
"duration_ts": 647295409,
"duration": "7192.171211",
"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": 6,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"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": "0x1a29",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172704818,
"start_time": "57474.497978",
"duration_ts": 647196246,
"duration": "7191.069400",
"bit_rate": "192000",
"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": "mul"
}
}
],
"copyStreamIdsByFile": {
"D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts": {
"0": true,
"1": true,
"2": true,
"3": true,
"4": true,
"5": false,
"6": true
}
},
"cutSegments": [
{
"start": 105.44,
"end": 7185.7,
"name": "Hamlet",
"color": {
"model": "hsv",
"color": [
98.82909445048551,
100,
95
],
"valpha": 1
},
"uuid": "91ba77a5-3055-4947-9e52-3746c3eb7b49"
}
],
"fileFormatData": {
"filename": "D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts",
"nb_streams": 7,
"nb_programs": 1,
"format_name": "mpegts",
"format_long_name": "MPEG-TS (MPEG-2 Transport Stream)",
"start_time": "57474.451667",
"duration": "7192.171211",
"size": "5800056808",
"bit_rate": "6451522",
"probe_score": 50
},
"rotation": 360,
"shortestFlag": false
}

@mifi
Copy link
Owner

mifi commented May 3, 2020

I think it's caused by the EPG track (not supported by mp4)

Stream #0:0[0x12]: Data: epg
Cannot map stream #0:6 - unsupported type.

Can you try to disable that track?

@rskermit
Copy link
Author

rskermit commented May 3, 2020

Thank you for the fast reply. Just tried to deactivate all tracks with the exception of the video and 2 audio files ... unfortuntely the error does not go away ... see below also for the additional approach to export the originally exported TS file (that just had 3 tracks) to an MP4 (which also failed)

Error: Command failed with exit code 1: C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\node_modules\ffmpeg-static\ffmpeg.exe -hide_banner -ss 105.44000 -i D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts -t 7080.26000 -avoid_negative_ts make_zero -c copy -map 0:1 -map 0:2 -map 0:3 -map_metadata 0 -movflags use_metadata_tags -ignore_unknown -f mp4 -y D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet_v2.mp4
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] decode_slice_header error
[h264 @ 0000028f326df5c0] no frame!
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] decode_slice_header error
[h264 @ 0000028f326df5c0] no frame!
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] decode_slice_header error
[h264 @ 0000028f326df5c0] no frame!
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] SPS unavailable in decode_picture_timing
[h264 @ 0000028f326df5c0] non-existing PPS 0 referenced
[h264 @ 0000028f326df5c0] decode_slice_header error
[h264 @ 0000028f326df5c0] no frame!
[mpegts @ 0000028f326dae80] start time for stream 0 is not set in estimate_timings_from_pts
[mpegts @ 0000028f326dae80] start time for stream 1 is not set in estimate_timings_from_pts
[mpegts @ 0000028f326dae80] PES packet size mismatch
[mpegts @ 0000028f326dae80] Packet corrupt (stream = 3, dts = 5819896935).
[mpegts @ 0000028f326dae80] PES packet size mismatch
[mpegts @ 0000028f326dae80] Packet corrupt (stream = 4, dts = 5819903944).
[mpegts @ 0000028f326dae80] PES packet size mismatch
[mpegts @ 0000028f326dae80] Packet corrupt (stream = 7, dts = 5819898184).
[mpegts @ 0000028f326dae80] Could not find codec parameters for stream 6 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts':
Duration: 01:59:52.15, start: 57474.471667, bitrate: 6451 kb/s
Program 11150
Stream #0:10x1a22: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:2[0x1a23]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:30x1a24: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 448 kb/s
Stream #0:40x1a25: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired) (descriptions)
Stream #0:50x1a26: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:6[0x1a28]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:70x1a29: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s
No Program
Stream #0:0[0x12]: Data: epg
[mp4 @ 0000028f331e04c0] Could not find tag for codec dvb_subtitle in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Stream #0:3 -> #0:2 (copy)
Last message repeated 1 times
at makeError (C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\app.asar\node_modules\execa\lib\error.js:58:11)
at handlePromise (C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\app.asar\node_modules\execa\index.js:114:26)
at async R (file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:4175)
at async I (file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:4836)
at async file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:124457

{
"err": {
"killed": false,
"failed": true,
"timedOut": false,
"isCanceled": false,
"exitCode": 1
},
"state": {
"filePath": "D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts",
"fileFormat": "mp4",
"externalStreamFiles": [],
"mainStreams": [
{
"index": 0,
"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": "0x1a22",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172700650,
"start_time": "57474.451667",
"duration_ts": 647295409,
"duration": "7192.171211",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 1,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "deu"
}
},
{
"index": 1,
"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/100",
"codec_tag_string": "[27][0][0][0]",
"codec_tag": "0x001b",
"width": 1280,
"height": 720,
"coded_width": 1280,
"coded_height": 720,
"has_b_frames": 2,
"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": "progressive",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"id": "0x1a23",
"r_frame_rate": "50/1",
"avg_frame_rate": "50/1",
"time_base": "1/90000",
"start_pts": 5172786493,
"start_time": "57475.405478",
"duration_ts": 647209566,
"duration": "7191.217400",
"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": 2,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"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": "0x1a24",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172703569,
"start_time": "57474.484100",
"duration_ts": 647196246,
"duration": "7191.069400",
"bit_rate": "448000",
"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": "deu"
}
},
{
"index": 3,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"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": "0x1a25",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172710578,
"start_time": "57474.561978",
"duration_ts": 647196246,
"duration": "7191.069400",
"bit_rate": "192000",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 1,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "deu"
}
},
{
"index": 4,
"codec_name": "dvb_teletext",
"codec_long_name": "DVB teletext",
"codec_type": "subtitle",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"id": "0x1a26",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172700650,
"start_time": "57474.451667",
"duration_ts": 647202504,
"duration": "7191.138933",
"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": "deu"
}
},
{
"index": 5,
"codec_tag_string": "[5][0][0][0]",
"codec_tag": "0x0005",
"id": "0x1a28",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172700650,
"start_time": "57474.451667",
"duration_ts": 647295409,
"duration": "7192.171211",
"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": 6,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"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": "0x1a29",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 5172704818,
"start_time": "57474.497978",
"duration_ts": 647196246,
"duration": "7191.069400",
"bit_rate": "192000",
"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": "mul"
}
}
],
"copyStreamIdsByFile": {
"D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts": {
"0": false,
"1": true,
"2": true,
"3": true,
"4": false,
"5": false,
"6": false
}
},
"cutSegments": [
{
"start": 105.44,
"end": 7185.7,
"name": "Hamlet-v2",
"color": {
"model": "hsv",
"color": [
303.92231127528044,
100,
95
],
"valpha": 1
},
"uuid": "eca1b222-8275-4448-b2e2-09652fe75fa8"
}
],
"fileFormatData": {
"filename": "D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015.ts",
"nb_streams": 7,
"nb_programs": 1,
"format_name": "mpegts",
"format_long_name": "MPEG-TS (MPEG-2 Transport Stream)",
"start_time": "57474.451667",
"duration": "7192.171211",
"size": "5800056808",
"bit_rate": "6451522",
"probe_score": 50
},
"rotation": 360,
"shortestFlag": false
}
}

What I did afterwards was to try to export the succesfulle generated TS file that only included these 3 tracks and also here the export is not possible...

Error: Command failed with exit code 1: C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\node_modules\ffmpeg-static\ffmpeg.exe -hide_banner -i D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet_v2.ts -avoid_negative_ts make_zero -c copy -map 0:0 -map 0:1 -map 0:2 -map_metadata 0 -movflags use_metadata_tags -ignore_unknown -f mp4 -y D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet_v2-00.00.00.000-01.58.01.097.mp4
[mpegts @ 00000248bc8aadc0] start time for stream 0 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet_v2.ts':
Duration: 01:58:01.10, start: 1.400000, bitrate: 5227 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:00x100: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:20x102: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 448 kb/s
[mp4 @ 00000248bcb7e800] Could not find tag for codec dvb_subtitle in stream #0, 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)
Last message repeated 1 times
at makeError (C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\app.asar\node_modules\execa\lib\error.js:58:11)
at handlePromise (C:\Users\ralph\AppData\Local\Temp\1b7ElG9v0KbzGqmiXlnKEWdwI1y\resources\app.asar\node_modules\execa\index.js:114:26)
at async R (file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:4175)
at async I (file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:4836)
at async file:///C:/Users/ralph/AppData/Local/Temp/1b7ElG9v0KbzGqmiXlnKEWdwI1y/resources/app.asar/build/static/js/main.2a754899.chunk.js:1:124457

{
"err": {
"killed": false,
"failed": true,
"timedOut": false,
"isCanceled": false,
"exitCode": 1
},
"state": {
"filePath": "D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet_v2.ts",
"fileFormat": "mp4",
"externalStreamFiles": [],
"mainStreams": [
{
"index": 0,
"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": "0x100",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 126000,
"start_time": "1.400000",
"duration_ts": 637298894,
"duration": "7081.098822",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 1,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "deu"
}
},
{
"index": 1,
"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/100",
"codec_tag_string": "[27][0][0][0]",
"codec_tag": "0x001b",
"width": 1280,
"height": 720,
"coded_width": 1280,
"coded_height": 720,
"has_b_frames": 2,
"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": "progressive",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"id": "0x101",
"r_frame_rate": "50/1",
"avg_frame_rate": "50/1",
"time_base": "1/90000",
"start_pts": 216124,
"start_time": "2.401378",
"duration_ts": 637208770,
"duration": "7080.097444",
"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": 2,
"codec_name": "ac3",
"codec_long_name": "ATSC A/52A (AC-3)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[129][0][0][0]",
"codec_tag": "0x0081",
"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": 637294810,
"duration": "7081.053444",
"bit_rate": "448000",
"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": "deu"
}
}
],
"copyStreamIdsByFile": {
"D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet_v2.ts": {
"0": true,
"1": true,
"2": true
}
},
"cutSegments": [
{
"name": "",
"color": {
"model": "hsv",
"color": [
278.8602470993196,
100,
95
],
"valpha": 1
},
"uuid": "8f8c719b-47c5-4d31-9b05-66fbba949a08"
}
],
"fileFormatData": {
"filename": "D:\Videos\RecordedTV\Videos\Hamlet_20200502_2015-00.01.45.439-01.59.45.699-Hamlet_v2.ts",
"nb_streams": 3,
"nb_programs": 1,
"format_name": "mpegts",
"format_long_name": "MPEG-TS (MPEG-2 Transport Stream)",
"start_time": "1.400000",
"duration": "7081.098822",
"size": "4627160528",
"bit_rate": "5227618",
"probe_score": 50
},
"rotation": 360,
"shortestFlag": false
}
}

@mifi
Copy link
Owner

mifi commented May 3, 2020

From your first run it seems you are exporting 3 tracks: audio, video and subtitle.
as we can see from the error, mp4 doesn't support dvb_subtitle.

[mp4 @ 0000028f331e04c0] Could not find tag for codec dvb_subtitle in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

Try to select only video and audio tracks.
The subtitle track probably needs to be converted to a format that mp4 support, but losslesscut does not (yet) have this ability. You may be able to extract the stream to a separate file, then convert it using a separate tool, then you can import it again. I don't remember right now if mp4 supports subtitles at all, but i think so. Or you might try some other format like MKV

@rskermit
Copy link
Author

rskermit commented May 3, 2020

Hi! I am coming a lot closer. When looking at the original 7 tracks I get this:
grafik
When trying to select only a video and audio file the menu looks like this:
grafik
However what I get is an out TS video with a video and asubtitle track (but no audio)!
grafik

When trying to select two audio file the menu looks like this:
grafik
What I get is the right tracks:
grafik
The walkaway message is that the problem lies with the selectin of the tracks and not in the export routine. Version 3.21.0 may suggest that you have the right tracks but in reality you don't - which leads to the error...

@mifi
Copy link
Owner

mifi commented May 3, 2020

Ohh. I see, so it is selecting the wrong track IDs. According to the track panel (which uses ffprobe), stream 0 is a subtitle stream, but according to ffmpeg, stream 0 is the EPG data track!
Seems like you found a bug or limitation in ffprobe.

Here is the tracks according to ffmpeg: (stream 0 EPG comes last)

Stream #0:1 0x1a22: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:2 [0x1a23]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:3 0x1a24: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 448 kb/s
Stream #0:4 0x1a25: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired) (descriptions)
Stream #0:5 0x1a26: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:6 [0x1a28]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:7 0x1a29: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s
No Program
Stream #0:0[0x12]: Data: epg

and according to ffprobe:

0: {index: 0, codec_name: "dvb_subtitle", codec_long_name: "DVB subtitles", codec_type: "subtitle", codec_time_base: "0/1", …}
1: {index: 1, codec_name: "h264", codec_long_name: "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", profile: "High", codec_type: "video", …}
2: {index: 2, codec_name: "ac3", codec_long_name: "ATSC A/52A (AC-3)", codec_type: "audio", codec_time_base: "1/48000", …}
3: {index: 3, codec_name: "ac3", codec_long_name: "ATSC A/52A (AC-3)", codec_type: "audio", codec_time_base: "1/48000", …}
4: {index: 4, codec_name: "dvb_teletext", codec_long_name: "DVB teletext", codec_type: "subtitle", codec_tag_string: "[6][0][0][0]", …}
5: {index: 5, codec_tag_string: "[5][0][0][0]", codec_tag: "0x0005", id: "0x1a28", r_frame_rate: "0/0", …}
6: {index: 6, codec_name: "ac3", codec_long_name: "ATSC A/52A (AC-3)", codec_type: "audio", codec_time_base: "1/48000", …}

Notice how ffprobe returns streams 0-6 while ffmpeg returns 0-7, so because epg is missing in ffprobe the rest are shifted by -1 and all wrong. I will have to google a bit here....

@mifi
Copy link
Owner

mifi commented May 3, 2020

Is it possible to share a short segment of your file with all streams (TS)?

@mifi
Copy link
Owner

mifi commented May 3, 2020

Maybe we need to run ffprobe with a longer -analyzeduration or -probesize

@rskermit
Copy link
Author

rskermit commented May 3, 2020

Hi ! You have a very valid point - what happens if the transmitted video changes the tracks over time. My example shows at the beginning (before the the region of interest a part that will be which will be cut out):
grafik
While 50 minutes later you find (within the region of intererst):
grafik
Which shows the the TV station has changed the sequence of streams. For a user onlx the sequence within the cut is of intererest...

@rskermit
Copy link
Author

rskermit commented May 3, 2020 via email

@mifi
Copy link
Owner

mifi commented May 4, 2020

Maybe u can use https://www.filemail.com/ and send to [email protected]

@mifi
Copy link
Owner

mifi commented May 4, 2020

This is a interesting problem I have not really considered, that the number of streams can change during playback. I'm not sure even how ffmpeg handles this. Maybe it just keeps on adding new streams as new stream index (last stream index + 1) as they appear.

@mifi mifi changed the title Export of DVBC Video (HD) TS to MP4 (Unable to export this file) TS files with streams changing over time - DVBC Video (HD) May 21, 2020
@mifi mifi added the MPEG TS TS are quirky and they can change tracks throughout the duration of the file label Aug 24, 2021
@mifi
Copy link
Owner

mifi commented Dec 30, 2023

I've created a new overview issue for MPEG TS related problems: #1839 - I will close this issue because there isn't any obvious actionable solution.

@mifi mifi closed this as completed Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MPEG TS TS are quirky and they can change tracks throughout the duration of the file
Projects
None yet
Development

No branches or pull requests

2 participants