Ticket #2265 (closed defect: worksforme)
Some http addresses cannot be opened
| Reported by: | cehoyos | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | videolan http |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | yes |
Description
(vlc ticket 8155)
The following two addresses play fine with firefox:
http://translate.google.com/translate_tts?tl=fr&q=l%E8vres
http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa
FFmpeg only decodes the second:
$ ffmpeg -loglevel 99 -i "http://translate.google.com/translate_tts?tl=fr&q=l%E8vres" ffmpeg version N-49844-g1ac0fa5 Copyright (c) 2000-2013 the FFmpeg developers built on Feb 12 2013 23:51:40 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --disable-indev=jack libavutil 52. 17.101 / 52. 17.101 libavcodec 54. 91.103 / 54. 91.103 libavformat 54. 63.100 / 54. 63.100 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 37.101 / 3. 37.101 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument '99'. Reading option '-i' ... matched as input file with argument 'http://translate.google.com/translate_tts?tl=fr&q=l%E8vres'. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set libav* logging level) with argument 99. Successfully parsed a group of options. Parsing a group of options: input file http://translate.google.com/translate_tts?tl=fr&q=l%E8vres. Successfully parsed a group of options. Opening an input file: http://translate.google.com/translate_tts?tl=fr&q=l%E8vres. [AVIOContext @ 0x2113460] Statistics: 0 bytes read, 0 seeks http://translate.google.com/translate_tts?tl=fr&q=l%E8vres: Invalid data found when processing input
$ ffmpeg -loglevel 99 -i "http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa"
ffmpeg version N-49844-g1ac0fa5 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 12 2013 23:51:40 with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl --disable-indev=jack
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.103 / 54. 91.103
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input file http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa.
Successfully parsed a group of options.
Opening an input file: http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa.
[mp3 @ 0x1ba1520] Format mp3 probed with size=2048 and score=51
[mp3 @ 0x1ba1520] File position before avformat_find_stream_info() is 0
[mp3 @ 0x1ba1520] Estimating duration from bitrate, this may be inaccurate
[mp3 @ 0x1ba1520] File position after avformat_find_stream_info() is 4752
Input #0, mp3, from 'http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa':
Duration: 00:00:01.19, start: 0.000000, bitrate: 32 kb/s
Stream #0:0, 33, 1/14112000: Audio: mp3, 16000 Hz, mono, s16p, 32 kb/s
Successfully opened the file.
At least one output file must be specified
Statistics: 4752 bytes read, 0 seeks
Change History
comment:1 Changed 3 months ago by michael
- Analyzed by developer set
- Status changed from new to open
- Reproduced by developer set
comment:2 Changed 2 months ago by ubitux
- Status changed from open to closed
- Resolution set to fixed
Fixed in 1fabd950.
Note that something is very funny:
This doesn't work:
ffplay -user-agent 'Foobar/1.0' 'http://translate.google.com/translate_tts?tl=fr&q=l%E8vres'
This on the other hand does:
ffplay -user-agent 'Mozilla/5.0' 'http://translate.google.com/translate_tts?tl=fr&q=l%E8vres'
Now the funny part:
This does actually "work":
ffplay -user-agent 'Foobar/1.0' 'http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa'
But sounds different from:
ffplay -user-agent 'Mozilla/5.0' 'http://translate.google.com/translate_tts?tl=fr&q=l%E8vresa'
Note that the difference between "levres" and "levresa" is that the later is not an existing word.
Note: See
TracTickets for help on using
tickets.



patch posted to ML
wget " http://translate.google.com/translate_tts?tl=fr&q=l%E8vres"
--2013-04-03 01:00:58-- http://translate.google.com/translate_tts?tl=fr&q=l%E8vres
Resolving translate.google.com (translate.google.com)... 173.194.70.139, 173.194.70.102, 173.194.70.100, ...
Connecting to translate.google.com (translate.google.com)|173.194.70.139|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2013-04-03 01:00:58 ERROR 403: Forbidden.
wget -U Random " http://translate.google.com/translate_tts?tl=fr&q=l%E8vres"
--2013-04-03 01:01:56-- http://translate.google.com/translate_tts?tl=fr&q=l%E8vres
Resolving translate.google.com (translate.google.com)... 173.194.70.139, 173.194.70.102, 173.194.70.100, ...
Connecting to translate.google.com (translate.google.com)|173.194.70.139|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [audio/mpeg]
Saving to: `translate_tts?tl=fr&q=l\350vres.2'
2013-04-03 01:01:56 (0.00 B/s) - `translate_tts?tl=fr&q=l\350vres.2' saved [0/0]
wget -U 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1' " http://translate.google.com/translate_tts?tl=fr&q=l%E8vres"
--2013-04-03 01:02:48-- http://translate.google.com/translate_tts?tl=fr&q=l%E8vres
Resolving translate.google.com (translate.google.com)... 173.194.70.139, 173.194.70.102, 173.194.70.100, ...
Connecting to translate.google.com (translate.google.com)|173.194.70.139|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3168 (3.1K) [audio/mpeg]
Saving to: `translate_tts?tl=fr&q=l\350vres.3'
2013-04-03 01:02:48 (1.68 MB/s) - `translate_tts?tl=fr&q=l\350vres.3' saved [3168/3168]