mifi / lossless-cut

The swiss army knife of lossless video/audio editing
https://losslesscut.app/
GNU General Public License v2.0
27.89k stars 1.35k forks source link

Support for AC-4 audio (ATSC 3.0 Recordings from Channels DVR) #1557

Closed 1920x1200 closed 1 year ago

1920x1200 commented 1 year ago

I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first

Steps to reproduce

  1. Make a recording of an ATSC 3.0 channel via the Channels DVR app.
  2. Import recording (.MPG) into Lossless Cut
  3. Only video plays, no sound. Try converting to a compatible format. Still no sound.

Expected behavior

Video has sound

Actual behavior

Video does not have sound

Provide an error report

No error occurred.

{ "state": { "ffmpegExperimental": false, "preserveMovData": false, "movFastStart": true, "preserveMetadataOnMerge": false, "filePath": "/Users/Scott/Desktop/To Media Drive/ABC World News Tonight With David Muir 2023-03-16-1829.mpg", "fileFormat": "mp4", "externalFilesMeta": {}, "mainStreams": [ { "index": 0, "codec_name": "hevc", "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)", "profile": "Main 10", "codec_type": "video", "codec_tag_string": "[36][0][0][0]", "codec_tag": "0x0024", "width": 1280, "height": 720, "coded_width": 1280, "coded_height": 720, "closed_captions": 0, "film_grain": 0, "has_b_frames": 3, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv420p", "level": 120, "color_range": "tv", "color_space": "bt709", "color_transfer": "bt709", "color_primaries": "bt709", "chroma_location": "left", "refs": 1, "id": "0x31", "r_frame_rate": "60000/1001", "avg_frame_rate": "60000/1001", "time_base": "1/90000", "start_pts": 8529936675, "start_time": "94777.074167", "duration_ts": 170089920, "duration": "1889.888000", "extradata_size": 179, "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": 1, "codec_name": "bin_data", "codec_long_name": "binary data", "codec_type": "data", "codec_tag_string": "AC-4", "codec_tag": "0x342d4341", "id": "0x32", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/90000", "start_pts": 8529939460, "start_time": "94777.105111", "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": "bin_data", "codec_long_name": "binary data", "codec_type": "data", "codec_tag_string": "AC-4", "codec_tag": "0x342d4341", "id": "0x33", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/90000", "start_pts": 8529939460, "start_time": "94777.105111", "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": 3, "codec_name": "bin_data", "codec_long_name": "binary data", "codec_type": "data", "codec_tag_string": "STPP", "codec_tag": "0x50505453", "id": "0x39", "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/90000", "start_pts": 8530116850, "start_time": "94779.076111", "duration_ts": 169909740, "duration": "1887.886000", "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 } } ], "copyStreamIdsByFile": { "/Users/Scott/Desktop/To Media Drive/ABC World News Tonight With David Muir 2023-03-16-1829.mpg": { "0": true, "1": true, "2": true, "3": true } }, "cutSegments": [ {} ], "mainFileFormatData": { "filename": "/Users/Scott/Desktop/To Media Drive/ABC World News Tonight With David Muir 2023-03-16-1829.mpg", "nb_streams": 4, "nb_programs": 1, "format_name": "mpegts", "format_long_name": "MPEG-TS (MPEG-2 Transport Stream)", "start_time": "94777.074167", "duration": "1889.888000", "size": "705217516", "bit_rate": "2985224", "probe_score": 50 }, "rotation": 360, "shortestFlag": false, "effectiveExportMode": "separate", "outSegTemplate": "${FILENAME}-${CUT_FROM}-${CUT_TO}${SEG_SUFFIX}${EXT}" }, "platform": "darwin", "version": "3.54.0" }

Share the file

No response

Share log

No response

mifi commented 1 year ago

Thanks. I see that your file contains AC-4 audio tracks, but they are being recognised by ffmpeg as bin_data (binary data), meaning not supported.

After some googling I see that AC-4 is not supported in ffmpeg. It was requested by Elon Musk 3 years ago but it seems to be not supported yet: https://trac.ffmpeg.org/ticket/8349

1920x1200 commented 1 year ago

Thanks for the fast response. After reading through the thread you linked to, it sounds like over the past year some people have made a fork of ffmpeg which has support for this audio format. Why the official one hasn't added that support I have no clue but is there any way that the experimental versions could be added into LosslessCut so they can be tested? (perhaps under a debug menu or in the settings where one can choose which version they want to use?)

mifi commented 1 year ago

Yes, you can download the fork yourself and then go into losslesscut settings and select path to external ffmpeg.

1920x1200 commented 1 year ago

I gave it a try but can't get it to work. I hope native support can be added soon, or someone can figure out how to get an experiential version working.

mifi commented 1 year ago

Probably have to wait until it lands inside ffmpeg official repo before losslesscut will include it

mifi commented 1 year ago

closing this because nothing actionable here for me related to ac-4