VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or buy Replay Video Capture or PlayON and record Netflix, HBO, etc! :)
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    I did post here before and got briliant help but cant seem to find last post so made a new post

    I have this script for making movie clips louder. but just tried a short clip and get this error, would anyone know why this is the error below. it seems to be something about timestamp


    Code:
      Input #0, avi, from 'C:\ffmpeg-3.4-win64-static\bin\movie.clip.avi':
      Metadata:
        encoder         : MEncoder Sherpya-SVN-r33488-4.2.5
      Duration: 00:43:09.34, start: 0.000000, bitrate: 1128 kb/s
        Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 988 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
        Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 127 kb/s
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (mp3 (native) -> aac (native))
    Press [q] to stop, [?] for help
    Output #0, matroska, to 'movie.clip_dynaudio.mkv':
      Metadata:
        encoder         : Lavf57.83.100
        Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 624x352 [SAR 1:1 DAR 39:22], q=2-31, 988 kb/s, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc
        Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 192 kb/s
        Metadata:
          encoder         : Lavc57.107.100 aac
    [matroska @ 0000016bfaac89c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [matroska @ 0000016bfaac89c0] Can't write packet with unknown timestamp
    av_interleaved_write_frame(): Invalid argument
    [matroska @ 0000016bfaac89c0] Can't write packet with unknown timestamp
    Error writing trailer of movie.clip_dynaudio.mkv: Invalid argument
    frame=  241 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:10.01 bitrate=   0.7kbits/s speed=  82x
    video:631kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [aac @ 0000016bfaadcce0] Qavg: nan
    Conversion failed!
    Press any key to continue . . .


    and this is the audio script

    Code:
      @setlocal
    
    @echo Audio processing, video is copied losslesly
    
    @rem folder where ffmpeg.exe is located
    @set FF=C:\ffmpeg-3.4-win64-static\bin
    @set PATH=%FF%;%PATH%
    
    @set filename=%~1
    
    @rem audio bitrate
    @set ab=192
    
    @set aproc="pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE,dynaudnorm=p=1/sqrt(2):m=100:s=20"
    
    @ffmpeg.exe -hide_banner -v 32 -stats -y -i "%filename%" -c:v copy -af %aproc% -c:a aac -b:a %ab%k -f matroska "%~n1_dynaudio.mkv"
    
    @endlocal
    @pause


    Also I have another error on another movie clip too


    Code:
      Audio processing, video is copied losslesly
    Input #0, matroska,webm, from 'C:\ffmpeg-3.4-win64-static\bin\test.clip.mkv':
      Metadata:
        COMPATIBLE_BRANDS: isommp42
        MAJOR_BRAND     : mp42
        MINOR_VERSION   : 0
        ENCODER         : Lavf57.83.100
      Duration: 00:21:50.77, start: 0.000000, bitrate: 988 kb/s
        Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
        Metadata:
          HANDLER_NAME    : ISO Media file produced by Google Inc.
          DURATION        : 00:21:50.765000000
        Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp (default)
        Metadata:
          HANDLER_NAME    : ISO Media file produced by Google Inc.
          ENCODER         : Lavc57.107.100 aac
          DURATION        : 00:21:50.766000000
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    Too many packets buffered for output stream 0:0.
    Conversion failed!
    Press any key to continue . . .
    Last edited by loa909; 13th Jul 2018 at 12:29.
    Quote Quote  
  2. You can add '-fflags +genpts' to command line but not sure if this will work and solve issue with your source.

    Code:
    @ffmpeg.exe -hide_banner -v 32 -stats -y -fflags +genpts -i "%filename%" -c:v copy -af %aproc% -c:a aac -b:a %ab%k -f matroska "%~n1_dynaudio.mkv"
    Not sure if this is not an issue related to codec and container then this filter may be necessary https://ffmpeg.org/ffmpeg-bitstream-filters.html#mpeg4_005funpack_005fbframes - some of bitstream filters are invoked automatically if necessary, not sure how with this case.
    Last edited by pandy; 15th Jul 2018 at 03:56.
    Quote Quote  
  3. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    well it seems to have fixed it thanks again


    Where would I need to place this line in the script anyway


    ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
    Quote Quote  
  4. Originally Posted by loa909 View Post
    well it seems to have fixed it thanks again


    Where would I need to place this line in the script anyway


    ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
    this bitstream filter can be placed after input and before output however not sure if AVI is a good container for it (main purpose of this filter is to unpack frames packed for AVI container due of AVI container limitations). Honestly i don't recall this kind of problems from XVid/Divx files...
    Quote Quote  



Similar Threads