[mythtv-users] No audio on some files from youtube_dl

Tom Dexter digitalaudiorock at gmail.com
Sun Mar 27 19:12:39 UTC 2016


I frequently get no audio in mythtv on some videos downloaded using
youtube_dl. For these videos, youtube_dl reports this when
downloading:

[youtube] C4G3iZ2oWvA: Downloading webpage
[youtube] C4G3iZ2oWvA: Downloading video info webpage
[youtube] C4G3iZ2oWvA: Extracting video information
[youtube] C4G3iZ2oWvA: Downloading MPD manifest
WARNING: Requested formats are incompatible for merge and will be
merged into mkv.

Then it downloads a .mp4 video file and a .webm audio file and uses
ffmpeg to merge them into an mkv file.

The resulting file information using midentify (mplayer identify)
looks like this:

ID_VIDEO_WIDTH -> 1280
ID_CLIP_INFO_N -> 4
ID_LENGTH -> 230.90
ID_AID_0_LANG -> eng
ID_CLIP_INFO_VALUE3 -> Lavf56.25.101
ID_AUDIO_FORMAT -> opus
ID_VIDEO_FORMAT -> H264
ID_VIDEO_ASPECT -> 0.0000
ID_EXIT -> EOF
ID_START_TIME -> -0.01
ID_CLIP_INFO_NAME2 -> MINOR_VERSION
ID_AUDIO_NCH -> 2
ID_CLIP_INFO_NAME0 -> COMPATIBLE_BRANDS
ID_AUDIO_CODEC -> ffopus
ID_VIDEO_HEIGHT -> 720
ID_SEEKABLE -> 1
ID_DEMUXER -> lavfpref
ID_CLIP_INFO_NAME3 -> ENCODER
ID_CLIP_INFO_VALUE0 -> iso6avc1mp41
ID_VIDEO_FPS -> 29.970
ID_CLIP_INFO_NAME1 -> MAJOR_BRAND
ID_CLIP_INFO_VALUE1 -> dash
ID_VIDEO_CODEC -> ffh264
ID_AUDIO_RATE -> 48000

So the audio is apparently:
ID_AUDIO_FORMAT -> opus
ID_AUDIO_NCH -> 2
ID_AUDIO_CODEC -> ffopus
ID_AUDIO_RATE -> 48000

MythTV logs this when I try to play that, and I get no sound:

2016-03-27 14:53:50.772540 N [1538/1538] CoreContext
mythmainwindow.cpp:2737 (PauseIdleTimer) - Suspending idle timer
2016-03-27 14:53:50.840148 I [1538/1538] CoreContext tv_play.cpp:1063
(TV) - TV: Creating TV object
2016-03-27 14:53:50.987749 N [1538/1538] CoreContext
mythmainwindow.cpp:2737 (PauseIdleTimer) - Suspending idle timer
2016-03-27 14:53:50.991932 I [1538/1538] CoreContext tv_play.cpp:1280
(Init) - TV: Created TvPlayWindow.
2016-03-27 14:53:51.092199 I [1538/1538] CoreContext tv_play.cpp:2225
(HandleStateChange) - TV: Attempting to change from None to
WatchingVideo
2016-03-27 14:53:52.206632 N [1538/1538] CoreContext
audioplayer.cpp:164 (ReinitAudio) - AudioPlayer: Enabling Audio
2016-03-27 14:53:52.516060 I [1538/1538] CoreContext
avformatdecoder.cpp:2141 (ScanStreams) - AFD: codec Unknown Codec ID
has 2 channels
2016-03-27 14:53:52.542636 I [1538/1538] CoreContext
avformatdecoder.cpp:2632 (OpenAVCodec) - AFD: Opened codec 0x16c60b00,
id(H264) type(Video)
2016-03-27 14:53:52.638297 I [1538/1538] CoreContext
mythpainter_ogl.cpp:62 (ClearCache) - Clearing OpenGL painter cache.
2016-03-27 14:53:52.769800 I [1538/1538] CoreContext
mythrender_vdpau.cpp:1717 (CreatePresentationSurfaces) - VDPAU:
Created 2 output surfaces.
2016-03-27 14:53:52.769832 I [1538/1538] CoreContext
mythrender_vdpau.cpp:424 (Create) - VDPAU: Created VDPAU render device
1920x1080
2016-03-27 14:53:52.824442 N [1538/1538] CoreContext
mythplayer.cpp:526 (CheckExtraAudioDecode) - Player(19): Forcing
decode extra audio option on (Video method requires it).

...notably the "Unknown Codec ID" reported by avformatdecoder.cpp.

I've found that there are ways to force other formats in youtube_dl
that get around that, like this one (that I've yet to look into what
it's specifically doing):

youtube-dl --format 38/37/22/35/34/18/6/5/17/13 <url>

Any idea what's going on with that?

Thanks!
Tom


More information about the mythtv-users mailing list