Commit Graph

54 Commits

Author SHA1 Message Date
Mort Yao
bf507e5e45
[processor.ffmpeg] separate output with '--'
- See feffcb656a (r40158237)
2020-07-19 15:59:21 +02:00
QingQiz
5b9b0d878c fix: soundcloud: HTTP Error 401: Unauthorized
feat: soundcloud download playlist
2020-07-11 20:01:34 +08:00
Semen Zhydenko
2b80c6de9d basicly -> basically 2019-08-05 09:53:01 +02:00
sheerluck
a449eca64e fix coub ffmpeg
Test URL:  https://coub.com/view/19cyub

1) ```params.extend(['-safe', '0'])``` fixes ```[concat @ 0x55b4c8f02980] Unsafe file name 'Test_For_The_Princess!.mp4'```
Before patch: Test_For_The_Princess!_full.mp4 is not created
After patch: Test_For_The_Princess!_full.mp4 created successfully

2) ```round``` fixes ```audio_duration 64.0 + video_duration 8.04 -> 7```
Before patch: video is freezed for last 8 second
After patch: perfect loop
2019-02-04 11:18:06 +03:00
wangqr
f07e909a72 Fallback to re-encoding audio when ffmpeg quits with error 2019-01-21 09:58:26 -05:00
wangqr
0aafca6de4 Use copy when merging audio and video 2019-01-21 02:11:41 -05:00
Mort Yao
3a41c3d22c
[processor.ffmpeg] shut the f up 2018-08-10 03:05:14 +02:00
韩林泽
25b1c25517
Move the warning message output to standard error.
`ffmpeg -version` gives "ffmpeg version 2.8.14-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers" on Ubuntu Xenial, which make int() failed during extracting version code.
2018-05-21 17:40:56 +08:00
Sergey Zmushko
b2d97bcaea [coub] add coub.com support
Video and audio files with high quality are downloaded.
We use ffmpeg for audio and video combining into one file
2017-11-27 15:08:09 +03:00
MaxwellGoblin
15c46d3f7d [ffmpeg]drop -re flag when input is not live stream 2017-07-16 08:49:42 +08:00
MaxwellGoblin
bdffcfacab tuning debugging message 2017-04-21 00:49:00 +08:00
Zhiming Wang
4d0dac2968
[ffmpeg] call ffmpeg with stdin redirected to the null device
Prevent FFmpeg from consuming stdin and interpreting the character
stream as a stream of interactive commands, specifically:

    ?      show this help
    +      increase verbosity
    -      decrease verbosity
    c      Send command to first matching filter supporting it
    C      Send/Queue command to all matching filters
    D      cycle through available debug modes
    h      dump packets/hex press to cycle through the 3 states
    q      quit
    s      Show QP histogram

This prevents misclicking a key or key sequence (e.g., h) produces a
large amount of debugging output which may confuse the unseasoned
user. It is also useful in a batch environment where an unsuspecting
user may not realize you-get could consume stdin through FFmpeg, e.g.

    while read url; do you-get $url; done <urllist

(Related: BashFAQ/089.)

Note that interactive commands are enabled in debug mode (which also
doesn't suppress FFmpeg's default logging).

---

A note on implementation:

An alternative would be FFmpeg's -nostdin option, which explicitly
disables interaction, but adding such an option to existing code would
be even more destructive than the stdin=DEVNULL approach taken here.

---

This commit also happens to fix a dual-call bug in
ffmpeg_concat_mp4_to_mpg.
2017-02-19 12:08:31 -05:00
Mort Yao
fee7193b77
Merge branch 'ffmpeg-dynamic-loglevel' of https://github.com/zmwangx/you-get into zmwangx-ffmpeg-dynamic-loglevel 2017-01-02 16:10:44 +01:00
Zhiming Wang
f7b6f6b40f
ffmpeg: set loglevel to info in debug mode
Occasionally, the FFmpeg invocation fails (which could be due to bugs in
you-get; see #1558 for instance), but -loglevel quiet means nothing is
printed other than the exit status (pretty much always 1) in Python's
traceback, which is not helpful at all.

This commit restores FFmpeg's regular output (-loglevel info) when
--debug is specified. We're not using verbose, debug or trace because
those levels are mostly only useful for debugging FFmpeg itself, which
is not our goal.

Due to lack of meaningful API to access the global logging level, this
is a hack based on two assumptions:

1. When --debug is enabled, the root logger level is set to DEBUG;
2. processor.ffmpeg is lazily imported, after command line options are
   parsed.
2016-12-25 13:58:21 -05:00
Zhiming Wang
b493af9a69
[ffmpeg] fix concat list when output dir is not pwd
Relative paths in the concat list are considered relative to the parent
directory of the script, not the calling directory. This isn't entirely
obvious from the documentation, but it is easy to infer from the concat
demuxer's concept of "safety", and easy to test (confirmed on FFmpeg
3.2.2). See https://ffmpeg.org/ffmpeg-all.html#concat-1 for details.

This commit fixes the wrong relative paths when --output-dir is
specified and not pwd.

This commit also
- Factors out common concat list writer code;
- Slightly simplifies the code to collect FFmpeg params (on Py35+ we can
  further simplify by unpacking LOGLEVEL with the star operator right in
  the list literal).
