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

Support for PCM WAV audio format #476

Closed
Raffi111 opened this issue Oct 11, 2020 · 5 comments
Closed

Support for PCM WAV audio format #476

Raffi111 opened this issue Oct 11, 2020 · 5 comments
Labels
ffmpeg Problem resides in ffmpeg or usage of ffmpeg

Comments

@Raffi111
Copy link

I spend a lot of time to find a perfect cutter software.
Your software is nearly perfect! Easy to use, very comfortable and very fast.
An at the end without problem with the final video files.

Only one - for me big - issue:
It does not support native PCM WAV audio stream.

I can export the file, but always without audio. Only with the video stream.
For preview it is possible to generate the audio, but thats not important for me.
It is a standard m2ts file from SONY cameras like (HVR-NX5 or PXW-Z90).

Here the meta data for an example file:

_No error

{
"state": {
"filePath": "G:\Video_NX5\20200207231109.m2ts",
"fileFormat": "mpegts",
"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": "HDMV",
"codec_tag": "0x564d4448",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1088,
"has_b_frames": 1,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 40,
"chroma_location": "left",
"field_order": "tt",
"refs": 1,
"is_avc": "false",
"nal_length_size": "0",
"id": "0x1011",
"r_frame_rate": "50/1",
"avg_frame_rate": "25/1",
"time_base": "1/90000",
"start_pts": 100800,
"start_time": "1.120000",
"duration_ts": 92370600,
"duration": "1026.340000",
"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": "pcm_bluray",
"codec_long_name": "PCM signed 16|20|24-bit big-endian for Blu-ray media",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "HDMV",
"codec_tag": "0x564d4448",
"sample_fmt": "s16",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"id": "0x1100",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 93600,
"start_time": "1.040000",
"duration_ts": 92383200,
"duration": "1026.480000",
"bit_rate": "1536000",
"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
}
}
],
"copyStreamIdsByFile": {
"G:\Video_NX5\20200207231109.m2ts": {
"0": true,
"1": true
}
},
"cutSegments": [
{
"start": 0,
"end": 84.96
}
],
"fileFormatData": {
"filename": "G:\Video_NX5\20200207231109.m2ts",
"nb_streams": 2,
"nb_programs": 1,
"format_name": "mpegts",
"format_long_name": "MPEG-TS (MPEG-2 Transport Stream)",
"start_time": "1.040000",
"duration": "1026.480000",
"size": "3060019200",
"bit_rate": "23848641",
"probe_score": 50
},
"rotation": 360,
"shortestFlag": false
}
}_

Is it possible to add support for this audio stream?

@mifi
Copy link
Owner

mifi commented Oct 19, 2020

Please try the experimental checkbox in settings, and try different output formats. (e.g. MOV, MP4, MKV, TS)

@Raffi111
Copy link
Author

Hi,
thank you for your answer, but your tips dosen't help. Exorting in any format is without audio.

@mifi mifi mentioned this issue Oct 20, 2020
22 tasks
@mifi
Copy link
Owner

mifi commented Oct 20, 2020

I found this:
https://forum.doom9.org/showthread.php?t=174718

It seems that your file uses a codec pcm_bluray that ffmpeg is not able to encode or output at all (and probably never will be.)

I think you can solve this by extracting all streams/tracks, then use handbrake or FFMPEG or similar to convert the audio file to PCM. Then merge the streams again in losslesscut (drag drop the new file into losslesscut with the old file open).
I added a feature request here: #372

@mifi
Copy link
Owner

mifi commented Oct 20, 2020

You can also probably convert the audio using

ffmpeg -i G:/Video_NX5/20200207231109.m2ts -vn output_audio.wav

then import the resulting wav back into your video in losslesscut

@mifi mifi added the ffmpeg Problem resides in ffmpeg or usage of ffmpeg label Aug 24, 2021
@mifi
Copy link
Owner

mifi commented Dec 8, 2021

does exporting audio track and then converting it to wav using the above command work? then re-introduce the wav file in losslesscut and output to MOV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ffmpeg Problem resides in ffmpeg or usage of ffmpeg
Projects
None yet
Development

No branches or pull requests

2 participants