Jump to content
Tuts 4 You
Sign in to follow this  
LCF-AT

FFmpeg - Audio bitrate not same

Recommended Posts

LCF-AT

Hi guys,

I checked out the latest ffmpeg version to see whether the CRLF problem was fixed now for Windows system but still dosent work.I tried something like this...

-debug 1 -headers "Referer: 123\r\nUser-Agent: Mozilla\r\n\r\n"

answer of ffmpeg is

Reading option '-headers' ... matched as AVOption 'headers' with argument 'Referer: 123\r\nUser-Agent: Mozilla\r\n\r\n'.

User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=0-
Connection: close
Icy-MetaData: 1
Referer: 123\r\nUser-Agent: Mozilla\r\n\r\n

...so now I thought it would help if I just edit the header request on fly and I just change the CRLF \r\n in the text to real CRLF bytes 13 & 10 (decimal) and send this to ffmpeg.But also this isnt working and I get this infos out...

Reading option '-headers' ... matched as AVOption 'headers' with argument 'Referer: 123'.
Trailing options were found on the commandline.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

My commandline in CreateProcess function would look so in a txt file if I copy it into...

cmd.exe /k ffmpeg.exe -debug 1 -headers "Referer: 123
User-Agent: Mozilla

" -i "https://....m3u8" -vcodec copy -acodec copy -f mpegts....

CRLFs are directly there but also this isnt working with ffmpeg.I still wonder why there isnt any work around for this problem yet.

On the other hand I also tried youtube-dl using commandline paramter...

--add-header FIELD:VALUE         Specify a custom HTTP header and its value,
                                 separated by a colon ':'. You can use this
                                 option multiple times

....and there it seems to work.

[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.90 Safari/537.36
FIELD2: VALUE2
Accept-Language: en-us,en;q=0.5
Cookie: 123
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
FIELD: VALUE
" -i "https://....m3u8" -c copy -f mpegts -

Youtube-dl seems to send the commandline paramters with direct CRLF same like I did above.So whats the diffrent in this case now that its not working for me?

greetz

Share this post


Link to post
nonspin

Here's how i'd access the media..

ZDF-Mediathek "Die Subway-Falle" -> grab the "master.m3u8"

https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/master.m3u8

instead of:
https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_776000_av.m3u8

use:
https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/master.m3u8


now have a looksy with FFMpeg -i

 

Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_229000_av.m3u8?null=0' for reading
[https @ 00000000026807c0] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_476000_av.m3u8?null=0' for reading
[https @ 00000000026807c0] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_776000_av.m3u8?null=0' for reading
[https @ 00000000026807c0] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_1496000_av.m3u8?null=0' for reading
[https @ 00000000026807c0] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_2296000_av.m3u8?null=0' for reading
[https @ 00000000026807c0] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_3296000_av.m3u8?null=0' for reading
[https @ 00000000026807c0] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/index_229000_a.m3u8?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment1_229000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment2_229000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment1_476000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment2_476000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment1_776000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment2_776000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment1_1496000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment2_1496000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment1_2296000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment2_2296000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment1_3296000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment2_3296000_av.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment1_229000_a.ts?null=0' for reading
[hls,applehttp @ 0000000002678c80] Opening 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/segment2_229000_a.ts?null=0' for reading
Input #0, hls,applehttp, from 'https://zdfvodde-vh.akamaihd.net/i/meta-files/zdf/smil/m3u8/300/16/11/161124_subwaylfalle_inf/6/161124_subwaylfalle_inf.smil/master.m3u8':
  Duration: 00:44:43.44, start: 0.100511, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 226000
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 320x176 [SAR 1:1 DAR 20:11], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 226000
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 226000
  Program 1
    Metadata:
      variant_bitrate : 474000
    Stream #0:2: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 480x272 [SAR 1:1 DAR 30:17], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 474000
    Stream #0:3: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 474000
  Program 2
    Metadata:
      variant_bitrate : 775000
    Stream #0:4: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 775000
    Stream #0:5: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 775000
  Program 3
    Metadata:
      variant_bitrate : 1495000
    Stream #0:6: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 852x480 [SAR 1:1 DAR 71:40], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 1495000
    Stream #0:7: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 1495000
  Program 4
    Metadata:
      variant_bitrate : 2297000
    Stream #0:8: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 2297000
    Stream #0:9: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 2297000
  Program 5
    Metadata:
      variant_bitrate : 3298000
    Stream #0:10: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 3298000
    Stream #0:11: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 3298000
  Program 6
    Metadata:
      variant_bitrate : 95000
    Stream #0:12: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 95000

 

  • Like 1

Share this post


Link to post
LCF-AT

Hi nonspin,

I didnt care about this stream so I just picked it as example to check out how to download it with specific time stamps accurate. :) 

greetz

Share this post


Link to post
LCF-AT

Hi guys,

I have another question about using ffmpeg / youtube-dl with URLs and diffrent stream types.So my goal is it if I pipe any not live stream to player (VLC) to see the video durration time and to do some seeking in the video itself like a normal video file jumping for / backward.I found out that in diffrent cases ffmpeg / YTDL / VLC itself work else to show a video durration / full lenght video time or just showing 0:0 = no seeking possible etc.Just would like to know whether its possible to use any xy paramters to get the full video lenght (VLC) to see + doing seeking for / backward?In most cases using ffmpeg I get no video time to see and cant also seek in the video in VLC (pipe).Maybe anyone has some hints about that how to get a video seeking on fly.

Example: If I use a direct HLS playlist link in VLC itself alone then I get the full video time to see and can also seek also same with direct mp4 videos.If I am using same direct links with ffmpeg then I dont get the full time to see and cant seek in the video.

greetz

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...