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

HDV MPEG2 MP2 Sound Decoded as Digital Noise #3428

Closed
Twenkid opened this issue May 1, 2020 · 5 comments
Closed

HDV MPEG2 MP2 Sound Decoded as Digital Noise #3428

Twenkid opened this issue May 1, 2020 · 5 comments
Labels
🐞 bug A bug, error, or breakage of any kind stale This issue has not had any activity in 60 days :(

Comments

@Twenkid
Copy link

Twenkid commented May 1, 2020

Describe the bug:

The sound from HDV MPEG2 videos (MP2), .M2T from a Canon HV30 camera. The sound in the editor and when exporting is digital noise. Is it supposed to be supported?

Sample noise: https://github.com/Twenkid/OpenShot/blob/master/diginoise.aac

The workaround is converting the sources with ffmpeg to anothe audio format, e.g:

ffmpeg -i "I:\2016g-2016.06.12_12-17-09.m2t" -c:v copy -c:a pcm_s16le "I:\2016g-2016.06.12_12-17-09.avi"

The format is:

{
"acodec": "mp2",
"audio_bit_rate": 384000,
"audio_stream_index": 1,
"audio_timebase": {
"den": 90000,
"num": 1
},
"channel_layout": 3,
"channels": 2,
"display_ratio": {
"den": 9,
"num": 16
},
"duration": 16.511999130249023,
"file_size": "55781104",
"fps": {
"den": 1001,
"num": 30000
},
"has_audio": true,
"has_single_image": false,
"has_video": true,
"height": 1080,
"id": "Y138S17TAL",
"interlaced_frame": true,
"media_type": "video",
"metadata": {},
"path": "G:\2018g-2018.09.27_14-31-54.m2t",
"pixel_format": 0,
"pixel_ratio": {
"den": 3,
"num": 4
},
"sample_rate": 48000,
"top_field_first": true,
"type": "FFmpegReader",
"vcodec": "mpeg2video",
"video_bit_rate": 3344886,
"video_length": "496",
"video_stream_index": 0,
"video_timebase": {
"den": 90000,
"num": 1
},
"width": 1440
}

@Twenkid Twenkid added the 🐞 bug A bug, error, or breakage of any kind label May 1, 2020
@SuslikV
Copy link
Contributor

SuslikV commented May 2, 2020

Please post MediaInfo of the file in .txt format.

@Twenkid
Copy link
Author

Twenkid commented May 2, 2020

m1.txt
m2.txt

@SuslikV
Copy link
Contributor

SuslikV commented May 2, 2020

It looks, like first stream is menu, as far as I understand you run into the issue similar to #3302 .

Can you shoot and share smallest sample (.m2t format, about 2 sec long) with the both video and sound, so developers can test it?

@Twenkid
Copy link
Author

Twenkid commented May 2, 2020

http://twenkid.com/os/3.m2t

However I couldn't capture a fresh file right now, it's a "copy" of an excerpt by ffmpeg - the format seems kept and the sound issue is there, too. There is the ffmpeg's output if it's also suggestive.

BTW, the audio desync is kind of "normal" at least wherever I've captured from my camera both on Linux and Windows, this is shot with Canon HV30 and captured with dvgrab.


C:\...>ffmpeg -i G:\2018g-2018.09.27_14-30-33.m2t -t 3 -c:v copy -c:a cop
y g:\3.m2t
ffmpeg version git-2020-03-15-c467328 Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvd
ec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.100 / 56. 42.100
  libavcodec     58. 75.100 / 58. 75.100
  libavformat    58. 41.100 / 58. 41.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.100 /  7. 77.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[mpeg2video @ 0000000000464280] Invalid frame dimensions 0x0.
    Last message repeated 10 times
[mpegts @ 0000000000460300] Could not find codec parameters for stream 2 (Unknow
n: none ([160][0][0][0] / 0x00A0)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0000000000460300] Could not find codec parameters for stream 3 (Unknow
n: none ([161][0][0][0] / 0x00A1)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'G:\2018g-2018.09.27_14-30-33.m2t':
  Duration: 00:00:09.34, start: 4183.512667, bitrate: 26878 kb/s
  Program 100
    Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420
p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 29.97 fps, 29
.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x814]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fl
tp, 384 kb/s
    Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)
    Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)
Output #0, mpegts, to 'g:\3.m2t':
  Metadata:
    encoder         : Lavf58.41.100
    Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, b
t709, top first), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25000 kb/s, 29.97 fps, 2
9.97 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384
 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=   76 fps=0.0 q=-1.0 Lsize=    8195kB time=00:00:02.97 bitrate=22557.0kbit
s/s speed= 124x
video:7854kB audio:141kB subtitle:0kB other streams:0kB global headers:0kB muxin
g overhead: 2.506346%

@stale
Copy link

stale bot commented Oct 29, 2020

Thank you so much for submitting an issue to help improve OpenShot Video Editor. We are sorry about this, but this particular issue has gone unnoticed for quite some time. To help keep the OpenShot GitHub Issue Tracker organized and focused, we must ensure that every issue is correctly labelled and triaged, to get the proper attention.

This issue will be closed, as it meets the following criteria:

  • No activity in the past 180 days
  • No one is assigned to this issue

We'd like to ask you to help us out and determine whether this issue should be reopened.

  • If this issue is reporting a bug, please can you attempt to reproduce on the latest daily build to help us to understand whether the bug still needs our attention.
  • If this issue is proposing a new feature, please can you verify whether the feature proposal is still relevant.

Thanks again for your help!

@stale stale bot added the stale This issue has not had any activity in 60 days :( label Oct 29, 2020
@stale stale bot closed this as completed Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug A bug, error, or breakage of any kind stale This issue has not had any activity in 60 days :(
Projects
None yet
Development

No branches or pull requests

2 participants