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

hls-prefer-native wrong mp4 in result #8700

Closed
miflinak opened this issue Feb 29, 2016 · 2 comments
Closed

hls-prefer-native wrong mp4 in result #8700

miflinak opened this issue Feb 29, 2016 · 2 comments

Comments

@miflinak
Copy link

@miflinak miflinak commented Feb 29, 2016

For example I'm running:
youtube-dl --hls-prefer-native 'http://rutube.ru/play/embed/8326598' --output 'test.mp4'
Result file size: 117590616
And then trying to open in ffmpeg (to show that mp4 is wrong):
ffmpeg -i test.mp4 -codec copy test.mkv -y
Result: (don't work)

Input #0, mpegts, from 'test.mp4':
  Duration: 00:08:29.15, start: 0.700000, bitrate: 1847 kb/s
  Program 1
    Stream #0:0[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 23.98 fps, 23.98 tbr, 90k tbn, 47.94 tbc
    Stream #0:1[0x102]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 130 kb/s
[matroska @ 0x3928660] Codec for stream 0 does not use global headers but container format requires global headers
[matroska @ 0x3928660] Codec for stream 1 does not use global headers but container format requires global headers
[matroska @ 0x3928660] Error parsing AAC extradata, unable to determine samplerate.
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf57.4.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1280x720, q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, 130 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

And it working fine when downloading without "hls-prefer-native".

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 29, 2016

What are you trying to achieve in the first place?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 29, 2016

Your command works fine for me, most likely you have an outdated ffmpeg.

> py26yt http://rutube.ru/play/embed/8326598 --hls-prefer-native
[rutube:embed] 8326598: Downloading webpage
[rutube] 1538d0f2b2f21f1afc272b23d8c6505d: Downloading video JSON
[rutube] 1538d0f2b2f21f1afc272b23d8c6505d: Downloading options JSON
[rutube] 1538d0f2b2f21f1afc272b23d8c6505d: Downloading f4m manifest
[rutube] 1538d0f2b2f21f1afc272b23d8c6505d: Downloading f4m manifest
[rutube] 1538d0f2b2f21f1afc272b23d8c6505d: Downloading f4m manifest
[rutube] 1538d0f2b2f21f1afc272b23d8c6505d: Downloading f4m manifest
[rutube] 1538d0f2b2f21f1afc272b23d8c6505d: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 64
[download] Destination: Ответь мне, Галко-чан! 8 серия [русские субтитры AniPlay.TV] Oshiete! Galko-chan-1538d0f2b2f21f1afc272b23d8c6505d.mp4
[download] 100% of 112.14MiB in 04:21
> ffmpeg.exe -i "Ответь мне, Галко-чан! 8 серия [русские субтитры AniPlay.TV] Oshiete! Galko-chan-1538d0f2b2f21f1afc272b23d8c6505d.mp4" -codec copy test.mkv -y
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --
enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-d
ecklink --enable-zlib
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpegts, from '╨Ю╤В╨▓╨╡╤В╤М ╨╝╨╜╨╡, ╨У╨░╨╗╨║╨╛-╤З╨░╨╜! 8 ╤Б╨╡╤А╨╕╤П [╤А╤Г╤Б╤Б╨║╨╕╨╡ ╤Б╤Г╨▒╤В╨╕╤В╤А╤Л AniPlay.TV] Oshiete! Galko-chan-1538d0f2b2f21f1afc
272b23d8c6505d.mp4':
  Duration: 00:08:29.15, start: 0.700000, bitrate: 1847 kb/s
  Program 1
    Stream #0:0[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 23.98 fps, 23.98 tbr, 90k tbn, 47.94 tbc
    Stream #0:1[0x102]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 130 kb/s
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf57.25.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1280x720, q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, 130 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=12127 fps=0.0 q=-1.0 Lsize=  108118kB time=00:08:29.09 bitrate=1739.7kbits/s speed=1.21e+003x
video:99910kB audio:8105kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.095156%
@dstftw dstftw closed this Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.