[FFmpeg-user] stream copy video / re-enc audio

Mike F paziu at yahoo.com
Sun Sep 29 00:51:42 CEST 2013


Hello all,

Thank you for your response,
here is the failing command:and ffmpeg output:

>#  ffmpeg -y -i c32.avi -c:a libaacplus -b:a 64k -ac 2 -threads 12 -c:v copy -map 0:0 -map 0:1  -c:s copy -strict experimental c32.mkv -v debug
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug  6 2013 10:47:57 with gcc 4.5.2 (Gentoo 4.5.2 p1.1, pie-0.4.5)
  configuration: --enable-libx264 --enable-libxvid --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-nonfree --enable-libtheora --enable-x11grab --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvpx --enable-libaacplus
  libavutil      52. 38.100 / 52. 38.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.100 / 55. 12.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 79.101 /  3. 79.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  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 'c32.avi'.                                                                                                      
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libaacplus'.                                                                                    
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '64k'.                                                                      
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.                                                                           
Reading option '-threads' ... matched as AVOption 'threads' with argument '12'.                                                                                             
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.                                                                                          
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0'.                                                                           
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:1'.                                                                           
Reading option '-c:s' ... matched as option 'c' (codec name) with argument 'copy'.                                                                                          
Reading option '-strict' ... matched as AVOption 'strict' with argument 'experimental'.                                                                                     
Reading option 'c32.mkv' ... matched as output file.                                                                                                                        
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.                                                                                    
Finished splitting the commandline.                                                                                                                                         
Parsing a group of options: global .                                                                                                                                        
Applying option y (overwrite output files) with argument 1.                                                                                                                 
Applying option v (set logging level) with argument debug.                                                                                                                  
Successfully parsed a group of options.                                                                                                                                     
Parsing a group of options: input file c32.avi.                                                                                                                             
Successfully parsed a group of options.                                                                                                                                     
Opening an input file: c32.avi.                                                                                                                                             
[avi @ 0x16d2b80] Format avi probed with size=2048 and score=100                                                                                                            
[avi @ 0x16d3120] use odml:1                                                                                                                                                
[avi @ 0x16d2b80] File position before avformat_find_stream_info() is 8548                                                                                                  
[avi @ 0x16d2b80] All info found                                                                                                                                            
[avi @ 0x16d2b80] File position after avformat_find_stream_info() is 10993                                                                                                  
Input #0, avi, from 'c32.avi':                                                                                                                                              
  Duration: 01:43:05.36, start: 0.000000, bitrate: 961 kb/s
    Stream #0:0, 1, 1/25: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x272 [SAR 1:1 DAR 40:17], 1/25, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1, 1, 1/14000: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 112 kb/s
Successfully opened the file.
Parsing a group of options: output file c32.mkv.                                                                                                                            
Applying option c:a (codec name) with argument libaacplus.                                                                                                                  
Applying option b:a (video bitrate (please use -b:v)) with argument 64k.                                                                                                    
Applying option ac (set number of audio channels) with argument 2.                                                                                                          
Applying option c:v (codec name) with argument copy.                                                                                                                        
Applying option map (set input stream mapping) with argument 0:0.                                                                                                           
Applying option map (set input stream mapping) with argument 0:1.                                                                                                           
Applying option c:s (codec name) with argument copy.                                                                                                                        
Successfully parsed a group of options.                                                                                                                                     
Opening an output file: c32.mkv.                                                                                                                                            
Successfully opened the file.                                                                                                                                               
detected 8 logical cores                                                                                                                                                    
[graph 0 input from stream 0:1 @ 0x16d9320] Setting 'time_base' to value '1/44100'                                                                                          
[graph 0 input from stream 0:1 @ 0x16d9320] Setting 'sample_rate' to value '44100'                                                                                          
[graph 0 input from stream 0:1 @ 0x16d9320] Setting 'sample_fmt' to value 's16p'                                                                                            
[graph 0 input from stream 0:1 @ 0x16d9320] Setting 'channel_layout' to value '0x3'                                                                                         
[graph 0 input from stream 0:1 @ 0x16d9320] tb:1/44100 samplefmt:s16p samplerate:44100 chlayout:0x3                                                                         
[audio format for output stream 0:1 @ 0x16bd800] Setting 'sample_fmts' to value 's16|flt'                                                                                   
[audio format for output stream 0:1 @ 0x16bd800] Setting 'channel_layouts' to value '0x3'                                                                                   
[audio format for output stream 0:1 @ 0x16bd800] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'                                                                                                                                                              
[AVFilterGraph @ 0x16e3c00] query_formats: 4 queried, 9 merged, 3 already done, 0 delayed                                                                                   
[auto-inserted resampler 0 @ 0x16bf500] ch:2 chl:stereo fmt:s16p r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz                                                             
Output #0, matroska, to 'c32.mkv':                                                                                                                                          
  Metadata:
    encoder         : Lavf55.12.100
    Stream #0:0, 0, 1/1000: Video: mpeg4 (XVID / 0x44495658), yuv420p, 640x272 [SAR 1:1 DAR 40:17], 1/25, q=2-31, 1k tbn, 25 tbc
    Stream #0:1, 0, 1/1000: Audio: aac (libaacplus) ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (mp3 -> libaacplus)
Press [q] to stop, [?] for help
[matroska @ 0x16d9da0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument                                                                                                                              
[AVIOContext @ 0x16db020] Statistics: 0 seeks, 1 writeouts                                                                                                                  
[AVIOContext @ 0x16db180] Statistics: 6385760 bytes read, 4 seeks  


no problem when using mp4....

Thank you,

Mike








----- Original Message -----
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> To: ffmpeg-user at ffmpeg.org
> Cc: 
> Sent: Saturday, September 28, 2013 3:53 AM
> Subject: Re: [FFmpeg-user] stream copy video / re-enc audio
> 
> Mike F <paziu <at> yahoo.com> writes:
> 
>>  it fails with:
>> 
>>  [matroska  <at>  0x17d2440] Can't write packet with unknown 
> timestamp
>>  av_interleaved_write_frame(): Invalid argument 
> 
> Please always provide your failing command line together with 
> the complete, uncut console output when asking for support on 
> this mailing list.
> (I don't easily remember a question where mediainfo output 
> was any help.)
> 
> Is the problem also reproducible with -acodec aac -strict -2 ?
> 
> Carl Eugen
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 


More information about the ffmpeg-user mailing list