2016-12-24 13:44:22 -05:00
Mort Yao
d2206b3fdf
Merge branch 'fix-ffmpeg-error-on-mgtv' of https://github.com/StephenPCG/you-get into StephenPCG-fix-ffmpeg-error-on-mgtv 2016-11-18 22:59:43 +01:00
Zhang Cheng
a7635e96a5 [mgtv] add bsf:a aac_adtstoasc to ffmpeg args, fix #1458. 2016-11-17 11:18:01 +08:00
Mort Yao
feffcb656a
[processor.ffmpeg] fix params in ffmpeg_download_stream 2016-10-30 00:24:31 +02:00
H.G
2baeed762a [universal] fix issue: "flush" is not available in Python under 3.3 2016-09-05 10:50:58 +12:00
Mort Yao
3a8ce8819d
[ffmpeg] remove unuseful ffmpeg_play_stream(), fix #1336 2016-08-14 03:52:02 +02:00
David Zhuang
bb485a1110 [ffmpeg] Fix wrong format of output dir 2016-08-11 03:30:21 -04:00
David Zhuang
468fb6f403 [Processor]FFmpeg: check arguments not None 2016-07-29 01:27:22 -04:00
David Zhuang
09bfe28472 [Processor] Fix rtmpdump not portable under Windows 2016-07-21 00:50:21 -04:00
David Zhuang
18bc44ea41 [FFmpeg] Fix stream corrupted if Ctrl+C
Use q instead.
2016-06-29 23:42:19 -04:00
David Zhuang
fd93b0380d [FFmpeg] Change arguments to record M3U 2016-06-29 23:15:28 -04:00
David Zhuang
5966a090f4 [Common, ffmpeg]Exp: Add a ffmpeg downloader and player for any URL 2016-06-29 15:56:39 -04:00
Mort Yao
67d18c766a
processor/ffmpeg.py: 644 2016-05-22 17:28:01 +02:00
cnbeining
b4eb73965c
Add -bsf:a aac_adtstoasc when merging
As in #813.
2016-05-22 17:23:30 +02:00
Mort Yao
53cb97def5 [processor.ffmpeg] set safe option to -1 (as default value changed from -1 to 1 in ffmpeg 3.0.1), fix #1023 2016-04-05 00:39:28 +02:00
Mort Yao
46a1f51a8f [ffmpeg] fix #1009 2016-03-26 16:56:08 +01:00
lilydjwg
d470c8c29a [ffmpeg] more check_call replacing wrong 'raise's 2016-01-23 13:15:07 +08:00
Mort Yao
5567f68539 [rtmpdump] 2015-10-21 02:09:51 +02:00
Mort Yao
de38e0f7c8 [ffmpeg] set "-loglevel quiet" to suppress verbose FFmpeg output 2015-10-17 18:17:14 +02:00
Mort Yao
6e2087cc94 [ffmpeg] implement ffmpeg_concat_av() 2015-10-17 17:53:01 +02:00
lilydjwg
acda697f54 [ffmpeg] use subprocess.check_call
This fixes RuntimeError: No active exception to reraise
2015-09-27 16:38:38 +08:00
liushuyu
c5e09fd549 Fix zhanqi
Zhanqi extractor works again...
And added ts merging implementation...

Signed-off-by: liushuyu <liushuyu_011@163.com>
2015-06-16 18:33:45 +08:00
lilydjwg
e6581b99aa escape filenames for ffmpeg concatenating 2015-02-14 18:54:43 +08:00
pastebt
7b0dc1d330 Support multi stts and mdhd version = 1
modified:   src/you_get/processor/join_mp4.py
2015-01-07 17:00:49 -08:00
pastebt
d8c0c0594e Support skipping udta box, and ignore samples > 1
modified:   src/you_get/processor/join_mp4.py
2015-01-05 16:48:04 -08:00
Mort Yao
cbf0a6afcc Merge branch 'develop' of https://github.com/merlinran/you-get into merlinran-develop 2014-12-11 21:51:19 +01:00
Merlin Ran
08a9e73406 force override when concat files 2014-12-08 21:35:46 +08:00
Merlin Ran
cc03d86909 open concat list file with 'encoding="utf-8"'
To prevent error when video file name contains non-ascii characters.
2014-12-04 10:24:53 +08:00
fengyu
6442849519 set FFMPEG and FFMPEG_VERSION gracefully 2014-08-12 21:46:33 +08:00
FengYu
f92af54d28 set ffmpeg fallback version to 1.0 2014-08-12 21:10:21 +08:00
FengYu
eaf59fc745 fix ffmpeg version error 2014-08-12 17:08:51 +08:00
Mort Yao
f8f9b7778b use concat demuxer on FFmpeg >= 1.1, fix #324 2014-08-03 21:05:51 +02:00
jackyzy823
e286d91a09 refactor rtmp processor to support rtmp parameters 2014-07-15 14:24:21 +08:00
Mort Yao
6dd119436b add play_rtmpdump_stream() 2014-05-22 14:21:17 +02:00
Mort Yao
b3d10e32a9 add rtmpdump wrapper 2014-04-26 15:17:45 +02:00
Mort Yao
bc759b0a27 add ffmpeg_concat_mp4_to_mp4 2013-04-28 22:22:07 +02:00