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

ffmpeg-produced log files #8410

Closed
ghost opened this issue Feb 2, 2016 · 0 comments
Closed

ffmpeg-produced log files #8410

ghost opened this issue Feb 2, 2016 · 0 comments

Comments

@ghost
Copy link

@ghost ghost commented Feb 2, 2016

tl;dr: how to make any execution of the ffmpeg command generate ffmpeg-*.log files (and thus see the exact cmd line used to call ffmpeg)

This is not an issue, please IGNORE THIS

Hi. I was about to ask why am I getting ff*.log files created every time that I run youtube-dl, but then I remembered it's because I had the environment variable FFREPORT=1 set in .bashrc and I thought maybe I should mention this anyway just in case some people might find this useful.

When that env. var. is set, youtube-dl running ffmpeg will generate .log files in folder, like so:

ffmpeg-20160202-192330.log
ffmpeg-20160202-192407.log
ffmpeg-20160202-192408.log
ffmpeg-20160202-192513.log
ffmpeg-20160202-192551.log
ffmpeg-20160202-192614.log
ffmpeg-20160202-192652.log
ffprobe-20160202-192407.log
ffprobe-20160202-192408.log
ffprobe-20160202-192551.log
ffprobe-20160202-192614.log
ffprobe-20160202-192635.log
ffprobe-20160202-192652.log
ffprobe-20160202-192659.log

Here's the relevant excerpt from ffmpeg docs which can be found here: https://ffmpeg.org/ffmpeg.html

-report

    Dump full command line and console output to a file named program-YYYYMMDD-HHMMSS.log in the current directory. This file can be useful for bug reports. It also implies -loglevel verbose.

    Setting the environment variable FFREPORT to any value has the same effect. If the value is a ’:’-separated key=value sequence, these options will affect the report; option values must be escaped if they contain special characters or the options delimiter ’:’ (see the “Quoting and escaping” section in the ffmpeg-utils manual).

    The following options are recognized:

    file

        set the file name to use for the report; %p is expanded to the name of the program, %t is expanded to a timestamp, %% is expanded to a plain % 
    level

        set the log verbosity level using a numerical value (see -loglevel). 

    For example, to output a report to a file named ffreport.log using a log level of 32 (alias for log level info):

    FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output

    Errors in parsing the environment variable are not fatal, and will not appear in the report.

The .log files show details such as the exact command line used by youtube-dl to run ffmpeg, like this:

ffmpeg started on 2016-02-02 at 19:23:30
Report written to "ffmpeg-20160202-192330.log"
Command line:
ffmpeg -y -i "file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f133.mp4" -i "file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f141.m4a" -c copy -map 0:v:0 -map 1:a:0 "file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.temp.mp4"
ffmpeg version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=native -g0 -fno-var-tracking-assignments -fomit-frame-pointer -ftrack-macro-expansion=0 -fno-stack-protector -fPIC' --disable-static --enable-avfilter --enable-avresample --disable-stripping --enable-nonfree --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=alsa --disable-indev=oss --disable-indev=jack --disable-outdev=alsa --disable-outdev=oss --disable-outdev=sdl --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-gpl --enable-hardcoded-tables --enable-iconv --disable-lzma --enable-network --enable-openssl --enable-postproc --disable-libsmbclient --disable-ffplay --disable-sdl --disable-vaapi --disable-vdpau --enable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-li  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-i' ... matched as input file with argument 'file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f133.mp4'.
Reading option '-i' ... matched as input file with argument 'file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f141.m4a'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:a:0'.
Reading option 'file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.temp.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f133.mp4.
Successfully parsed a group of options.
Opening an input file: file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f133.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] ISO: File Type Major Brand: dash
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found fragment index for track 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found fragment index entry for track 1 and moof_offset 8494
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found frag time 0, using it for dts
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] Before avformat_find_stream_info() pos: 9670 bytes read:32768 seeks:0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] After avformat_find_stream_info() pos: 92136 bytes read:98304 seeks:0 frames:21
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f133.mp4':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    creation_time   : 2013-10-19 21:35:03
  Duration: 00:58:24.16, start: 0.000000, bitrate: 247 kb/s
    Stream #0:0(und), 21, 1/90000: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 426x236, 0 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2013-10-19 21:35:03
      handler_name    : VideoHandler
Successfully opened the file.
Parsing a group of options: input file file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f141.m4a.
Successfully parsed a group of options.
Opening an input file: file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f141.m4a.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] ISO: File Type Major Brand: dash
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] found fragment index for track 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] found fragment index entry for track 1 and moof_offset 4836
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] found frag time 0, using it for dts
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] Before avformat_find_stream_info() pos: 6660 bytes read:32768 seeks:0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] After avformat_find_stream_info() pos: 7396 bytes read:32768 seeks:0 frames:1
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.f141.m4a':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    creation_time   : 2013-10-19 21:34:56
  Duration: 00:58:24.26, start: 0.000000, bitrate: 255 kb/s
    Stream #1:0(und), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s (default)
    Metadata:
      creation_time   : 2013-10-19 21:34:56
      handler_name    : SoundHandler
Successfully opened the file.
Parsing a group of options: output file file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.temp.mp4.
Applying option c (codec name) with argument copy.
Applying option map (set input stream mapping) with argument 0:v:0.
Applying option map (set input stream mapping) with argument 1:a:0.
Successfully parsed a group of options.
Opening an output file: file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.temp.mp4.
Successfully opened the file.
[mp4 @ 0xca0b30] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0xca0b30] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'file:DIRECT LINE  BY EARL NIGHTINGALE-RARE SPEECH-Part10-HkkK14UEwkk.temp.mp4':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    encoder         : Lavf56.40.101
    Stream #0:0(und), 0, 1/90000: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 426x236, q=2-31, 0 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
    Metadata:
      creation_time   : 2013-10-19 21:35:03
      handler_name    : VideoHandler
    Stream #0:1(und), 0, 1/44100: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 0 kb/s (default)
    Metadata:
      creation_time   : 2013-10-19 21:34:56
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found fragment index for track 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found fragment index entry for track 1 and moof_offset 207623
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found frag time 486000, using it for dts
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] found fragment index for track 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] found fragment index entry for track 1 and moof_offset 324247
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb682d0] found frag time 441344, using it for dts
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found fragment index for track 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb61110] found fragment index entry for track 1 and moof_offset 400249
...
@ghost ghost closed this Feb 2, 2016
This issue was closed.
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
0 participants
You can’t perform that action at this time.