Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
I need help with some issues in the FFmpeg command. *show error in android * 2021-04-09 11:25:01.052 31074-31074/com.daasuu.gpuvideoandroid E/fsfdsfdfgfdffcszxczxczx: false: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (GCC) configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags= libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat57. 25.100 / 57. 25.100 libavdevice57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc54. 0.100 / 54. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Moj-Media/video/ff_blur_708_24c108d0_1616594325217_watermarked.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.45.100 Duration: 00:00:13.23, start: 0.023220, bitrate: 1098 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x852, 990 kb/s, 30 fps, 30 tbr, 1000k tbn, 60 tbc (default) Metadata: handler_name: VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name: SoundHandler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/999/WhatsApp/Media/WhatsApp Video/VID-20210317-WA0013.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf55.48.100 Duration: 00:00:29.20, start: 0.00, bitrate: 1986 kb/s Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/smpte170m), 862x1080, 1848 kb/s, 30 fps, 30 tbr, 15360 tbn, 30720 tbc (default) Metadata: handler_name: VideoHandler Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 131 kb/s (default) Metadata: handler_name: SoundHandler Filter pad has a unconnected output * FFmpeg command is* String cmd21[]={"-y","-i" ,inputFile1, "-i", inputFile2, "-filter_complex", "[0:v]scale=720:576:force_original_aspect_ratio=decrease,setsar=1,pad=720:576:(ow-iw)/2:(oh-ih)/2[0v]; " + "[1:v]scale=720:576:force_original_aspect_ratio=decrease,setsar=1,pad=720:576:(ow-iw)/2:(oh-ih)/2[1 v];" + "[0v][0:a][1v][1:a]concat=n=2:v=1:a=1[outv][outa]" ,"-map" ,"[outv]" ,"-map" ,"[outa]","-c:v","libx264","-crf","23","/storage/emulated/0/Movies/VideoSplit/rohit_record.mp4"}; please help me we are merging multiple videos in a single video . On Sun, Apr 11, 2021 at 5:14 AM William Breathitt Gray < vilhelm.g...@gmail.com> wrote: > On Sun, Apr 11, 2021 at 12:51:47AM +0200, Carl Eugen Hoyos wrote: > > Am Sa., 10. Apr. 2021 um 14:43 Uhr schrieb William Breathitt Gray > > : > > > > > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an > onlyvideo.mp4 > > > > Work-around is to use -ignore_editlist 1 > > > > For future questions: Please remember not to sue -hide_banner and do > > not cut the console output. > > > > Carl Eugen > > Thank you, I was able to use this option to produce the output I wanted. > > William Breathitt Gray > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sun, Apr 11, 2021 at 12:51:47AM +0200, Carl Eugen Hoyos wrote: > Am Sa., 10. Apr. 2021 um 14:43 Uhr schrieb William Breathitt Gray > : > > > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 > > Work-around is to use -ignore_editlist 1 > > For future questions: Please remember not to sue -hide_banner and do > not cut the console output. > > Carl Eugen Thank you, I was able to use this option to produce the output I wanted. William Breathitt Gray signature.asc Description: PGP signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
Am Sa., 10. Apr. 2021 um 14:43 Uhr schrieb William Breathitt Gray : > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 Work-around is to use -ignore_editlist 1 For future questions: Please remember not to sue -hide_banner and do not cut the console output. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sat, Apr 10, 2021 at 04:52:22PM +0200, Carl Eugen Hoyos wrote: > Am Sa., 10. Apr. 2021 um 16:20 Uhr schrieb William Breathitt Gray > : > > > > I can play the video file correctly on my phone and > > desktop (albeit with some minor corrupted video frames and perhaps an > > audio skip here or there), but when I try to convert the video file > > using ffmpeg, I am unable to generate a useful output. > > Please provide the sample file. > > Carl Eugen The input video file here is available here: https://0x0.st/-TmH.mp4 $ sha256sum VID_20210401_150222.mp4 091f3cf8b1e23c32920c7a65293bf85d94219ebc6125e619f2a661215e03d4ae VID_20210401_150222.mp4 William Breathitt Gray signature.asc Description: PGP signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
Am Sa., 10. Apr. 2021 um 16:20 Uhr schrieb William Breathitt Gray : > > I can play the video file correctly on my phone and > desktop (albeit with some minor corrupted video frames and perhaps an > audio skip here or there), but when I try to convert the video file > using ffmpeg, I am unable to generate a useful output. Please provide the sample file. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sat, Apr 10, 2021 at 01:54:45PM +0100, Rob Hallam wrote: > On Sat, 10 Apr 2021 at 13:43, William Breathitt Gray > wrote: > > > $ ffprobe VID_20210401_150222.mp4 -hide_banner > > ... > > com.android.version: 11 > > This looks like it's been created on a mobile device. I have had > experience of a phone creating a 'truncated' file which cut off > before the actual due to a corrupt MOOV atom / extraneous 'ftyp' > atoms. > > The video file played correctly on the phone and on online viewers (eg > YT) but not with either VLC, ffplay, etc. Yes, that essentially my situation (recorded video on phone, but file seems to have been generated with a fault -- perhaps due to truncation as your mention), I can play the video file correctly on my phone and desktop (albeit with some minor corrupted video frames and perhaps an audio skip here or there), but when I try to convert the video file using ffmpeg, I am unable to generate a useful output. I could perhaps use another tool, but I'd like to understand where I'm going wrong with ffmpeg because I do believe it is capable of doing what I want if I learn how it works. > > I could salvage the file by uploading to eg GDocs / YouTube and > re-downloading. You may also wish to have a look at the fork of > untrunc. Others here can advise if ffmpeg can do something useful > with your video file. > > > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 > > Separately, I have seen others advise not to use -hide_banner when > preparing output for questions asked of this list. It is germane to know > what version a querent is using and with which options. > > Cheers, > Rob Ah yes that makes sense, I'll make sure to include the banner in my future responses then. Thank you, William Breathitt Gray signature.asc Description: PGP signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sat, 10 Apr 2021 at 13:43, William Breathitt Gray wrote: > $ ffprobe VID_20210401_150222.mp4 -hide_banner > ... > com.android.version: 11 This looks like it's been created on a mobile device. I have had experience of a phone creating a 'truncated' file which cut off before the actual due to a corrupt MOOV atom / extraneous 'ftyp' atoms. The video file played correctly on the phone and on online viewers (eg YT) but not with either VLC, ffplay, etc. I could salvage the file by uploading to eg GDocs / YouTube and re-downloading. You may also wish to have a look at the fork of untrunc. Others here can advise if ffmpeg can do something useful with your video file. > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 Separately, I have seen others advise not to use -hide_banner when preparing output for questions asked of this list. It is germane to know what version a querent is using and with which options. Cheers, Rob ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Trying to extract video stream but output only has 30 frames
Hello, I have the following MP4 file: $ ffprobe VID_20210401_150222.mp4 -hide_banner [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a40053c00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 17999835 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a40053c00] st: 0 edit list 1 Cannot find an index entry before timestamp: 17999835. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a40053c00] decoding for stream 0 failed Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20210401_150222.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2021-04-01T06:02:45.00Z com.android.version: 11 Duration: 00:00:20.65, start: 0.00, bitrate: 42883 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m), 3840x2160, 42828 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: VideoHandle Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: SoundHandle I believe the timestamps are corrupted for this file so I would like to salvage what I can separate the video stream from the audio. Using ffprobe, it looks like there is an expected 616 frames: $ ffprobe VID_20210401_150222.mp4 -hide_banner -show_streams -select_streams v:0 -count_frames 2>&1 | grep nb_ nb_frames=616 nb_read_frames=N/A nb_read_packets=N/A So I try to isolate the video with the following ffmpeg command: $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x562c10dfa440] st: 0 edit list: 1 Missing key frame while searching for timestamp: 17999835 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x562c10dfa440] st: 0 edit list 1 Cannot find an index entry before timestamp: 17999835. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x562c10dfa440] decoding for stream 0 failed Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20210401_150222.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2021-04-01T06:02:45.00Z com.android.version: 11 Duration: 00:00:20.65, start: 0.00, bitrate: 42883 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m), 3840x2160, 42828 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: VideoHandle Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: SoundHandle File 'onlyvideo.mp4' already exists. Overwrite? [y/N] y Output #0, mp4, to 'onlyvideo.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 com.android.version: 11 encoder : Lavf58.45.100 Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 42828 kb/s, 29.97 fps, 30 tbr, 90k tbn, 90k tbc (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: VideoHandle Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 2, current: 0; changing to 3. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 3, current: 0; changing to 4. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 4, current: 0; changing to 5. This may result in incorrect timestamps