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

PCM audio track discarded #1690

Open
DevJavaVue opened this Issue Nov 19, 2018 · 12 comments

Comments

5 participants
@DevJavaVue
Copy link

DevJavaVue commented Nov 19, 2018

Hi,

when querying video using --scan switch, PCM sound track is discarded with Linux version of HandBrakeCLI (HandBrake 1.1.2 (2018090700)). Relevant part of HandBrake output:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/devjavavue/pcm_audio/video.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2018-07-19T05:03:11.000000Z
    com.apple.finalcutstudio.media.uuid: 99764C7A-2567-451B-B0DB-BB7303B5CF25
  Duration: 02:15:11.98, start: 0.000000, bitrate: 26544 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main) (hdv2 / 0x32766468), yuv420p(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], 24995 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2018-07-19T05:03:11.000000Z
      handler_name    : Apple Alias-Datensteuerung
      encoder         : HDV 1080i60
      timecode        : 06:23:50:04
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2018-07-19T05:03:11.000000Z
      handler_name    : Apple Alias-Datensteuerung
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2018-07-19T05:37:20.000000Z
      handler_name    : Apple Alias-Datensteuerung
      timecode        : 06:23:50:04
[12:24:15] scan: decoding previews for title 1
Scanning title 1 of 1, preview 6, 60.00 %[12:28:11] scan: 10 previews, 1440x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 4:3
[12:28:11] scan: removing audio 0x1 because no bitrate found
[12:28:11] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: pcm_audio/video.mov
  + duration: 02:15:11
  + size: 1440x1080, pixel aspect: 4/3, display aspect: 1.78, 29.970 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 02:15:11
  + audio tracks:
  + subtitle tracks:

When executing the same command with HandBrakeCLI for Windows, everything is fine and audio is retained:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\pcm_audio\video.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2018-07-19 05:03:11
  Duration: 02:15:12.04, start: 0.000000, bitrate: 26544 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main) [hdv2 / 0x32766468]
      yuv420p, tv, bt709/bt709/bt709
      1440x1080 [PAR 4:3 DAR 16:9], 25000 kb/s, PAR 4:3 DAR 16:9
      29.97 fps, 2997 tbn (default)
    Metadata:
      creation_time   : 2018-07-19 05:03:11
      handler_name    : Apple Alias-Datensteuerung
      encoder         : HDV 1080i60
    Stream #0:1(eng): Audio: pcm_s16le [sowt / 0x74776F73]
      48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2018-07-19 05:03:11
      handler_name    : Apple Alias-Datensteuerung
    Stream #0:2(eng): Data: tmcd / 0x64636D74 (default)
    Metadata:
      creation_time   : 2018-07-19 05:37:20
      handler_name    : Apple Alias-Datensteuerung
[14:42:43] scan: decoding previews for title 1
[14:42:43] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 English (pcm_s16le) (2.0 ch)
Scanning title 1 of 1, preview 5, 50.00 %[14:42:43] scan: 10 previews, 1440x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 4:3
[14:42:43] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: E:\content\in\ALTEKA\1542624600133-pcm_audio\video.mov
  + duration: 02:15:12
  + size: 1440x1080, pixel aspect: 4/3, display aspect: 1.78, 29.970 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 02:15:12
  + audio tracks:
    + 1, English (pcm_s16le) (2.0 ch) (iso639-2: eng)
  + subtitle tracks:

The only difference between the HandBrake instalations is build number; on Windows, HandBrake 1.1.2 (2018090500) is installed.

This bug was already reported for version 0.10.2: #68 but it seems it resurfaced with later version(s).

Keep up the good work, best regards,

Albert

@DevJavaVue DevJavaVue changed the title PCM sound track discarded PCM audio track discarded Nov 19, 2018

@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Nov 19, 2018

Where did you download HandBrake from?

Please take note about broken 3rd party builds: https://handbrake.fr/docs/en/latest/get-handbrake/where-to-get-handbrake.html

We do not support these.

@cehoyos

This comment has been minimized.

Copy link

cehoyos commented Nov 19, 2018

Looks like issue #881.

@DevJavaVue

This comment has been minimized.

Copy link

DevJavaVue commented Nov 20, 2018

Where did you download HandBrake from?

Please take note about broken 3rd party builds: https://handbrake.fr/docs/en/latest/get-handbrake/where-to-get-handbrake.html

We do not support these.

HandBrake was obtained from Packman (http://packman.links2linux.de/).

@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Nov 20, 2018

Can you try compiling from source: https://handbrake.fr/docs/en/latest/developer/build-linux.html (Ideally master, rather than 1.1.2)

I'm not sure what state the pacman repo is in, but it's not an official build.

@cehoyos

This comment has been minimized.

Copy link

cehoyos commented Nov 21, 2018

Nobody claims that #881 was fixed, or is it?

@bradleysepos

This comment has been minimized.

Copy link
Member

bradleysepos commented Nov 21, 2018

@cehoyos Not that I know of... but the correlation seems to escape me?

@cehoyos

This comment has been minimized.

Copy link

cehoyos commented Nov 21, 2018

I still consider the following a strange error message, I believe it is unique to these two bug reports:

scan: removing audio 0x1 because no bitrate found

@bradleysepos

This comment has been minimized.

Copy link
Member

bradleysepos commented Nov 21, 2018

Ah.

hb_log( "scan: removing audio 0x%x because no bitrate found",

static void LookForAudio(hb_scan_t *scan, hb_title_t * title, hb_buffer_t * b)

@cehoyos

This comment has been minimized.

Copy link

cehoyos commented Nov 21, 2018

Apart from the fact that the stream in question has a bitrate, I wonder if this is true for all audio streams with FFmpeg...

@bradleysepos

This comment has been minimized.

Copy link
Member

bradleysepos commented Nov 21, 2018

I'm not super familiar with that part of our code, but @jstebbins might have an idea when he has time.

@DevJavaVue

This comment has been minimized.

Copy link

DevJavaVue commented Nov 21, 2018

I noticed another thing but I'm not sure if it is of any help:

As the video in question is quite large (~26 GB), I trimmed it using ffmpeg, retaining video and audio tracks as they are (-vcodec copy -acodec copy), so no re-encoding took place:

video.mov -vcodec copy -acodec copy -ss 00:00:00.000 -t 00:05:00.000 video_short.mov

Inspecting both videos with Mediainfo is not showing any relevant difference, but it is interesting that trimmed version correctly reports PCM audio track:

+ audio tracks:
    + 1, English (pcm_s16le) (2.0 ch) (iso639-2: eng)

@sr55, I haven't yet tried to compile HandBrake, but I had problems compiling it before because some system dependencies could not be satisfied, Will try to compile it again on some more recent system.

@cehoyos

This comment has been minimized.

Copy link

cehoyos commented Nov 21, 2018

The word "trimming" is misleading here, FFmpeg cannot "trim" a multimedia file, it always creates a new file (with different properties for non-trivial containers like mov).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment