Re: [FFmpeg-user] Need help resolving concat error
Nicolas George nsup.org> writes: > Le septidi 7 thermidor, an CCXXIV, Carl Eugen Hoyos a écrit : > > The concat demuxer has immanent security issues and > > is therefore never auto-detected > It is detected but will only accept safe file paths. Thanks for the correction! Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
Le septidi 7 thermidor, an CCXXIV, Carl Eugen Hoyos a écrit : > The concat demuxer has immanent security issues and > is therefore never auto-detected You are mistaken: /tmp $ echo 'ffconcat version 1.0' > test /tmp $ echo 'file /dev/null' >> test /tmp $ ffprobe test [concat @ 0x21f45e0] Unsafe file name '/dev/null' test: Operation not permitted It is detected but will only accept safe file paths. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
Moritz Barsnick gmx.net> writes: > But, as Cley pointed out, that file doesn't have a > proper extension or a proper header, so "-f concat" > should be added as an input option. This is neither extension- nor header-related: The concat demuxer has immanent security issues and is therefore never auto-detected, you have to force it with -f concat to use it. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
Am 24.07.2016 um 17:16 schrieb Moritz Barsnick: On Sun, Jul 24, 2016 at 16:49:30 +0200, Peter White wrote: <(for f in ./*.MOV; do echo "file '$PWD/$f'"; done) is a very fancy way of saying *.MOV. ;) Essentially that is what happens there: ffmpeg -i *.MOV No, it isn't at all. It's a bash-ism (or perhaps zdh-ism) which provides a pseudo file containing the output of the command within the brackets as content. Valid approach, and it's used in the wiki as well. https://trac.ffmpeg.org/wiki/Concatenate Oops, I see that now. Was wondering what that -safe 0 was for. But the OP still have no -f concat anywhere in their command line. Is it implied somewhere? Cannot see where, though: >>> *ffmpeg -safe 0 -analyzeduration 40 -probesize 40 >>> -i <(for f in ./*.MOV; do echo "file '$PWD/$f'"; done) -map 0:0 -map >>> 0:1 -map 0:2 -c:v copy -c:a copy -map_metadata 0 -copy_unknown >>> -disposition:a:0 default -disposition:a:1 default OUT.MOV* But, maybe I am not seeing everything here. I suppose files.txt is a list of one file path per line? I believe this is not accepted as input by ffmpeg. It expects media files not text files listing those. The original poster is using the concat demuxer ... At least in their posted command they don't: >>> *$ ffmpeg -i files.txt -c:v copy -c:a copy OUT.MOV* No concat demuxer, which is why that files is expected to be a media file. You are right though in saying that "files.txt" is being interpreted as a multimedia file. It either needs the extension .concat (I believe), or better "-f concat". -f concat, .concat extension does nothing for me. Also have a look at what Cley Faye wrote in their reply. To concatenate files you need the concat filter. Just using "-c:v copy -c:a copy" only gets you what ffmpeg deems the best quality input. That's total nonsense. You *cannot* use a filter with "-c copy". Again, oops. Sorry, I should have known that. Mark is using the concat *demuxer*, and that may just be fine. I am not so certain he actually is. ;) Peter ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
Hello, I test the the split directly on server with this command : [root@ns1 ~]# ffmpeg -i /home/lamas44747/public_html/sarmaye.mp4 -ss 00:00:10 -to 00:00:20 -c copy /home/lamas44747/public_html/split.mp4 The server show this error : FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 48.00 (705505/14698) -> 24.00 (705505/29396) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/lamas44747/public_html/sarmaye.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.40.101 comment : http://www.aparat.com/kshahrvandi Duration: 00:00:58.88, start: 0.-46440, bitrate: 662 kb/s Stream #0.0(eng): Video: h264, yuv420p, 640x360 [PAR 1:1 DAR 16:9], 562 kb/s, 24 fps, 24 tbr, 705505.00 tbn, 48 tbc Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 96 kb/s Unrecognized option 'to' kindly to advice me. Thanks, On Sun, Jul 24, 2016 at 7:46 PM, Moritz Barsnick wrote: > On Sun, Jul 24, 2016 at 16:49:30 +0200, Peter White wrote: > > <(for f in ./*.MOV; do echo "file '$PWD/$f'"; done) > > > > is a very fancy way of saying *.MOV. ;) Essentially that is what > > happens there: > > > > ffmpeg -i *.MOV > > No, it isn't at all. It's a bash-ism (or perhaps zdh-ism) which > provides a pseudo file containing the output of the command within the > brackets as content. Valid approach, and it's used in the wiki as well. > https://trac.ffmpeg.org/wiki/Concatenate > > This one resulting file is passed as a concat file to "-i". > > But, as Cley pointed out, that file doesn't have a proper extension or > a proper header, so "-f concat" should be added as an input option. > And/or a proper header added. > > > > I suppose files.txt is a list of one file path per line? I believe > > this is not accepted as input by ffmpeg. It expects media files not > > text files listing those. > > The original poster is using the concat demuxer, read about it in the > docs or on the wiki page link I mentioned above. > > You are right though in saying that "files.txt" is being interpreted as > a multimedia file. It either needs the extension .concat (I believe), > or better "-f concat". > > > Also have a look at what Cley Faye wrote in their reply. To concatenate > > files you need the concat filter. Just using "-c:v copy -c:a copy" only > > gets you what ffmpeg deems the best quality input. > > That's total nonsense. You *cannot* use a filter with "-c copy". > > Mark is using the concat *demuxer*, and that may just be fine. > > I had said he should check the single input files first, but you > (Peter) are right in saying that ffmpeg's interpretation of files.txt > was misleading the process. > > Moritz > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://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 http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
On Sun, Jul 24, 2016 at 16:49:30 +0200, Peter White wrote: > <(for f in ./*.MOV; do echo "file '$PWD/$f'"; done) > > is a very fancy way of saying *.MOV. ;) Essentially that is what > happens there: > > ffmpeg -i *.MOV No, it isn't at all. It's a bash-ism (or perhaps zdh-ism) which provides a pseudo file containing the output of the command within the brackets as content. Valid approach, and it's used in the wiki as well. https://trac.ffmpeg.org/wiki/Concatenate This one resulting file is passed as a concat file to "-i". But, as Cley pointed out, that file doesn't have a proper extension or a proper header, so "-f concat" should be added as an input option. And/or a proper header added. > I suppose files.txt is a list of one file path per line? I believe > this is not accepted as input by ffmpeg. It expects media files not > text files listing those. The original poster is using the concat demuxer, read about it in the docs or on the wiki page link I mentioned above. You are right though in saying that "files.txt" is being interpreted as a multimedia file. It either needs the extension .concat (I believe), or better "-f concat". > Also have a look at what Cley Faye wrote in their reply. To concatenate > files you need the concat filter. Just using "-c:v copy -c:a copy" only > gets you what ffmpeg deems the best quality input. That's total nonsense. You *cannot* use a filter with "-c copy". Mark is using the concat *demuxer*, and that may just be fine. I had said he should check the single input files first, but you (Peter) are right in saying that ffmpeg's interpretation of files.txt was misleading the process. Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
Mark Strecker wrote: > Here is the command line we tried originally (this is the one we intend to > use and works on Windows ... except the file input of course): > > *ffmpeg -safe 0 -analyzeduration 40 -probesize 40 -i <(for > f in ./*.MOV; do echo "file '$PWD/$f'"; done) -map 0:0 -map 0:1 -map 0:2 > -c:v copy -c:a copy -map_metadata 0 -copy_unknown -disposition:a:0 default > -disposition:a:1 default OUT.MOV* I am actually sceptical that this command does exactly what you think it does. From my understanding of the -i option it has to come before each file that is intended as input. See the Synopsis from the man page: "ffmpeg [global_options] {[input_file_options] -i input_file} ... {[output_file_options] output_file} ..." so "[input_file_options] -i input_file" may repeat but the "-i" is not optional. Since you only provide one -i followed by a list of files, only the first one will be used as input with ffmpeg taking the second from that list as the first output file. And BTW: <(for f in ./*.MOV; do echo "file '$PWD/$f'"; done) is a very fancy way of saying *.MOV. ;) Essentially that is what happens there: ffmpeg -i *.MOV Say you have the following files intended as input: 1.MOV 2.MOV 3.MOV that above command snippet expands to: ffmpeg -i 1.MOV 2.MOV 3.MOV ffmpeg will use 1.MOV as input with 2.MOV being the first *output*. So you most certainly have overwritten all .MOV files but the first in the input list. Also, keep in mind that OS X filesystems are most likely case sensitive, meaning that there is a difference between *.mov and *.MOV. Windows is inherently case insensitive. Almost all other systems do actually care about letter case. > So we changed to command to use an input file and simplify a bit. It seems > to get further, but we now get a codec error : > > *ffmpeg -i files.txt -c:v copy -c:a copy OUT.MOV* I suppose files.txt is a list of one file path per line? I believe this is not accepted as input by ffmpeg. It expects media files not text files listing those. Look at this output: > *Input #0, tty, from 'files.txt':* > > * Duration: 00:00:00.04, bitrate: 29 kb/s* > > *Stream #0:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 > tbc* So input file #0, files.txt, is interpreted as a Video of 40 ms length. I guess that is not intended. Also have a look at what Cley Faye wrote in their reply. To concatenate files you need the concat filter. Just using "-c:v copy -c:a copy" only gets you what ffmpeg deems the best quality input. And it will be only one input stream at that. So the output will contain exactly one video and one audio stream. Peter ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
On Sat, Jul 23, 2016 at 15:39:27 -0400, Mark Strecker wrote: > *[mov @ 0x7fa74b008000] Could not find tag for codec ansi in stream #0, codec > not currently supported in container* Have you managed to decode a single one of these files using ffmpeg? Have you managed to remux a single one of these files using ffmpeg? I would check if that's the issue, before trying to analyze a concat problem. Cheers, Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help resolving concat error
2016-07-23 21:39 GMT+02:00 Mark Strecker : > *ffmpeg -i files.txt -c:v copy -c:a copy OUT.MOV* > > *ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers* > > *Input #0, tty, from 'files.txt':* > > * Duration: 00:00:00.04, bitrate: 29 kb/s* > > *Stream #0:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 > tbc* > > *Could not write header for output file #0 (incorrect codec parameters ?): > Invalid argument* > I think it would be interesting to see the content of files.txt? Maybe it's missing the header, and since you didn't specify "-f concat" either, it can't work with that. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Need help resolving concat error
Hello All, I am new to ffmpeg and need help resolving an error. We are trying to concatenate MOV files and figured out the options we need on Windows. We then tried it on OS X and ran into problems. We are using the latest version downloaded from the ffmpeg site : 3.1.1 Here is the command line we tried originally (this is the one we intend to use and works on Windows ... except the file input of course): *ffmpeg -safe 0 -analyzeduration 40 -probesize 40 -i <(for f in ./*.MOV; do echo "file '$PWD/$f'"; done) -map 0:0 -map 0:1 -map 0:2 -c:v copy -c:a copy -map_metadata 0 -copy_unknown -disposition:a:0 default -disposition:a:1 default OUT.MOV* *ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers* * built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)* * configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect* * libavutil 55. 28.100 / 55. 28.100* * libavcodec 57. 48.101 / 57. 48.101* * libavformat57. 41.100 / 57. 41.100* * libavdevice57. 0.101 / 57. 0.101* * libavfilter 6. 47.100 / 6. 47.100* * libswscale 4. 1.100 / 4. 1.100* * libswresample 2. 1.100 / 2. 1.100* * libpostproc54. 0.100 / 54. 0.100* */dev/fd/63: Invalid data found when processing input* So we changed to command to use an input file and simplify a bit. It seems to get further, but we now get a codec error : *ffmpeg -i files.txt -c:v copy -c:a copy OUT.MOV* *ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers* * built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)* * configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect* * libavutil 55. 28.100 / 55. 28.100* * libavcodec 57. 48.101 / 57. 48.101* * libavformat57. 41.100 / 57. 41.100* * libavdevice57. 0.101 / 57. 0.101* * libavfilter 6. 47.100 / 6. 47.100* * libswscale 4. 1.100 / 4. 1.100* * libswresample 2. 1.100 / 2. 1.100* * libpostproc54. 0.100 / 54. 0.100* *Input #0, tty, from 'files.txt':* * Duration: 00:00:00.04, bitrate: 29 kb/s* *Stream #0:0: Video: ansi, pal8, 640x400, 25 fps, 25 tbr, 25 tbn, 25 tbc* *[mov @ 0x7fa74b008000] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.* *[mov @ 0x7fa74b008000] Could not find tag for codec ansi in stream #0, codec not currently supported in container* *Output #0, mov, to 'OUT.MOV':* * Metadata:* *encoder : Lavf57.41.100* *Stream #0:0: Video: ansi, pal8, 640x400, q=2-31, 25 fps, 25 tbr, 25 tbn, 25 tbc* *Stream mapping:* * Stream #0:0 -> #0:0 (copy)* *Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument* TIA for your help! Mark ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".