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

Audio lost when cutting an .m2ts video file (from Free french Internet provider) #2264

Open
4 tasks done
godefroy75 opened this issue Dec 9, 2024 · 5 comments
Open
4 tasks done

Comments

@godefroy75
Copy link

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Steps to reproduce

Extract just a few seconds in the center of a video file .m2ts, generated by the Freebox (french provider). I tried with 5 different TV channels, and either in mode HD (1440x1080) and in mode HD+ (1920x1440) and the result was the same : each time lossless-cut told me there was 6 audio channels (true) but said that only 5 were available for extract, and no audio channel were in the extracted file. I have no problem with mp4 files.

Expected behavior

I expect to have an audio channel in the video, and if possible all of them.

Actual behavior

No audio channel exported in the video.

Provide an error report

o error occurred.

{
"err": false,
"state": {
"ffmpegExperimental": false,
"preserveMovData": false,
"movFastStart": true,
"preserveMetadataOnMerge": false,
"filePath": "/Users/godefroy/Desktop/Installation MacBook M4/Tests/Arte - Valmont HD+ - 10-12-2024 00h33 01m (901).m2ts",
"fileFormat": "mpegts",
"externalFilesMeta": {},
"mainStreams": [
{
"index": 0,
"codec_name": "dvb_teletext",
"codec_long_name": "DVB teletext",
"codec_type": "subtitle",
"codec_tag_string": "[6][0][0][0]",
"codec_tag": "0x0006",
"id": "0x31",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 82059331,
"start_time": "911.770344",
"duration_ts": 1159640,
"duration": "12.884889",
"extradata_size": 4,
"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,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
},
"tags": {
"language": "fra,fra"
}
},
{
"index": 1,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_tag_string": "[27][0][0][0]",
"codec_tag": "0x001b",
"width": 1440,
"height": 1080,
"coded_width": 1440,
"coded_height": 1080,
"closed_captions": 0,
"film_grain": 0,
"has_b_frames": 2,
"sample_aspect_ratio": "4:3",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 40,
"color_range": "tv",
"color_space": "bt709",
"chroma_location": "left",
"field_order": "tt",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"id": "0x44",
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/90000",
"start_pts": 82131339,
"start_time": "912.570433",
"duration_ts": 1148824,
"duration": "12.764711",
"bits_per_raw_sample": "8",
"extradata_size": 42,
"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,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
}
},
{
"index": 2,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "HE-AAC",
"codec_type": "audio",
"codec_tag_string": "[15][0][0][0]",
"codec_tag": "0x000f",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"initial_padding": 0,
"id": "0x45",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 82097747,
"start_time": "912.197189",
"duration_ts": 1133224,
"duration": "12.591378",
"bit_rate": "73090",
"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,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
},
"tags": {
"language": "fra"
}
},
{
"index": 3,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "HE-AACv2",
"codec_type": "audio",
"codec_tag_string": "[15][0][0][0]",
"codec_tag": "0x000f",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"initial_padding": 0,
"id": "0x47",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 82097747,
"start_time": "912.197189",
"duration_ts": 1156279,
"duration": "12.847544",
"bit_rate": "49361",
"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,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
},
"tags": {
"language": "deu"
}
},
{
"index": 4,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "HE-AAC",
"codec_type": "audio",
"codec_tag_string": "[15][0][0][0]",
"codec_tag": "0x000f",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"initial_padding": 0,
"id": "0x48",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 82097747,
"start_time": "912.197189",
"duration_ts": 1133224,
"duration": "12.591378",
"bit_rate": "73254",
"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,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
},
"tags": {
"language": "qaa"
}
},
{
"index": 5,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "HE-AACv2",
"codec_type": "audio",
"codec_tag_string": "[15][0][0][0]",
"codec_tag": "0x000f",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"initial_padding": 0,
"id": "0x49",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 82097747,
"start_time": "912.197189",
"duration_ts": 1156279,
"duration": "12.847544",
"bit_rate": "49203",
"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,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
},
"tags": {
"language": "qad"
}
}
],
"copyStreamIdsByFile": {
"/Users/godefroy/Desktop/Installation MacBook M4/Tests/Arte - Valmont HD+ - 10-12-2024 00h33 01m (901).m2ts": {
"0": false,
"1": true,
"2": true,
"3": true,
"4": true,
"5": true
}
},
"cutSegments": [
{
"start": 4.573059,
"end": 10.304182692307691
}
],
"mainFileFormatData": {
"filename": "/Users/godefroy/Desktop/Installation MacBook M4/Tests/Arte - Valmont HD+ - 10-12-2024 00h33 01m (901).m2ts",
"nb_streams": 6,
"nb_programs": 1,
"format_name": "mpegts",
"format_long_name": "MPEG-TS (MPEG-2 Transport Stream)",
"start_time": "911.770344",
"duration": "13.564800",
"size": "7258944",
"bit_rate": "4281047",
"probe_score": 50
},
"rotation": 360,
"shortestFlag": false,
"effectiveExportMode": "separate",
"outSegTemplate": "${FILENAME}-${CUT_FROM}-${CUT_TO}${SEG_SUFFIX}${EXT}",
"preserveMetadata": "default",
"preserveChapters": true
},
"platform": "darwin",
"version": "3.64.0"
}

Share the file

https://www.swisstransfer.com/d/b5b5f7a4-f733-4c70-ab14-4811dd22334e

Share log from developer tools

No response

@mifi
Copy link
Owner

mifi commented Dec 10, 2024

I suspect this is a case of #1839
if you convert it to mp4 or mov first and then open that file and cut it, what happens?

@godefroy75
Copy link
Author

Hello. Thanks for your answer. Lossless-cut works when I convert the file in mp4, but the goal for me in using lossless-cut is to cut loss-less :-) I previously used SmartCutter.app (from frame ring) for years to edit these m2ts files, but this app is not working on my new M4 Macintosh (an annoying preview bug) so I'm looking for an alternative solution and lossless-cut seems very good to me, if it works.

I you want to try with the native m2ts I shared two files HD and HD+ on the link https://www.swisstransfer.com/d/b5b5f7a4-f733-4c70-ab14-4811dd22334e

Lossless-cut plays the main sound channel correctly, and locate 6 sound channels, but export none. Subtitles are not recognized either. With an old Macintosh, SmartCutter handle all the sound channels and the subtitle.

@mifi
Copy link
Owner

mifi commented Dec 11, 2024

If you convert the file to mp4 with losslesscut, that should be a lossless operation. so if that works, then maybe that could be a work-around?

@godefroy75
Copy link
Author

godefroy75 commented Dec 11, 2024 via email

@mifi
Copy link
Owner

mifi commented Dec 18, 2024

Sorry I think we're misunderstanding eachother :)

What I meant was to:

  1. open the mpeg TS file in LosslessCut
  2. make sure there are no cuts being made (e.g. no segments in the timeline)
  3. choose output format as mov or mp4 in losslesscut
  4. just export it

if you're lucky, you will not lose the audio track if you do that.

Then you can re-open the output mov/mp4 file in losslesscut and cut it. Not sure if it works, but it's worth a try, if you didn't already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants